diff options
author | Oswald Buddenhagen <oswald.buddenhagen@gmx.de> | 2024-04-28 11:37:13 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2024-04-28 11:58:12 +0200 |
commit | f848337cd801c7106a4ec0d61765771dab2a5909 (patch) | |
tree | 18da0d15aeb280cf59dbf8581a5db4131b2a3f7f /include/sound | |
parent | 28deafd0fbdc45cc9c63bd7dd4efc35137958862 (diff) | |
download | lwn-f848337cd801c7106a4ec0d61765771dab2a5909.tar.gz lwn-f848337cd801c7106a4ec0d61765771dab2a5909.zip |
ALSA: emu10k1: move the whole GPIO event handling to the workqueue
The actual event processing was already done by workqueue items. We can
move the event dispatching there as well, rather than doing it already
in the interrupt handler callback.
This change has a rather profound "side effect" on the reliability of
the FPGA programming: once we enter programming mode, we must not issue
any snd_emu1010_fpga_{read,write}() calls until we're done, as these
would badly mess up the programming protocol. But exactly that would
happen when trying to program the dock, as that triggers GPIO interrupts
as a side effect. This is mitigated by deferring the actual interrupt
handling, as workqueue items are not re-entrant.
To avoid scheduling the dispatcher on non-events, we now explicitly
ignore GPIO IRQs triggered by "uninteresting" pins, which happens a lot
as a side effect of calling snd_emu1010_fpga_{read,write}().
Fixes: fbb64eedf5a3 ("ALSA: emu10k1: make E-MU dock monitoring interrupt-driven")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=218584
Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Message-ID: <20240428093716.3198666-4-oswald.buddenhagen@gmx.de>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/emu10k1.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h index 1af9e6819392..9cc10fab01a8 100644 --- a/include/sound/emu10k1.h +++ b/include/sound/emu10k1.h @@ -1684,8 +1684,7 @@ struct snd_emu1010 { unsigned int clock_fallback; unsigned int optical_in; /* 0:SPDIF, 1:ADAT */ unsigned int optical_out; /* 0:SPDIF, 1:ADAT */ - struct work_struct firmware_work; - struct work_struct clock_work; + struct work_struct work; }; struct snd_emu10k1 { |