Re: [PATCH] V4L: soc-camera: provide support for S_INPUT.

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

 



On 16 December 2011 09:34, Scott Jiang <scott.jiang.linux@xxxxxxxxx> wrote:
> 2011/12/16 Javier Martin <javier.martin@xxxxxxxxxxxxxxxxx>:
>> Some v4l-subdevs such as tvp5150 have multiple
>> inputs. This patch allows the user of a soc-camera
>> device to select between them.
>>
>> Signed-off-by: Javier Martin <javier.martin@xxxxxxxxxxxxxxxxx>
>> ---
>>  drivers/media/video/soc_camera.c |    6 +++---
>>  1 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c
>> index b72580c..1cea1a9 100644
>> --- a/drivers/media/video/soc_camera.c
>> +++ b/drivers/media/video/soc_camera.c
>> @@ -235,10 +235,10 @@ static int soc_camera_g_input(struct file *file, void *priv, unsigned int *i)
>>
>>  static int soc_camera_s_input(struct file *file, void *priv, unsigned int i)
>>  {
>> -       if (i > 0)
>> -               return -EINVAL;
> should it check max input?
>
>> +       struct soc_camera_device *icd = file->private_data;
>> +       struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
>>
>> -       return 0;
>> +       return v4l2_subdev_call(sd, video, s_routing, i, 0, 0);
>>  }
>>
> why must output be zero?

Current behavior of soc-camera is not touching output at all, but
s_routing() callback enforces to select both input and output values.
The more neutral value I could think of for output is 0. Of course any
other suggestions are welcome.


-- 
Javier Martin
Vista Silicon S.L.
CDTUC - FASE C - Oficina S-345
Avda de los Castros s/n
39005- Santander. Cantabria. Spain
+34 942 25 32 60
www.vista-silicon.com
--
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