On Fri, 13 Feb 2009, Magnus Damm wrote: > Hi Matthieu, > > [CC Morimoto-san] > [Changed list to linux-media] > > On Tue, Jan 20, 2009 at 6:27 PM, Matthieu CASTET > <matthieu.castet@xxxxxxxxxx> wrote: > > Magnus Damm a écrit : > >> On Mon, Jan 19, 2009 at 11:02 PM, Matthieu CASTET > >>> But we didn't do stop_capture, so as far I understand the controller is > >>> still writing data in memory. What prevent us to free the buffer we are > >>> writing. > >> > >> I have not looked into this in great detail, but isn't this handled by > >> the videobuf state? The videobuf has state VIDEOBUF_ACTIVE while it is > >> in use. I don't think such a buffer is freed. > > Well from my understanding form videobuf_queue_cancel [1], we call > > buf_release on all buffer. > > Yeah, you are correct. I guess waiting for the buffer before freeing > is the correct way to do this. I guess vivi doesn't have to do this > since it's not using DMA. > > Morimoto-san, can you check the attached patch? I've tested it on my > Migo-R board together with mplayer and it seems to work well here. I > don't think using mplayer triggers this error case though, so maybe we > should try some other application. Magnus, can you, please, submit it with an Sob, after Morimoto-san has tested it with capture.c? Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html