Skip to content

Commit ca2e722

Browse files
libinyangtiwai
authored andcommitted
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 <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
1 parent d35f64e commit ca2e722

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

sound/pci/hda/patch_hdmi.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ MODULE_PARM_DESC(static_hdmi_pcm, "Don't restrict PCM parameters per ELD info");
5050
#define is_haswell_plus(codec) (is_haswell(codec) || is_broadwell(codec))
5151

5252
#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))
5355

5456
struct hdmi_spec_per_cvt {
5557
hda_nid_t cvt_nid;
@@ -1459,7 +1461,7 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo,
14591461
mux_idx);
14601462

14611463
/* 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))
14631465
intel_not_share_assigned_cvt(codec, per_pin->pin_nid, mux_idx);
14641466

14651467
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)
15981600
* and this can make HW reset converter selection on a pin.
15991601
*/
16001602
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)) {
16021605
intel_verify_pin_cvt_connect(codec, per_pin);
16031606
intel_not_share_assigned_cvt(codec, pin_nid,
16041607
per_pin->mux_idx);
@@ -1779,7 +1782,7 @@ static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
17791782
bool non_pcm;
17801783
int pinctl;
17811784

1782-
if (is_haswell_plus(codec) || is_valleyview(codec)) {
1785+
if (is_haswell_plus(codec) || is_valleyview_plus(codec)) {
17831786
/* Verify pin:cvt selections to avoid silent audio after S3.
17841787
* After S3, the audio driver restores pin:cvt selections
17851788
* but this can happen before gfx is ready and such selection
@@ -2330,7 +2333,7 @@ static int patch_generic_hdmi(struct hda_codec *codec)
23302333
intel_haswell_fixup_enable_dp12(codec);
23312334
}
23322335

2333-
if (is_haswell_plus(codec) || is_valleyview(codec))
2336+
if (is_haswell_plus(codec) || is_valleyview_plus(codec))
23342337
codec->depop_delay = 0;
23352338

23362339
if (hdmi_parse_codec(codec) < 0) {

0 commit comments

Comments
 (0)