diff options
-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); |