ALSA: hda - Apply AMP fix in hdmi_setup_audio_infoframe() generically
authorTakashi Iwai <tiwai@suse.de>
Mon, 21 Mar 2016 11:36:44 +0000 (12:36 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 28 Mar 2016 07:38:40 +0000 (09:38 +0200)
The need for reprogramming the AMP mute bit at each audio info frame
setup isn't always specific to Intel chips.  It's safer to set it
generically for all codecs with the amp bit, as this verb execution
itself isn't too much load.  This eliminates one usage of
is_haswell_plus() macro, after all.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_hdmi.c

index 48c63fe..fcd207d 100644 (file)
@@ -683,7 +683,8 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec,
        if (!channels)
                return;
 
-       if (is_haswell_plus(codec))
+       /* some HW (e.g. HSW+) needs reprogramming the amp at each time */
+       if (get_wcaps(codec, pin_nid) & AC_WCAP_OUT_AMP)
                snd_hda_codec_write(codec, pin_nid, 0,
                                            AC_VERB_SET_AMP_GAIN_MUTE,
                                            AMP_OUT_UNMUTE);