On Tuesday, February 22, 2011 17:39:25 Guennadi Liakhovetski wrote: > On Tue, 22 Feb 2011, Hans Verkuil wrote: > > > > Hi > > > > > > Any thoughts about the subj? Hasn't anyone run into a need to select > > > inputs on subdevices until now? Something like > > > > > > struct v4l2_subdev_video_ops { > > > ... > > > int (*enum_input)(struct v4l2_subdev *sd, struct v4l2_input *inp); > > > int (*g_input)(struct v4l2_subdev *sd, unsigned int *i); > > > int (*s_input)(struct v4l2_subdev *sd, unsigned int i); > > > > That's done through s_routing. Subdevices know nothing about inputs as > > shown to userspace. > > > > If you want a test pattern, then the host driver needs to add a "Test > > Pattern" input and call s_routing with the correct values (specific to > > that subdev) to set it up. > > Hm, maybe I misunderstood something, but if we understand "host" in the > same way, then this doesn't seem very useful to me. What shall the host > have to do with various sensor inputs? It cannot know, whether the sensor > has a test-pattern "input" and if yes - how many of them. Many sensors > have several such patterns, and, I think, some of them also have some > parameters, like colour values, etc., which we don't have anything to map > to. But even without that - some sensors have several test patterns, which > they well might want to be able to switch between by presenting not just > one but several test inputs. So, shouldn't we have some enum_routing or > something for them? What you really want is to select a test pattern. A good solution would be to create a sensor menu control with all the test patterns it supports. Regards, Hans > > Feel free to re-add the ML to CC. > > Thanks > Guennadi > > > The saa7127 subdev does something like this (see include/media/saa7127.h). > > The ivtv host driver only selects this during firmware load, though. It's > > not mapped to a user input. > > > > Regards, > > > > Hans > > > > > > > > For example, we discussed implementing sensor test patterns as separate > > > inputs. > > > > > > Thanks > > > Guennadi > > > --- > > > 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 > > > > > > > > > --- > Guennadi Liakhovetski, Ph.D. > Freelance Open-Source Software Developer > http://www.open-technology.de/ > -- Hans Verkuil - video4linux developer - sponsored by Cisco -- 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