public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/8] vb2: various cleanups and improvements
@ 2013-11-21 15:21 Hans Verkuil
  2013-11-21 15:21 ` [RFC PATCH 1/8] vb2: push the mmap semaphore down to __buf_prepare() Hans Verkuil
                   ` (7 more replies)
  0 siblings, 8 replies; 19+ messages in thread
From: Hans Verkuil @ 2013-11-21 15:21 UTC (permalink / raw)
  To: linux-media; +Cc: m.szyprowski, pawel, awalls, laurent.pinchart

This patch series does some cleanups in the qbuf/prepare_buf handling
(the first two patches). The third patch removes the 'fileio = NULL'
hack. That hack no longer works when dealing with asynchronous calls
from a kernel thread so it had to be fixed.

The next three patches implement retrying start_streaming() if there are
not enough buffers queued for the DMA engine to start. I know that there
are more drivers that can be simplified with this feature available in
the core. Those drivers do the retry of start_streaming in the buf_queue
op which frankly defeats the purpose of having a central start_streaming
op. But I leave it to the driver developers to decide whether or not to
cleanup their drivers.

The big advantage is that apps can just call STREAMON first, then start
queuing buffers without having to know the minimum number of buffers that
have to be queued before the DMA engine will kick in. It always annoyed
me that vb2 didn't take care of that for me as it is easy enough to do.

The final two patches add vb2 thread support which is necessary
for both videobuf2-dvb (the vb2 replacement of videobuf-dvb) and for e.g.
alsa drivers where you use the same trick as with dvb.

The thread implementation has been tested with both alsa recording and
playback for an internal driver (sorry, I can't share the source yet).

Andy, your patch hasn't been added to this series yet, but the patch
I mailed you in reply to your patch will apply cleanly on top of this
series.

Regards,

	Hans


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2013-11-27 10:35 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-21 15:21 [RFC PATCH 0/8] vb2: various cleanups and improvements Hans Verkuil
2013-11-21 15:21 ` [RFC PATCH 1/8] vb2: push the mmap semaphore down to __buf_prepare() Hans Verkuil
2013-11-21 19:04   ` Laurent Pinchart
2013-11-22  9:02     ` Hans Verkuil
2013-11-26 15:42       ` Laurent Pinchart
2013-11-27  7:12         ` Hans Verkuil
2013-11-27  8:37           ` Laurent Pinchart
2013-11-21 15:22 ` [RFC PATCH 2/8] vb2: simplify qbuf/prepare_buf by removing callback Hans Verkuil
2013-11-21 15:22 ` [RFC PATCH 3/8] vb2: remove the 'fileio = NULL' hack Hans Verkuil
2013-11-21 15:22 ` [RFC PATCH 4/8] vb2: retry start_streaming in case of insufficient buffers Hans Verkuil
2013-11-21 19:09   ` Laurent Pinchart
2013-11-22  8:43     ` Hans Verkuil
2013-11-26 15:46       ` Laurent Pinchart
2013-11-27  7:17         ` Hans Verkuil
2013-11-27 10:35           ` Laurent Pinchart
2013-11-21 15:22 ` [RFC PATCH 5/8] vb2: don't set index, don't start streaming for write() Hans Verkuil
2013-11-21 15:22 ` [RFC PATCH 6/8] vb2: return ENODATA in start_streaming in case of too few buffers Hans Verkuil
2013-11-21 15:22 ` [RFC PATCH 7/8] vb2: add thread support Hans Verkuil
2013-11-21 15:22 ` [RFC PATCH 8/8] vb2: Add videobuf2-dvb support Hans Verkuil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox