From 6fb861bb3caf2ca8e440f7a3fdcca35fcac917b4 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Sat, 22 Apr 2023 15:24:30 +0200 Subject: ALSA: emu10k1: fix snd_emu1010_fpga_read() input masking for rev2 cards Unlike the Alice2 chips used on 1st generation E-MU cards, the Tina/Tina2 chips used on the 2nd gen cards have only six GPIN pins, which means that we need to use a smaller mask. Failure to do so would falsify the read data if the FPGA tried to raise an IRQ right at that moment. This wasn't a problem so far, as we didn't actually enable FPGA IRQs, but that's going to change soon. Signed-off-by: Oswald Buddenhagen Link: https://lore.kernel.org/r/20230422132430.1057490-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai --- include/sound/emu10k1.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/sound') diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h index f21441cda6b9..790dedd42340 100644 --- a/include/sound/emu10k1.h +++ b/include/sound/emu10k1.h @@ -252,7 +252,8 @@ #define MUSTAT_ORDYN 0x40 /* 0 = MUDATA can accept a command or data */ #define A_GPIO 0x18 /* GPIO on Audigy card (16bits) */ -#define A_GPINPUT_MASK 0xff00 +#define A_GPINPUT_MASK 0xff00 /* Alice/2 has 8 input pins */ +#define A3_GPINPUT_MASK 0x3f00 /* ... while Tina/2 has only 6 */ #define A_GPOUTPUT_MASK 0x00ff // The GPIO port is used for I/O config on Sound Blasters; -- cgit v1.2.3