提交 338e9e1a 编写于 作者: H Hans Verkuil 提交者: Mauro Carvalho Chehab

[media] tuner-core/v4l2-subdev: document that the type field has to be filled in

The tuner ops g_frequency, g_tuner and s_tuner require that the tuner type
field is filled in. Document this.

The tuner-core doc is based on a patch from Mauro Carvalho Chehab <mchehab@redhat.com>.
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 e206fc5e
...@@ -1117,6 +1117,16 @@ static int tuner_s_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f) ...@@ -1117,6 +1117,16 @@ static int tuner_s_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f)
return 0; return 0;
} }
/**
* tuner_g_frequency - Get the tuned frequency for the tuner
* @sd: pointer to struct v4l2_subdev
* @f: pointer to struct v4l2_frequency
*
* At return, the structure f will be filled with tuner frequency
* if the tuner matches the f->type.
* Note: f->type should be initialized before calling it.
* This is done by either video_ioctl2 or by the bridge driver.
*/
static int tuner_g_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f) static int tuner_g_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f)
{ {
struct tuner *t = to_tuner(sd); struct tuner *t = to_tuner(sd);
...@@ -1139,6 +1149,16 @@ static int tuner_g_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f) ...@@ -1139,6 +1149,16 @@ static int tuner_g_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f)
return 0; return 0;
} }
/**
* tuner_g_tuner - Fill in tuner information
* @sd: pointer to struct v4l2_subdev
* @vt: pointer to struct v4l2_tuner
*
* At return, the structure vt will be filled with tuner information
* if the tuner matches vt->type.
* Note: vt->type should be initialized before calling it.
* This is done by either video_ioctl2 or by the bridge driver.
*/
static int tuner_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) static int tuner_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
{ {
struct tuner *t = to_tuner(sd); struct tuner *t = to_tuner(sd);
...@@ -1179,6 +1199,15 @@ static int tuner_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) ...@@ -1179,6 +1199,15 @@ static int tuner_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
return 0; return 0;
} }
/**
* tuner_s_tuner - Set the tuner's audio mode
* @sd: pointer to struct v4l2_subdev
* @vt: pointer to struct v4l2_tuner
*
* Sets the audio mode if the tuner matches vt->type.
* Note: vt->type should be initialized before calling it.
* This is done by either video_ioctl2 or by the bridge driver.
*/
static int tuner_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) static int tuner_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
{ {
struct tuner *t = to_tuner(sd); struct tuner *t = to_tuner(sd);
......
...@@ -175,6 +175,13 @@ struct v4l2_subdev_core_ops { ...@@ -175,6 +175,13 @@ struct v4l2_subdev_core_ops {
/* s_radio: v4l device was opened in radio mode. /* s_radio: v4l device was opened in radio mode.
g_frequency: freq->type must be filled in. Normally done by video_ioctl2
or the bridge driver.
g_tuner:
s_tuner: vt->type must be filled in. Normally done by video_ioctl2 or the
bridge driver.
s_type_addr: sets tuner type and its I2C addr. s_type_addr: sets tuner type and its I2C addr.
s_config: sets tda9887 specific stuff, like port1, port2 and qss s_config: sets tda9887 specific stuff, like port1, port2 and qss
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册