summaryrefslogtreecommitdiff
path: root/include/sound/emu10k1.h
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@gmx.de>2023-04-21 16:10:01 +0200
committerTakashi Iwai <tiwai@suse.de>2023-04-22 10:42:08 +0200
commita1c87c0b27059b4155c7aba6b34810c889e8b6a9 (patch)
treec058ff028e8e1e82d4d8dfc59b75f9fdf17556d9 /include/sound/emu10k1.h
parent10f212bd7a693e379154891cc16959bc4884668a (diff)
ALSA: emu10k1: fix access to Audigy GPIO port
As the register definition clearly states, this is a 16-bit register, yet we did all accesses as 32-bit. The writes in particular would have the potential to clear the TIMER register (depending on how the bus/card actually handles the too long writes). This commit also introduces a separate define A_GPIO which aliases A_IOCFG, which better reflects the distinct usage on E-MU cards. This is done in the same commit to keep the churn down, as we're touching all involved lines anyway. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230421141006.1005539-2-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound/emu10k1.h')
-rw-r--r--include/sound/emu10k1.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h
index 00c2d8cd5a8d..89dbd2e93410 100644
--- a/include/sound/emu10k1.h
+++ b/include/sound/emu10k1.h
@@ -251,11 +251,16 @@
#define MUSTAT_IRDYN 0x80 /* 0 = MIDI data or command ACK */
#define MUSTAT_ORDYN 0x40 /* 0 = MUDATA can accept a command or data */
-#define A_IOCFG 0x18 /* GPIO on Audigy card (16bits) */
+#define A_GPIO 0x18 /* GPIO on Audigy card (16bits) */
#define A_GPINPUT_MASK 0xff00
#define A_GPOUTPUT_MASK 0x00ff
+// The GPIO port is used for I/O config on Sound Blasters;
+// card-specific info can be found in the emu_chip_details table.
+// On E-MU cards the port is used as the interface to the FPGA.
+
// Audigy output/GPIO stuff taken from the kX drivers
+#define A_IOCFG A_GPIO
#define A_IOCFG_GPOUT0 0x0044 /* analog/digital */
#define A_IOCFG_DISABLE_ANALOG 0x0040 /* = 'enable' for Audigy2 (chiprev=4) */
#define A_IOCFG_ENABLE_DIGITAL 0x0004