Skip to contentSkip to conversation

v4l2-subdev missing video ops

DISCUSSION Pete Eberlein 3 participants 3 messages Mar 19, 2009 – Mar 20, 2009 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

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
#1 lore raw
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_ops for VIDIOC_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.

#2 lore raw
In reply to Pete Eberlein
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_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.)

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