Commit 6ffe168f822cf7f777987cddc00ade542fd73bf0
Committed by
Takashi Iwai
1 parent
b78562b10f
ALSA: hda - bug fix for invalid connection list of Haswell HDMI codec pins
Haswell HDMI codec pins may report invalid connection list entries, which will cause failure to play audio via HDMI or Display Port. So this patch adds fixup for Haswell to workaround this hardware issue: enable DP1.2 mode and override the pins' connection list entries with proper value. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Xingchao Wang <xingchao.wang@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Showing 1 changed file with 28 additions and 0 deletions Side-by-side Diff
sound/pci/hda/patch_hdmi.c
... | ... | @@ -1681,6 +1681,30 @@ |
1681 | 1681 | .unsol_event = hdmi_unsol_event, |
1682 | 1682 | }; |
1683 | 1683 | |
1684 | +static void intel_haswell_fixup_connect_list(struct hda_codec *codec) | |
1685 | +{ | |
1686 | + unsigned int vendor_param; | |
1687 | + hda_nid_t list[3] = {0x2, 0x3, 0x4}; | |
1688 | + | |
1689 | + vendor_param = snd_hda_codec_read(codec, 0x08, 0, 0xf81, 0); | |
1690 | + if (vendor_param == -1 || vendor_param & 0x02) | |
1691 | + return; | |
1692 | + | |
1693 | + /* enable DP1.2 mode */ | |
1694 | + vendor_param |= 0x02; | |
1695 | + snd_hda_codec_read(codec, 0x08, 0, 0x781, vendor_param); | |
1696 | + | |
1697 | + vendor_param = snd_hda_codec_read(codec, 0x08, 0, 0xf81, 0); | |
1698 | + if (vendor_param == -1 || !(vendor_param & 0x02)) | |
1699 | + return; | |
1700 | + | |
1701 | + /* override 3 pins connection list */ | |
1702 | + snd_hda_override_conn_list(codec, 0x05, 3, list); | |
1703 | + snd_hda_override_conn_list(codec, 0x06, 3, list); | |
1704 | + snd_hda_override_conn_list(codec, 0x07, 3, list); | |
1705 | +} | |
1706 | + | |
1707 | + | |
1684 | 1708 | static int patch_generic_hdmi(struct hda_codec *codec) |
1685 | 1709 | { |
1686 | 1710 | struct hdmi_spec *spec; |
... | ... | @@ -1690,6 +1714,10 @@ |
1690 | 1714 | return -ENOMEM; |
1691 | 1715 | |
1692 | 1716 | codec->spec = spec; |
1717 | + | |
1718 | + if (codec->vendor_id == 0x80862807) | |
1719 | + intel_haswell_fixup_connect_list(codec); | |
1720 | + | |
1693 | 1721 | if (hdmi_parse_codec(codec) < 0) { |
1694 | 1722 | codec->spec = NULL; |
1695 | 1723 | kfree(spec); |