diff options
author | Mengdong Lin <mengdong.lin@intel.com> | 2012-12-18 16:59:15 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-12-18 05:05:36 -0500 |
commit | 6ffe168f822cf7f777987cddc00ade542fd73bf0 (patch) | |
tree | 0c456b5c26f51cef736f998c428833c22fa32b91 /sound | |
parent | b78562b10fa66175e30b76073e32a0ad8d92aa83 (diff) |
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>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 37dd06dd96be..b6c21ea187ca 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
@@ -1681,6 +1681,30 @@ static const struct hda_codec_ops generic_hdmi_patch_ops = { | |||
1681 | .unsol_event = hdmi_unsol_event, | 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 | static int patch_generic_hdmi(struct hda_codec *codec) | 1708 | static int patch_generic_hdmi(struct hda_codec *codec) |
1685 | { | 1709 | { |
1686 | struct hdmi_spec *spec; | 1710 | struct hdmi_spec *spec; |
@@ -1690,6 +1714,10 @@ static int patch_generic_hdmi(struct hda_codec *codec) | |||
1690 | return -ENOMEM; | 1714 | return -ENOMEM; |
1691 | 1715 | ||
1692 | codec->spec = spec; | 1716 | codec->spec = spec; |
1717 | |||
1718 | if (codec->vendor_id == 0x80862807) | ||
1719 | intel_haswell_fixup_connect_list(codec); | ||
1720 | |||
1693 | if (hdmi_parse_codec(codec) < 0) { | 1721 | if (hdmi_parse_codec(codec) < 0) { |
1694 | codec->spec = NULL; | 1722 | codec->spec = NULL; |
1695 | kfree(spec); | 1723 | kfree(spec); |