Re: [PATCH] soc_camera_platform: add set_fmt callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 21 Jun 2010, Baruch Siach wrote:

> This allows the platform camera to arrange a change in the capture format.

Sorry, no. I don't like this. This driver is a very primitive piece of 
code, allowing you to bootstrap a camera in a most simple static way. We 
even were considering removing it from the kernel, because there's only 
one user currently in the mainline and, unfortunately, it is not very well 
maintained. So, you can use this driver as it is in the kernel now, 
bug-fixes are welcome. But if it isn't enough for you, this means you need 
a proper driver.

Thanks
Guennadi

> 
> Signed-off-by: Baruch Siach <baruch@xxxxxxxxxx>
> ---
>  drivers/media/video/soc_camera_platform.c |    3 +++
>  include/media/soc_camera_platform.h       |    2 ++
>  2 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/media/video/soc_camera_platform.c b/drivers/media/video/soc_camera_platform.c
> index 248c986..208fd42 100644
> --- a/drivers/media/video/soc_camera_platform.c
> +++ b/drivers/media/video/soc_camera_platform.c
> @@ -61,6 +61,9 @@ static int soc_camera_platform_try_fmt(struct v4l2_subdev *sd,
>  {
>  	struct soc_camera_platform_info *p = v4l2_get_subdevdata(sd);
>  
> +	if (p->try_fmt)
> +		return p->try_fmt(p, mf);
> +
>  	mf->width	= p->format.width;
>  	mf->height	= p->format.height;
>  	mf->code	= p->format.code;
> diff --git a/include/media/soc_camera_platform.h b/include/media/soc_camera_platform.h
> index 0ecefe2..0558ffc 100644
> --- a/include/media/soc_camera_platform.h
> +++ b/include/media/soc_camera_platform.h
> @@ -22,6 +22,8 @@ struct soc_camera_platform_info {
>  	struct v4l2_mbus_framefmt format;
>  	unsigned long bus_param;
>  	struct device *dev;
> +	int (*try_fmt)(struct soc_camera_platform_info *info,
> +			struct v4l2_mbus_framefmt *mf);
>  	int (*set_capture)(struct soc_camera_platform_info *info, int enable);
>  };
>  
> -- 
> 1.7.1
> 
> --
> 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
> 

---
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


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux