diff mbox series

[v2,3/8] ALSA: emu10k1: set the "no filtering" bits on PCM voices

Message ID 20230630144542.664190-4-oswald.buddenhagen@gmx.de
State New
Headers show
Series ALSA: emu10k1: add support for high-bitrate modes of E-MU cards | expand

Commit Message

Oswald Buddenhagen June 30, 2023, 2:45 p.m. UTC
... on Audigy, when we are not pitch-shifting.

The only observable effect is that the Z1/Z2/FXBUS registers don't have
a stray bit set for negative numbers anymore. The bit is below the ones
significant for output, but it would mess with 32-bit sample
recombination, which we are about to add.

kX-project does that, but I had to figure out myself why.

Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
---
 sound/pci/emu10k1/emupcm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/sound/pci/emu10k1/emupcm.c b/sound/pci/emu10k1/emupcm.c
index a6fb0647d80a..bd222de7ea9f 100644
--- a/sound/pci/emu10k1/emupcm.c
+++ b/sound/pci/emu10k1/emupcm.c
@@ -318,9 +318,10 @@  static void snd_emu10k1_pcm_init_voice(struct snd_emu10k1 *emu,
 		REGLIST_END);
 	// Setup routing
 	if (emu->audigy) {
+		u32 unfiltered = (evoice->epcm->pitch_target == PITCH_48000) ? 0x80808080 : 0;
 		snd_emu10k1_ptr_write_multiple(emu, voice,
-			A_FXRT1, snd_emu10k1_compose_audigy_fxrt1(send_routing),
-			A_FXRT2, snd_emu10k1_compose_audigy_fxrt2(send_routing),
+			A_FXRT1, snd_emu10k1_compose_audigy_fxrt1(send_routing) | unfiltered,
+			A_FXRT2, snd_emu10k1_compose_audigy_fxrt2(send_routing) | unfiltered,
 			A_SENDAMOUNTS, snd_emu10k1_compose_audigy_sendamounts(send_amount),
 			REGLIST_END);
 		for (int i = 0; i < 4; i++) {