diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-11-17 16:30:40 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-11-17 16:41:16 +0300 |
commit | 37c4fd0db7c961145d9d1909ecab386fdf703c26 (patch) | |
tree | c721e50b664854d0caef586d37ae174bd64ef706 /sound/pci/hda/hda_bind.c | |
parent | 2c95b92ecd92e784785b1db8cccc4f0f2bfa850c (diff) | |
download | linux-37c4fd0db7c961145d9d1909ecab386fdf703c26.tar.xz |
ALSA: hda: Do disconnect jacks at codec unbind
The HD-audio codec driver remove may happen also at dynamically
unbinding during operation, hence it needs manual triggers of
snd_device_disconnect() calls, while it's missing for the jack objects
that are associated with the codec.
This patch adds the manual disconnection call for jacks when the
remove happens without card->shutdown (i.e. not under the full
removal).
Link: https://lore.kernel.org/r/20211117133040.20272-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_bind.c')
-rw-r--r-- | sound/pci/hda/hda_bind.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_bind.c b/sound/pci/hda/hda_bind.c index 7153bd53e189..c572fb5886d5 100644 --- a/sound/pci/hda/hda_bind.c +++ b/sound/pci/hda/hda_bind.c @@ -14,6 +14,7 @@ #include <sound/core.h> #include <sound/hda_codec.h> #include "hda_local.h" +#include "hda_jack.h" /* * find a matching codec id @@ -158,6 +159,7 @@ static int hda_codec_driver_remove(struct device *dev) refcount_dec(&codec->pcm_ref); snd_hda_codec_disconnect_pcms(codec); + snd_hda_jack_tbl_disconnect(codec); wait_event(codec->remove_sleep, !refcount_read(&codec->pcm_ref)); snd_power_sync_ref(codec->bus->card); |