ALSA: hda/hdmi - Clear codec->relaxed_resume flag at unbinding
authorTakashi Iwai <tiwai@suse.de>
Fri, 22 Nov 2019 13:26:24 +0000 (14:26 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 22 Nov 2019 13:34:00 +0000 (14:34 +0100)
The HDMI codec may leave codec->relaxed_resume flag set even after
unbinding.  Clear it unconditionally.

It's very unlikely that this actually matters in the real use case,
so just a fix for consistency.

Fixes: ade49db337a9 ("ALSA: hda/hdmi - Allow audio component for AMD/ATI and Nvidia HDMI")
Link: https://lore.kernel.org/r/20191122132624.5482-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_hdmi.c

index 9063bf88689f383707beceea5e972e98615b6e89..bffde594e2040e1e97a4cd8413550bdaa433b7fd 100644 (file)
@@ -2361,8 +2361,8 @@ static void generic_hdmi_free(struct hda_codec *codec)
                snd_hdac_acomp_exit(&codec->bus->core);
        } else if (codec_has_acomp(codec)) {
                snd_hdac_acomp_register_notifier(&codec->bus->core, NULL);
-               codec->relaxed_resume = 0;
        }
+       codec->relaxed_resume = 0;
 
        for (pin_idx = 0; pin_idx < spec->num_pins; pin_idx++) {
                struct hdmi_spec_per_pin *per_pin = get_pin(spec, pin_idx);