diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-01-25 13:10:31 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-02-21 10:34:56 -0500 |
commit | 676b0ac7aa409d326d92ca46c65bba20bebb3c1c (patch) | |
tree | 158ccf040e0c051afefba31fbb908e170dc41db8 | |
parent | 140dcc46ede8dcd9032bbe0ce52eb4df104a1ab0 (diff) |
V4L/DVB (5151): Implement VIDIOC_[GS]_AUDIO on aztech
v4l1-compat requires those two ioctls to translate VIDIOC[SG]RADIO
into V4L2 calls.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r-- | drivers/media/radio/radio-aztech.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/media/radio/radio-aztech.c b/drivers/media/radio/radio-aztech.c index 91d69c8ad3cd..9bf25820169b 100644 --- a/drivers/media/radio/radio-aztech.c +++ b/drivers/media/radio/radio-aztech.c | |||
@@ -226,6 +226,26 @@ static int vidioc_s_tuner (struct file *file, void *priv, | |||
226 | return 0; | 226 | return 0; |
227 | } | 227 | } |
228 | 228 | ||
229 | static int vidioc_g_audio (struct file *file, void *priv, | ||
230 | struct v4l2_audio *a) | ||
231 | { | ||
232 | if (a->index > 1) | ||
233 | return -EINVAL; | ||
234 | |||
235 | strcpy(a->name, "Radio"); | ||
236 | a->capability = V4L2_AUDCAP_STEREO; | ||
237 | return 0; | ||
238 | } | ||
239 | |||
240 | static int vidioc_s_audio (struct file *file, void *priv, | ||
241 | struct v4l2_audio *a) | ||
242 | { | ||
243 | if (a->index != 0) | ||
244 | return -EINVAL; | ||
245 | |||
246 | return 0; | ||
247 | } | ||
248 | |||
229 | static int vidioc_s_frequency (struct file *file, void *priv, | 249 | static int vidioc_s_frequency (struct file *file, void *priv, |
230 | struct v4l2_frequency *f) | 250 | struct v4l2_frequency *f) |
231 | { | 251 | { |
@@ -326,6 +346,8 @@ static struct video_device aztech_radio= | |||
326 | .vidioc_querycap = vidioc_querycap, | 346 | .vidioc_querycap = vidioc_querycap, |
327 | .vidioc_g_tuner = vidioc_g_tuner, | 347 | .vidioc_g_tuner = vidioc_g_tuner, |
328 | .vidioc_s_tuner = vidioc_s_tuner, | 348 | .vidioc_s_tuner = vidioc_s_tuner, |
349 | .vidioc_g_audio = vidioc_g_audio, | ||
350 | .vidioc_s_audio = vidioc_s_audio, | ||
329 | .vidioc_g_frequency = vidioc_g_frequency, | 351 | .vidioc_g_frequency = vidioc_g_frequency, |
330 | .vidioc_s_frequency = vidioc_s_frequency, | 352 | .vidioc_s_frequency = vidioc_s_frequency, |
331 | .vidioc_queryctrl = vidioc_queryctrl, | 353 | .vidioc_queryctrl = vidioc_queryctrl, |