diff options
| -rw-r--r-- | drivers/media/video/tuner-core.c | 29 | ||||
| -rw-r--r-- | include/media/v4l2-subdev.h | 7 |
2 files changed, 36 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 | */ | ||
| 1120 | static int tuner_g_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f) | 1130 | static 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 | */ | ||
| 1142 | static int tuner_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) | 1162 | static 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 | */ | ||
| 1182 | static int tuner_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) | 1211 | static 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); |
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index 224502067c43..2884e3e69cb1 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h | |||
| @@ -175,6 +175,13 @@ struct v4l2_subdev_core_ops { | |||
| 175 | 175 | ||
| 176 | /* s_radio: v4l device was opened in radio mode. | 176 | /* s_radio: v4l device was opened in radio mode. |
| 177 | 177 | ||
| 178 | g_frequency: freq->type must be filled in. Normally done by video_ioctl2 | ||
| 179 | or the bridge driver. | ||
| 180 | |||
| 181 | g_tuner: | ||
| 182 | s_tuner: vt->type must be filled in. Normally done by video_ioctl2 or the | ||
| 183 | bridge driver. | ||
| 184 | |||
| 178 | s_type_addr: sets tuner type and its I2C addr. | 185 | s_type_addr: sets tuner type and its I2C addr. |
| 179 | 186 | ||
| 180 | s_config: sets tda9887 specific stuff, like port1, port2 and qss | 187 | s_config: sets tda9887 specific stuff, like port1, port2 and qss |
