Hi Javier On Fri, 16 Dec 2011, Javier Martin wrote: > Some v4l-subdevs such as tvp5150 have multiple > inputs. This patch allows the user of a soc-camera > device to select between them. Sure, we can support it. But I've got a couple of remarks: First question: you probably also want to patch soc_camera_g_input() and soc_camera_enum_input(). But no, I do not know how. The video subdevice operations do not seem to provide a way to query subdevice routing capabilities, so, I've got no idea how we're supposed to support enum_input(). There is a g_input_status() method, but I'm not sure about its semantics. Would it return an error like -EINVAL on an unsupported index? Secondly, I would prefer to keep the current behaviour per default. I.e., if the subdevice doesn't implement routing- / input-related operations, we should act as before - assume input 0 and return success. Thanks Guennadi > > 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; > + 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); > } > > static int soc_camera_s_std(struct file *file, void *priv, v4l2_std_id *a) > -- > 1.7.0.4 > --- 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