On Tue, 21 Jun 2011 18:07:03 +0200
Marek Szyprowski <m.szyprow...@samsung.com> wrote:

> I have an idea to introduce a new flags to let device driver tell vb2
> weather it supports 'streaming without buffers' or not. This way the
> order of operations in vb2_streamon() function can be switched and vb2
> can also return an error if one will try to enable streaming on device
> that cannot do it without buffers pre-queued.

Do you really need a flag?  If a driver absolutely cannot stream without
buffers queued (and can't be fixed to start streaming for real when the
buffers show up) it should just return -EINVAL from start_streaming() or
some such.  The driver must be aware of its limitations regardless, but
there's no need to push that awareness into vb2 as well.

(FWIW, I wouldn't switch the order of operations in vb2_streamon(); I
would just take out the "if (q->streaming)" test at the end of vb2_qbuf()
and pass the buffers through directly.  But maybe that's just me.)

Thanks,

jon
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to