summaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2017-10-06 09:50:28 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-12-18 11:57:15 -0500
commit07bf9355cab2bcfa917704fb759ec07229d3037a (patch)
tree1a30bb78a00e0fad693e4fb8ef9bfe5ef1458f6c /include/media
parent3fb558f6c3bbcc4825e9d9cbd0f8a8c02d1fca84 (diff)
downloadtalos-obmc-linux-07bf9355cab2bcfa917704fb759ec07229d3037a.tar.gz
talos-obmc-linux-07bf9355cab2bcfa917704fb759ec07229d3037a.zip
media: v4l2-subdev: fix description of tuner.s_radio ops
The description there is completely broken and it mentions an ioctl that doesn't exist. Fix it. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/v4l2-subdev.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index 5459bcf5a423..a6a9e54388e2 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -215,7 +215,10 @@ struct v4l2_subdev_core_ops {
* struct v4l2_subdev_tuner_ops - Callbacks used when v4l device was opened
* in radio mode.
*
- * @s_radio: callback for VIDIOC_S_RADIO() ioctl handler code.
+ * @s_radio: callback that switches the tuner to radio mode.
+ * drivers should explicitly call it when a tuner ops should
+ * operate on radio mode, before being able to handle it.
+ * Used on devices that have both AM/FM radio receiver and TV.
*
* @s_frequency: callback for VIDIOC_S_FREQUENCY() ioctl handler code.
*
@@ -238,6 +241,22 @@ struct v4l2_subdev_core_ops {
* @s_type_addr: sets tuner type and its I2C addr.
*
* @s_config: sets tda9887 specific stuff, like port1, port2 and qss
+ *
+ * .. note::
+ *
+ * On devices that have both AM/FM and TV, it is up to the driver
+ * to explicitly call s_radio when the tuner should be switched to
+ * radio mode, before handling other &struct v4l2_subdev_tuner_ops
+ * that would require it. An example of such usage is::
+ *
+ * static void s_frequency(void *priv, const struct v4l2_frequency *f)
+ * {
+ * ...
+ * if (f.type == V4L2_TUNER_RADIO)
+ * v4l2_device_call_all(v4l2_dev, 0, tuner, s_radio);
+ * ...
+ * v4l2_device_call_all(v4l2_dev, 0, tuner, s_frequency);
+ * }
*/
struct v4l2_subdev_tuner_ops {
int (*s_radio)(struct v4l2_subdev *sd);
OpenPOWER on IntegriCloud