diff options
Diffstat (limited to 'sound/pci/hda/patch_hdmi.c')
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 22b50899b151..009bcccbee7a 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
@@ -44,6 +44,8 @@ static bool static_hdmi_pcm; | |||
44 | module_param(static_hdmi_pcm, bool, 0644); | 44 | module_param(static_hdmi_pcm, bool, 0644); |
45 | MODULE_PARM_DESC(static_hdmi_pcm, "Don't restrict PCM parameters per ELD info"); | 45 | MODULE_PARM_DESC(static_hdmi_pcm, "Don't restrict PCM parameters per ELD info"); |
46 | 46 | ||
47 | #define is_haswell(codec) ((codec)->vendor_id == 0x80862807) | ||
48 | |||
47 | struct hdmi_spec_per_cvt { | 49 | struct hdmi_spec_per_cvt { |
48 | hda_nid_t cvt_nid; | 50 | hda_nid_t cvt_nid; |
49 | int assigned; | 51 | int assigned; |
@@ -1087,7 +1089,7 @@ static int hdmi_setup_stream(struct hda_codec *codec, hda_nid_t cvt_nid, | |||
1087 | int pinctl; | 1089 | int pinctl; |
1088 | int new_pinctl = 0; | 1090 | int new_pinctl = 0; |
1089 | 1091 | ||
1090 | if (codec->vendor_id == 0x80862807) | 1092 | if (is_haswell(codec)) |
1091 | haswell_verify_pin_D0(codec, cvt_nid, pin_nid); | 1093 | haswell_verify_pin_D0(codec, cvt_nid, pin_nid); |
1092 | 1094 | ||
1093 | if (snd_hda_query_pin_caps(codec, pin_nid) & AC_PINCAP_HBR) { | 1095 | if (snd_hda_query_pin_caps(codec, pin_nid) & AC_PINCAP_HBR) { |
@@ -1227,7 +1229,7 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo, | |||
1227 | mux_idx); | 1229 | mux_idx); |
1228 | 1230 | ||
1229 | /* configure unused pins to choose other converters */ | 1231 | /* configure unused pins to choose other converters */ |
1230 | if (codec->vendor_id == 0x80862807) | 1232 | if (is_haswell(codec)) |
1231 | haswell_config_cvts(codec, pin_idx, mux_idx); | 1233 | haswell_config_cvts(codec, pin_idx, mux_idx); |
1232 | 1234 | ||
1233 | snd_hda_spdif_ctls_assign(codec, pin_idx, per_cvt->cvt_nid); | 1235 | snd_hda_spdif_ctls_assign(codec, pin_idx, per_cvt->cvt_nid); |
@@ -1358,7 +1360,7 @@ static void hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll) | |||
1358 | /* Haswell-specific workaround: re-setup when the transcoder is | 1360 | /* Haswell-specific workaround: re-setup when the transcoder is |
1359 | * changed during the stream playback | 1361 | * changed during the stream playback |
1360 | */ | 1362 | */ |
1361 | if (codec->vendor_id == 0x80862807 && | 1363 | if (is_haswell(codec) && |
1362 | eld->eld_valid && !old_eld_valid && per_pin->setup) { | 1364 | eld->eld_valid && !old_eld_valid && per_pin->setup) { |
1363 | snd_hda_codec_write(codec, pin_nid, 0, | 1365 | snd_hda_codec_write(codec, pin_nid, 0, |
1364 | AC_VERB_SET_AMP_GAIN_MUTE, | 1366 | AC_VERB_SET_AMP_GAIN_MUTE, |
@@ -1405,7 +1407,7 @@ static int hdmi_add_pin(struct hda_codec *codec, hda_nid_t pin_nid) | |||
1405 | if (get_defcfg_connect(config) == AC_JACK_PORT_NONE) | 1407 | if (get_defcfg_connect(config) == AC_JACK_PORT_NONE) |
1406 | return 0; | 1408 | return 0; |
1407 | 1409 | ||
1408 | if (codec->vendor_id == 0x80862807) | 1410 | if (is_haswell(codec)) |
1409 | intel_haswell_fixup_connect_list(codec, pin_nid); | 1411 | intel_haswell_fixup_connect_list(codec, pin_nid); |
1410 | 1412 | ||
1411 | pin_idx = spec->num_pins; | 1413 | pin_idx = spec->num_pins; |
@@ -2011,7 +2013,7 @@ static int patch_generic_hdmi(struct hda_codec *codec) | |||
2011 | codec->spec = spec; | 2013 | codec->spec = spec; |
2012 | hdmi_array_init(spec, 4); | 2014 | hdmi_array_init(spec, 4); |
2013 | 2015 | ||
2014 | if (codec->vendor_id == 0x80862807) { | 2016 | if (is_haswell(codec)) { |
2015 | intel_haswell_enable_all_pins(codec, true); | 2017 | intel_haswell_enable_all_pins(codec, true); |
2016 | intel_haswell_fixup_enable_dp12(codec); | 2018 | intel_haswell_fixup_enable_dp12(codec); |
2017 | } | 2019 | } |
@@ -2022,7 +2024,7 @@ static int patch_generic_hdmi(struct hda_codec *codec) | |||
2022 | return -EINVAL; | 2024 | return -EINVAL; |
2023 | } | 2025 | } |
2024 | codec->patch_ops = generic_hdmi_patch_ops; | 2026 | codec->patch_ops = generic_hdmi_patch_ops; |
2025 | if (codec->vendor_id == 0x80862807) { | 2027 | if (is_haswell(codec)) { |
2026 | codec->patch_ops.set_power_state = haswell_set_power_state; | 2028 | codec->patch_ops.set_power_state = haswell_set_power_state; |
2027 | codec->dp_mst = true; | 2029 | codec->dp_mst = true; |
2028 | } | 2030 | } |