Skip to content

Commit 3f100f5

Browse files
crojewsk-inteltiwai
authored andcommitted
ALSA: hda: Ignore unsol events for cards being shut down
For the classic snd_hda_intel driver, codec->card and bus->card point to the exact same thing. When snd_card_diconnect() fires, bus->shutdown is set thanks to azx_dev_disconnect(). card->shutdown is already set when that happens but both provide basically the same functionality. For the DSP snd_soc_avs driver where multiple codecs are located on multiple cards, bus->shutdown 'shortcut' is not sufficient. One codec card may be unregistered while other codecs are still operational. Proper check in form of card->shutdown must be used to verify whether the codec's card is being shut down. Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20250530141309.2943404-1-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent ab72bfc commit 3f100f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/pci/hda/hda_bind.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static void hda_codec_unsol_event(struct hdac_device *dev, unsigned int ev)
4444
struct hda_codec *codec = container_of(dev, struct hda_codec, core);
4545

4646
/* ignore unsol events during shutdown */
47-
if (codec->bus->shutdown)
47+
if (codec->card->shutdown || codec->bus->shutdown)
4848
return;
4949

5050
/* ignore unsol events during system suspend/resume */

0 commit comments

Comments
 (0)