Ticket #1608: ac3-pass-thru-patch

File ac3-pass-thru-patch, 947 bytes (added by msc@…, 19 years ago)

Patch to SVN Revision

Line 
1Index: libs/libmyth/audiooutputalsa.cpp
2===================================================================
3--- libs/libmyth/audiooutputalsa.cpp    (Revision 9580)
4+++ libs/libmyth/audiooutputalsa.cpp    (Arbeitskopie)
5@@ -46,8 +46,17 @@
6     numbadioctls = 0;
7 
8     QString real_device = audiodevice;
9-    if (audio_passthru)
10-        real_device.append(":{ AES0 0x02 }");
11+
12+   //proper ac3 pass thru setup. (taken from mplayer)
13+    if (audio_passthru) {
14+      real_device.sprintf("iec958:{CARD 0 AES0 0x%02x AES1 0x%02x AES2 0x%02x AES3 0x%02x}",
15+          IEC958_AES0_NONAUDIO | IEC958_AES0_CON_EMPHASIS_NONE,
16+          IEC958_AES1_CON_ORIGINAL | IEC958_AES1_CON_PCM_CODER,
17+          0,
18+          IEC958_AES3_CON_FS_48000);
19+      VERBOSE(VB_AUDIO, QString("Opening audio for AC3 PassThru with %1").arg(real_device));
20+    }
21+
22     
23     err = snd_pcm_open(&pcm_handle, real_device,
24           SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK);