Skip to content

Commit b09c551

Browse files
ossilatortiwai
authored andcommitted
ALSA: emu10k1: fix capture interrupt handler unlinking
Due to two copy/pastos, closing the MIC or EFX capture device would make a running ADC capture hang due to unsetting its interrupt handler. In principle, this would have also allowed dereferencing dangling pointers, but we're actually rather thorough at disabling and flushing the ints. While it may sound like one, this actually wasn't a hypothetical bug: PortAudio will open a capture stream at startup (and close it right away) even if not asked to. If the first device is busy, it will just proceed with the next one ... thus killing a concurrent capture. Signed-off-by: Oswald Buddenhagen <[email protected]> Cc: <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent f342ac0 commit b09c551

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sound/pci/emu10k1/emupcm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,7 @@ static int snd_emu10k1_capture_mic_close(struct snd_pcm_substream *substream)
12361236
{
12371237
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
12381238

1239-
emu->capture_interrupt = NULL;
1239+
emu->capture_mic_interrupt = NULL;
12401240
emu->pcm_capture_mic_substream = NULL;
12411241
return 0;
12421242
}
@@ -1344,7 +1344,7 @@ static int snd_emu10k1_capture_efx_close(struct snd_pcm_substream *substream)
13441344
{
13451345
struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream);
13461346

1347-
emu->capture_interrupt = NULL;
1347+
emu->capture_efx_interrupt = NULL;
13481348
emu->pcm_capture_efx_substream = NULL;
13491349
return 0;
13501350
}

0 commit comments

Comments
 (0)