[media] hdpvr: use AC3 as default audio codec for SPDIF
authorJanne Grunau <j@jannau.net>
Tue, 27 Jul 2010 13:40:43 +0000 (10:40 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 21 Oct 2010 09:56:04 +0000 (07:56 -0200)
Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/hdpvr/hdpvr-core.c

index d75fe5582f2676d498bb0383fccc571673c2618d..0ad33c08bfdd7d5238bafafea4ce030622e13b5d 100644 (file)
@@ -326,8 +326,12 @@ static int hdpvr_probe(struct usb_interface *interface,
        if (default_video_input < HDPVR_VIDEO_INPUTS)
                dev->options.video_input = default_video_input;
 
-       if (default_audio_input < HDPVR_AUDIO_INPUTS)
+       if (default_audio_input < HDPVR_AUDIO_INPUTS) {
                dev->options.audio_input = default_audio_input;
+               if (default_audio_input == HDPVR_SPDIF)
+                       dev->options.audio_codec =
+                               V4L2_MPEG_AUDIO_ENCODING_AC3;
+       }
 
        dev->udev = usb_get_dev(interface_to_usbdev(interface));