v4l2-subdev missing video ops
Hello Hans,
I'm looking at converting the go7007 staging driver to use the subdev API. I don't see any v4l2_subdev_video_ops for VIDIOC_S_INPUT nor VIDIOC_S_STD. Were those overlooked, or should I use the generic v4l2_subdev_core_ops->ioctl? (The chip in particular does not have a tuner, but it does have multiple inputs (svidio, composite) and supports NTSC or PAL.)
Thanks.
Signature · 4 lines
Pete Eberlein Sensoray Co., Inc. Email: [email protected] http://www.sensoray.com
Quoted 4 lines · Pete Eberlein
Hello Hans,
I'm looking at converting the go7007 staging driver to use the subdev API. I don't see any
v4l2_subdev_video_opsforVIDIOC_S_INPUT
I believe you want
v4l2_subdev_video_ops.s_routing
and
v4l2_subdev_audio_ops.s_routing
to effect an input change.
Quoted 2 lines
nor
VIDIOC_S_STD.
The cx25840 module and the cx18 driver use
v4l2_subdev_tuner_ops.s_std
for the digitizer, whether or not it's a tuner input for which the standard is being set.
A quick grep in linux/drivers/media/video:
$ grep -R -B3 '\.s_std[^_]' *
shows this is likely the case for quite a driver modules.
Regards,
Andy
Quoted 7 lines
Were those overlooked, or should I use the generic
v4l2_subdev_core_ops->ioctl?
(The chip in particular does not have a
tuner, but it does have multiple inputs (svidio, composite) and supports NTSC or PAL.)Thanks.
Quoted 4 lines · On Friday 20 March 2009 00:55:20 Pete Eberlein wrote:
Hello Hans,
I'm looking at converting the go7007 staging driver to use the subdev API.
Hoorah! :-)
Quoted 5 lines
I don't see any
v4l2_subdev_video_opsforVIDIOC_S_INPUTnorVIDIOC_S_STD. Were those overlooked, or should I use the genericv4l2_subdev_core_ops->ioctl? (The chip in particular does not have a tuner, but it does have multiple inputs (svidio, composite) and supports NTSC or PAL.)
S_STD exists, but it is in tuner_ops. I know, I know, that's the wrong place. I'll move it to video_ops once all conversions are done.
S_INPUT must not be used in subdevices. S_INPUT deals with user-level inputs (e.g. "Composite", "S-Video", "Tuner"), not with the sub-device-level inputs/outputs (e.g. PIN-X, PIN-Y). Sub-devices know nothing about the user-level since that's a board-level informations. Sub-devices only know about their own input and output pins. The adapter driver is responsible for mapping an S_INPUT ioctl to video/s_routing and audio/s_routing subdev ops. These routing commands tell the sub-device on what pin(s) it receives its input data and what pin(s) are used for the output.
What values you put in the v4l2_routing struct is sub-device dependent and is defined in the include/media/<subdev>.h header.
Regards,
Hans
Signature · 1 line
Hans Verkuil - video4linux developer - sponsored by TANDBERG