From: James Courtier-Dutton <James@superbug.co.uk>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel <alsa-devel@lists.sourceforge.net>
Subject: Re: [PATCH] Fixes AC3 output on Audigy2 sound cards.
Date: Mon, 21 Mar 2005 21:26:29 +0000 [thread overview]
Message-ID: <423F3C05.3010100@superbug.co.uk> (raw)
In-Reply-To: <s5hacow4w4b.wl@alsa2.suse.de>
[-- Attachment #1: Type: text/plain, Size: 756 bytes --]
Takashi Iwai wrote:
> At Sat, 19 Mar 2005 14:03:26 +0000,
> James Courtier-Dutton wrote:
>
>>Hi,
>>
>>This patch adds a DSP patch to fix an spdif_bug on some Audigy2 cards.
>>It also does detailed identification of the capabilities of the sound
>>card so that the patch is only applied to the sound cards that really
>>need it.
>>
>>Signed off: James Courtier-Dutton
>
>
> The patch seems to have both this change and the addition of
> capabilities selection. Could you split into two patches?
>
>
> thanks,
>
> Takashi
>
>
Patch must be applied after the "[PATCH] Add framework for better audigy
sound card capabilities selection." one.
Signoff: James Courtier-Dutton
This patch adds a DSP patch to fix an spdif_bug on some Audigy2 cards.
[-- Attachment #2: ac3-fix.diff.txt --]
[-- Type: text/plain, Size: 1672 bytes --]
Index: alsa-driver/alsa-kernel/pci/emu10k1/emufx.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/emu10k1/emufx.c,v
retrieving revision 1.69
diff -u -r1.69 emufx.c
--- alsa-driver/alsa-kernel/pci/emu10k1/emufx.c 17 Feb 2005 14:51:52 -0000 1.69
+++ alsa-driver/alsa-kernel/pci/emu10k1/emufx.c 21 Mar 2005 21:23:37 -0000
@@ -1339,6 +1339,7 @@
/* A_PUT_STEREO_OUTPUT(A_EXTOUT_FRONT_L, A_EXTOUT_FRONT_R, playback + SND_EMU10K1_PLAYBACK_CHANNELS); */
/* IEC958 Optical Raw Playback Switch */
+ gpr_map[gpr++] = 0;
gpr_map[gpr++] = 0x1008;
gpr_map[gpr++] = 0xffff0000;
for (z = 0; z < 2; z++) {
@@ -1349,7 +1350,14 @@
A_SWITCH(icode, &ptr, tmp + 0, tmp + 2, gpr + z);
A_SWITCH_NEG(icode, &ptr, tmp + 1, gpr + z);
A_SWITCH(icode, &ptr, tmp + 1, playback + SND_EMU10K1_PLAYBACK_CHANNELS + z, tmp + 1);
- A_OP(icode, &ptr, iACC3, A_EXTOUT(A_EXTOUT_FRONT_L + z), A_GPR(tmp + 0), A_GPR(tmp + 1), A_C_00000000);
+ if ((z==1) && (emu->card_capabilities->spdif_bug)) {
+ /* Due to a SPDIF output bug on some Audigy cards, this code delays the Right channel by 1 sample */
+ snd_printk("Installing spdif_bug patch: %s\n", emu->card_capabilities->name);
+ A_OP(icode, &ptr, iACC3, A_EXTOUT(A_EXTOUT_FRONT_L + z), A_GPR(gpr - 3), A_C_00000000, A_C_00000000);
+ A_OP(icode, &ptr, iACC3, A_GPR(gpr - 3), A_GPR(tmp + 0), A_GPR(tmp + 1), A_C_00000000);
+ } else {
+ A_OP(icode, &ptr, iACC3, A_EXTOUT(A_EXTOUT_FRONT_L + z), A_GPR(tmp + 0), A_GPR(tmp + 1), A_C_00000000);
+ }
}
snd_emu10k1_init_stereo_onoff_control(controls + nctl++, "IEC958 Optical Raw Playback Switch", gpr, 0);
gpr += 2;
next prev parent reply other threads:[~2005-03-21 21:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-19 14:03 [PATCH] Fixes AC3 output on Audigy2 sound cards James Courtier-Dutton
2005-03-21 19:49 ` Takashi Iwai
2005-03-21 21:26 ` James Courtier-Dutton [this message]
2005-03-22 20:59 ` Takashi Iwai
2005-03-23 20:46 ` James Courtier-Dutton
2005-03-24 11:24 ` Takashi Iwai
2005-03-24 15:00 ` Takashi Iwai
2005-03-24 13:54 ` Thierry Vignaud
2005-03-24 22:16 ` James Courtier-Dutton
2005-03-24 23:47 ` Thierry Vignaud
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=423F3C05.3010100@superbug.co.uk \
--to=james@superbug.co.uk \
--cc=alsa-devel@lists.sourceforge.net \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox