ALSA: hda: Do disconnect jacks at codec unbind
[platform/kernel/linux-rpi.git] / sound / pci / hda / hda_bind.c
index 7153bd5..c572fb5 100644 (file)
@@ -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);