aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/pci/hda/patch_hdmi.c54
1 files changed, 54 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 899c4fbbfd83..54243c4a4e9d 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -1714,6 +1714,57 @@ static void intel_haswell_fixup_connect_list(struct hda_codec *codec)
1714 snd_hda_override_conn_list(codec, 0x07, 3, list); 1714 snd_hda_override_conn_list(codec, 0x07, 3, list);
1715} 1715}
1716 1716
1717#define INTEL_VENDOR_NID 0x08
1718#define INTEL_GET_VENDOR_VERB 0xf81
1719#define INTEL_SET_VENDOR_VERB 0x781
1720#define INTEL_EN_DP12 0x02 /* enable DP 1.2 features */
1721#define INTEL_EN_ALL_PIN_CVTS 0x01 /* enable 2nd & 3rd pins and convertors */
1722
1723static void intel_haswell_enable_all_pins(struct hda_codec *codec,
1724 const struct hda_fixup *fix, int action)
1725{
1726 unsigned int vendor_param;
1727
1728 if (action != HDA_FIXUP_ACT_PRE_PROBE)
1729 return;
1730 vendor_param = snd_hda_codec_read(codec, INTEL_VENDOR_NID, 0,
1731 INTEL_GET_VENDOR_VERB, 0);
1732 if (vendor_param == -1 || vendor_param & INTEL_EN_ALL_PIN_CVTS)
1733 return;
1734
1735 vendor_param |= INTEL_EN_ALL_PIN_CVTS;
1736 vendor_param = snd_hda_codec_read(codec, INTEL_VENDOR_NID, 0,
1737 INTEL_SET_VENDOR_VERB, vendor_param);
1738 if (vendor_param == -1)
1739 return;
1740
1741 snd_hda_codec_update_widgets(codec);
1742 return;
1743}
1744
1745
1746/* available models for fixup */
1747enum {
1748 INTEL_HASWELL,
1749};
1750
1751static const struct hda_model_fixup hdmi_models[] = {
1752 {.id = INTEL_HASWELL, .name = "Haswell"},
1753 {}
1754};
1755
1756static const struct snd_pci_quirk hdmi_fixup_tbl[] = {
1757 SND_PCI_QUIRK(0x8086, 0x2010, "Haswell", INTEL_HASWELL),
1758 {} /* terminator */
1759};
1760
1761static const struct hda_fixup hdmi_fixups[] = {
1762 [INTEL_HASWELL] = {
1763 .type = HDA_FIXUP_FUNC,
1764 .v.func = intel_haswell_enable_all_pins,
1765 },
1766};
1767
1717 1768
1718static int patch_generic_hdmi(struct hda_codec *codec) 1769static int patch_generic_hdmi(struct hda_codec *codec)
1719{ 1770{
@@ -1725,6 +1776,9 @@ static int patch_generic_hdmi(struct hda_codec *codec)
1725 1776
1726 codec->spec = spec; 1777 codec->spec = spec;
1727 1778
1779 snd_hda_pick_fixup(codec, hdmi_models, hdmi_fixup_tbl, hdmi_fixups);
1780 snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
1781
1728 if (codec->vendor_id == 0x80862807) 1782 if (codec->vendor_id == 0x80862807)
1729 intel_haswell_fixup_connect_list(codec); 1783 intel_haswell_fixup_connect_list(codec);
1730 1784