aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorLibin Yang <libin.yang@intel.com>2014-08-19 04:20:12 -0400
committerTakashi Iwai <tiwai@suse.de>2014-08-19 04:24:46 -0400
commitca2e7224d7e7d424e69616634f90f3f428710085 (patch)
treeca2df01cd97cb968fcbd52d0b09fcb33f1beadfb /sound/pci
parentd35f64e748e7752a5a60b1c7798cece51d19a213 (diff)
ALSA: hda/hdmi - apply Valleyview fix-ups to Cherryview display codec
Valleyview and Cherryview have the same behavior on display audio. So this patch defines is_valleyview_plus() to include codecs for both Valleyview and its successor Cherryview, and apply Valleyview fix-ups to Cherryview. Signed-off-by: Libin Yang <libin.yang@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_hdmi.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 5e229f7eaf24..99d7d7fecaad 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -50,6 +50,8 @@ MODULE_PARM_DESC(static_hdmi_pcm, "Don't restrict PCM parameters per ELD info");
50#define is_haswell_plus(codec) (is_haswell(codec) || is_broadwell(codec)) 50#define is_haswell_plus(codec) (is_haswell(codec) || is_broadwell(codec))
51 51
52#define is_valleyview(codec) ((codec)->vendor_id == 0x80862882) 52#define is_valleyview(codec) ((codec)->vendor_id == 0x80862882)
53#define is_cherryview(codec) ((codec)->vendor_id == 0x80862883)
54#define is_valleyview_plus(codec) (is_valleyview(codec) || is_cherryview(codec))
53 55
54struct hdmi_spec_per_cvt { 56struct hdmi_spec_per_cvt {
55 hda_nid_t cvt_nid; 57 hda_nid_t cvt_nid;
@@ -1459,7 +1461,7 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo,
1459 mux_idx); 1461 mux_idx);
1460 1462
1461 /* configure unused pins to choose other converters */ 1463 /* configure unused pins to choose other converters */
1462 if (is_haswell_plus(codec) || is_valleyview(codec)) 1464 if (is_haswell_plus(codec) || is_valleyview_plus(codec))
1463 intel_not_share_assigned_cvt(codec, per_pin->pin_nid, mux_idx); 1465 intel_not_share_assigned_cvt(codec, per_pin->pin_nid, mux_idx);
1464 1466
1465 snd_hda_spdif_ctls_assign(codec, pin_idx, per_cvt->cvt_nid); 1467 snd_hda_spdif_ctls_assign(codec, pin_idx, per_cvt->cvt_nid);
@@ -1598,7 +1600,8 @@ static bool hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll)
1598 * and this can make HW reset converter selection on a pin. 1600 * and this can make HW reset converter selection on a pin.
1599 */ 1601 */
1600 if (eld->eld_valid && !old_eld_valid && per_pin->setup) { 1602 if (eld->eld_valid && !old_eld_valid && per_pin->setup) {
1601 if (is_haswell_plus(codec) || is_valleyview(codec)) { 1603 if (is_haswell_plus(codec) ||
1604 is_valleyview_plus(codec)) {
1602 intel_verify_pin_cvt_connect(codec, per_pin); 1605 intel_verify_pin_cvt_connect(codec, per_pin);
1603 intel_not_share_assigned_cvt(codec, pin_nid, 1606 intel_not_share_assigned_cvt(codec, pin_nid,
1604 per_pin->mux_idx); 1607 per_pin->mux_idx);
@@ -1779,7 +1782,7 @@ static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
1779 bool non_pcm; 1782 bool non_pcm;
1780 int pinctl; 1783 int pinctl;
1781 1784
1782 if (is_haswell_plus(codec) || is_valleyview(codec)) { 1785 if (is_haswell_plus(codec) || is_valleyview_plus(codec)) {
1783 /* Verify pin:cvt selections to avoid silent audio after S3. 1786 /* Verify pin:cvt selections to avoid silent audio after S3.
1784 * After S3, the audio driver restores pin:cvt selections 1787 * After S3, the audio driver restores pin:cvt selections
1785 * but this can happen before gfx is ready and such selection 1788 * but this can happen before gfx is ready and such selection
@@ -2330,7 +2333,7 @@ static int patch_generic_hdmi(struct hda_codec *codec)
2330 intel_haswell_fixup_enable_dp12(codec); 2333 intel_haswell_fixup_enable_dp12(codec);
2331 } 2334 }
2332 2335
2333 if (is_haswell_plus(codec) || is_valleyview(codec)) 2336 if (is_haswell_plus(codec) || is_valleyview_plus(codec))
2334 codec->depop_delay = 0; 2337 codec->depop_delay = 0;
2335 2338
2336 if (hdmi_parse_codec(codec) < 0) { 2339 if (hdmi_parse_codec(codec) < 0) {