aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2011-06-13 08:35:56 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-07 14:04:23 -0400
commit338e9e1ad541cbb2a3fa5839376ff6c138d40301 (patch)
tree0657639257487bc4ac5499e51e8a4083ea4de896 /drivers/media
parente206fc5e3de0e38a35b6f92941c913b6d8343fc6 (diff)
[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: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/tuner-core.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index 1843fc293322..6c007aa00236 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -1117,6 +1117,16 @@ static int tuner_s_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f)
1117 return 0; 1117 return 0;
1118} 1118}
1119 1119
1120/**
1121 * tuner_g_frequency - Get the tuned frequency for the tuner
1122 * @sd: pointer to struct v4l2_subdev
1123 * @f: pointer to struct v4l2_frequency
1124 *
1125 * At return, the structure f will be filled with tuner frequency
1126 * if the tuner matches the f->type.
1127 * Note: f->type should be initialized before calling it.
1128 * This is done by either video_ioctl2 or by the bridge driver.
1129 */
1120static int tuner_g_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f) 1130static int tuner_g_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f)
1121{ 1131{
1122 struct tuner *t = to_tuner(sd); 1132 struct tuner *t = to_tuner(sd);
@@ -1139,6 +1149,16 @@ static int tuner_g_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f)
1139 return 0; 1149 return 0;
1140} 1150}
1141 1151
1152/**
1153 * tuner_g_tuner - Fill in tuner information
1154 * @sd: pointer to struct v4l2_subdev
1155 * @vt: pointer to struct v4l2_tuner
1156 *
1157 * At return, the structure vt will be filled with tuner information
1158 * if the tuner matches vt->type.
1159 * Note: vt->type should be initialized before calling it.
1160 * This is done by either video_ioctl2 or by the bridge driver.
1161 */
1142static int tuner_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) 1162static int tuner_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
1143{ 1163{
1144 struct tuner *t = to_tuner(sd); 1164 struct tuner *t = to_tuner(sd);
@@ -1179,6 +1199,15 @@ static int tuner_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
1179 return 0; 1199 return 0;
1180} 1200}
1181 1201
1202/**
1203 * tuner_s_tuner - Set the tuner's audio mode
1204 * @sd: pointer to struct v4l2_subdev
1205 * @vt: pointer to struct v4l2_tuner
1206 *
1207 * Sets the audio mode if the tuner matches vt->type.
1208 * Note: vt->type should be initialized before calling it.
1209 * This is done by either video_ioctl2 or by the bridge driver.
1210 */
1182static int tuner_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) 1211static int tuner_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
1183{ 1212{
1184 struct tuner *t = to_tuner(sd); 1213 struct tuner *t = to_tuner(sd);