Hi,
This is taken from oss driver. It is not tested (I don't own receiver). Can someone try it, maybe this works, I don't know.
Audigy.conf - copy this to /usr/share/alsa/cards/ and overwrite old one (make backup).
emu10k1.h.patch - patch for file alsa-driver/alsa- kernel/include/emu10k1.h
emufx.c.patch - patch for file alsa-driver/alsa- kernel/pci/emu10k1/emufx.c
Do NOT comment out the following lines.
If this doesn't work try to comment out lines
A_OP(icode, &ptr, iSKIP, A_GPR_COND, A_GPR_COND, A_GPR(gpr - 2), A_C_00000001);
A_OP(icode, &ptr, iACC3, A_GPR(tmp + 2), A_C_00000000, A_C_00010000, A_GPR(tmp + 2));
And if this doesn't work too, then delete this mail.
Peter Zubaj
Your patch works up to a point. It will only work on the Audigy, and not the Audigy2. The Audigy and Audigy2 do things slighly differently. The L and R channels are reversed on the Audigy2, so I have compensated for this by using a different routing in Audigy2.conf.
If you add my patches, this will work with both the Audigy and Audigy2. :-)
emu10k1.c.patch - patch for file alsa-driver/alsa-kernel/pci/emu10k1/emu10k1.c (So that is looks for Audigy2.conf)
Audigy2.conf - copy this to /usr/share/alsa/cards/ (It is a new file)
Summary: - If one combines pzad's patch with my own, we have AC3 passthru working on all SB cards. SB Live (Worked before), SB Audigy (with pzas's patch) and SB Audigy2 (with my patch).
Please check these into the alsa-kernel cvs.
Cheers James
# # Configuration for the Audigy2 chip #
<confdir:pcm/front.conf> Audigy2.pcm.front.0 { @args [ CARD ] @args.CARD { type string } type hw card $CARD device 0 } <confdir:pcm/rear.conf> Audigy2.pcm.rear.0 { @args [ CARD ] @args.CARD { type string } type hooks slave.pcm { type hw card $CARD device 0 } hooks.0 { type ctl_elems hook_args [ { name "Wave Surround Playback Volume" preserve true lock true value [ 0 0 ] } { name "EMU10K1 PCM Send Volume" index { @func private_pcm_subdevice } lock true value [ 0 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 255 0 0 0 0 ] } ] } } <confdir:pcm/center_lfe.conf> Audigy2.pcm.center_lfe.0 { @args [ CARD ] @args.CARD { type string } type hooks slave.pcm { type hw card $CARD device 0 } hooks.0 { type ctl_elems hook_args [ { name "Wave Center Playback Volume" preserve true lock true value 0 } { name "Wave LFE Playback Volume" preserve true lock true value 0 } { name "EMU10K1 PCM Send Volume" index { @func private_pcm_subdevice } lock true value [ 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 ] } { name "EMU10K1 PCM Send Routing" index { @func private_pcm_subdevice } lock true value [ 0 1 2 3 0 0 0 0 6 7 0 1 0 0 0 0 6 7 0 1 0 0 0 0 ] } ] } } <confdir:pcm/surround40.conf> Audigy2.pcm.surround40.0 { @args [ CARD ] @args.CARD { type string } type multi slaves [ { pcm { @func concat strings [ "cards.Audigy2.pcm.front.0:CARD=" $CARD ] } channels 2 } { pcm { @func concat strings [ "cards.Audigy2.pcm.rear.0:CARD=" $CARD ] } channels 2 } ] bindings [ { slave 0 channel 0 } { slave 0 channel 1 } { slave 1 channel 0 } { slave 1 channel 1 } ] } <confdir:pcm/surround51.conf> Audigy2.pcm.surround51.0 { @args [ CARD ] @args.CARD { type string } type multi slaves [ { pcm { @func concat strings [ "cards.Audigy2.pcm.front.0:CARD=" $CARD ] } channels 2 } { pcm { @func concat strings [ "cards.Audigy2.pcm.rear.0:CARD=" $CARD ] } channels 2 } { pcm { @func concat strings [ "cards.Audigy2.pcm.center_lfe.0:CARD=" $CARD ] } channels 2 } ] bindings [ { slave 0 channel 0 } { slave 0 channel 1 } { slave 1 channel 0 } { slave 1 channel 1 } { slave 2 channel 0 } { slave 2 channel 1 } ] } <confdir:pcm/iec958.conf> Audigy2.pcm.iec958.0 { @args [ CARD AES0 AES1 AES2 AES3 ] @args.CARD { type string } @args.AES0 { type integer } @args.AES1 { type integer } @args.AES2 { type integer } @args.AES3 { type integer } type hooks slave.pcm { type hw card $CARD device 0 } hooks.0 { type ctl_elems hook_args [ { name "IEC958 Playback Default" lock true preserve true value [ $AES0 $AES1 $AES2 $AES3 ] } { name "IEC958 Optical Raw Playback Switch" lock true preserve true value [ 1 1 ] } { name "EMU10K1 PCM Send Volume" index { @func private_pcm_subdevice } lock true value [ 0 0 0 0 0 0 0 0 0 255 0 0 0 0 0 0 255 0 0 0 0 0 0 0 ] } { name "EMU10K1 PCM Send Routing" index { @func private_pcm_subdevice } lock true value [ 0 1 2 3 0 0 0 0 20 21 0 1 0 0 0 0 20 21 0 1 0 0 0 0 ] } { name "Audigy Analog/Digital Output Jack" lock true preserve true value 1 } ] } }
--- emu10k1.c.org 2003-08-28 20:54:29.670139952 +0100 +++ emu10k1.c 2003-08-28 21:09:00.942686392 +0100 @@ -170,7 +170,10 @@ } #endif - if (emu->audigy) { + if (emu->audigy && (emu->revision == 4) ) { + strcpy(card->driver, "Audigy2"); + strcpy(card->shortname, "Sound Blaster Audigy2"); + } else if (emu->audigy) { strcpy(card->driver, "Audigy"); strcpy(card->shortname, "Sound Blaster Audigy"); } else if (emu->APS) {