diff options
author | Pantelis Koukousoulas <pakt223@freemail.gr> | 2007-01-19 23:57:36 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-02-21 10:34:42 -0500 |
commit | 848ed3ca2a4eb85d6c6bde2a1b254b1f4c658e02 (patch) | |
tree | 4452cfc77e6bc4e2b89362a9f4141c47592e1778 /drivers | |
parent | 606cf9caeb3b908426757924bfdce85cb854aa81 (diff) |
V4L/DVB (5094): Pvrusb2: Introduce fake audio input selection
This should allow mplayer pvr:// to start. The trick is that no matter
what actual input we use under this "fake" one, it will be able to do
stereo :-)
Signed-off-by: Pantelis Koukousoulas <pakt223@freemail.gr>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
-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 | ||