diff options
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-v4l2.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c index 91c422599877..a728ca2a37d5 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c | |||
@@ -321,13 +321,39 @@ static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file, | |||
321 | 321 | ||
322 | case VIDIOC_ENUMAUDIO: | 322 | case VIDIOC_ENUMAUDIO: |
323 | { | 323 | { |
324 | /* pkt: FIXME: We are returning one "fake" input here | ||
325 | which could very well be called "whatever_we_like". | ||
326 | This is for apps that want to see an audio input | ||
327 | just to feel comfortable, as well as to test if | ||
328 | it can do stereo or sth. There is actually no guarantee | ||
329 | that the actual audio input cannot change behind the app's | ||
330 | back, but most applications should not mind that either. | ||
331 | |||
332 | Hopefully, mplayer people will work with us on this (this | ||
333 | whole mess is to support mplayer pvr://), or Hans will come | ||
334 | up with a more standard way to say "we have inputs but we | ||
335 | don 't want you to change them independent of video" which | ||
336 | will sort this mess. | ||
337 | */ | ||
338 | struct v4l2_audio *vin = arg; | ||
324 | ret = -EINVAL; | 339 | ret = -EINVAL; |
340 | if (vin->index > 0) break; | ||
341 | strncpy(vin->name, "PVRUSB2 Audio",14); | ||
342 | vin->capability = V4L2_AUDCAP_STEREO; | ||
343 | ret = 0; | ||
344 | break; | ||
325 | break; | 345 | break; |
326 | } | 346 | } |
327 | 347 | ||
328 | case VIDIOC_G_AUDIO: | 348 | case VIDIOC_G_AUDIO: |
329 | { | 349 | { |
330 | ret = -EINVAL; | 350 | /* pkt: FIXME: see above comment (VIDIOC_ENUMAUDIO) */ |
351 | struct v4l2_audio *vin = arg; | ||
352 | memset(vin,0,sizeof(*vin)); | ||
353 | vin->index = 0; | ||
354 | strncpy(vin->name, "PVRUSB2 Audio",14); | ||
355 | vin->capability = V4L2_AUDCAP_STEREO; | ||
356 | ret = 0; | ||
331 | break; | 357 | break; |
332 | } | 358 | } |
333 | 359 | ||