Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: emu10k1: set the "no filtering" bits on PCM voices on Audigy

Given that the filter is already set to neutral for PCM voices, 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 intend to add.

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

Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Link: https://lore.kernel.org/r/20230715160802.326872-1-oswald.buddenhagen@gmx.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Oswald Buddenhagen and committed by
Takashi Iwai
c435d375 c960b012

+7 -4
+7 -4
include/sound/emu10k1.h
··· 902 902 #define A_TTDA 0x7a /* Tank Table DMA Address */ 903 903 #define A_TTDD 0x7b /* Tank Table DMA Data */ 904 904 905 + // In A_FXRT1 & A_FXRT2, the 0x80 bit of each byte completely disables the 906 + // filter (CVCF_CURRENTFILTER) for the corresponding channel. There is no 907 + // effect on the volume (CVCF_CURRENTVOLUME) or the interpolator's filter 908 + // (CCCA_INTERPROM_MASK). 909 + 905 910 #define A_FXRT2 0x7c 906 911 #define A_FXRT_CHANNELE 0x0000003f /* Effects send bus number for channel's effects send E */ 907 912 #define A_FXRT_CHANNELF 0x00003f00 /* Effects send bus number for channel's effects send F */ ··· 919 914 #define A_FXSENDAMOUNT_G_MASK 0x0000FF00 920 915 #define A_FXSENDAMOUNT_H_MASK 0x000000FF 921 916 922 - /* 0x7c, 0x7e "high bit is used for filtering" */ 923 - 924 917 /* The send amounts for this one are the same as used with the emu10k1 */ 925 918 #define A_FXRT1 0x7e 926 919 #define A_FXRT_CHANNELA 0x0000003f ··· 1529 1526 ((route[0] | (route[1] << 4) | (route[2] << 8) | (route[3] << 12)) << 16) 1530 1527 1531 1528 #define snd_emu10k1_compose_audigy_fxrt1(route) \ 1532 - ((unsigned int)route[0] | ((unsigned int)route[1] << 8) | ((unsigned int)route[2] << 16) | ((unsigned int)route[3] << 24)) 1529 + ((unsigned int)route[0] | ((unsigned int)route[1] << 8) | ((unsigned int)route[2] << 16) | ((unsigned int)route[3] << 24) | 0x80808080) 1533 1530 1534 1531 #define snd_emu10k1_compose_audigy_fxrt2(route) \ 1535 - ((unsigned int)route[4] | ((unsigned int)route[5] << 8) | ((unsigned int)route[6] << 16) | ((unsigned int)route[7] << 24)) 1532 + ((unsigned int)route[4] | ((unsigned int)route[5] << 8) | ((unsigned int)route[6] << 16) | ((unsigned int)route[7] << 24) | 0x80808080) 1536 1533 1537 1534 #define snd_emu10k1_compose_audigy_sendamounts(vol) \ 1538 1535 (((unsigned int)vol[4] << 24) | ((unsigned int)vol[5] << 16) | ((unsigned int)vol[6] << 8) | (unsigned int)vol[7])