Re: [media] soc_camera: suggest to postpone applying default format
Hi Jiaquan
On Mon, 11 Jun 2012, Su Jiaquan wrote:
> Hi Guennadi,
>
> I found in soc_camera when video device is opened, default
> format is applied sensor. I think this is the right thing to do, be it
> also means a lot of i2c transactions.
It doesn't have to actually. It is up to the sensor (or any other client)
driver to decide whether to apply requested formats immediately or only
check and store them internally. Then the driver can decide to actually
apply them only at STREAMON time. Doing this would also make the client
driver better suitable to work outside of the soc-camera framework, where
it will be expected to preserve its configuration across open() / close()
cycles, possibly, without its .s_mbus_fmt() being called.
So, I would rather suggest to fix individual client drivers one by one
instead of changing the soc-camera core, which would immediately affect
all related drivers.
Thanks
Guennadi
> I think in case of app wants to query drivers capability, it do a
> quick “open-query-close”, expecting only to get some information
> rather than really configuring camera. So maybe this is a point that
> can be optimize.
>
> Have you consider postpone it to some point later, how about, say,
> before stream_on? At that point we can check if VIDIOC_S_FMT is
> called, if yes, we do nothing, if no, we can configure the default
> format.
>
> I simply move some code from soc_camera_open() to
> soc_camera_set_fmt(), just a few changes, do you think it OK to make
> this adjustment?
>
> Thanks!
> Jiaquan
>
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
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
[Linux Input]
[Video for Linux]
[Mplayer Users]
[Linux USB Devel]
[Linux Audio Users]
[Photos]
[Yosemite Photos]
[Linux Kernel]
[Linux SCSI]
[XFree86]
[Devices]
[Yosemite Backpacking]