Skip to content

Commit 7ff652f

Browse files
committed
ALSA: hda - Enable i915 ELD notifier for Intel IronLake and Baytrail
Since we have the fixed pin-port mapping for Intel IronLake (IbexPeak) and Baytrail (ValleyView) platforms in the code side, now it's time to add the support in the codec driver side. This patch simply enables the i915 ELD notifier for these in addition with the fix of the mapping from the port to NID in the callback. Signed-off-by: Takashi Iwai <[email protected]>
1 parent d745f5e commit 7ff652f

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

sound/pci/hda/patch_hdmi.c

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2274,12 +2274,23 @@ static void haswell_set_power_state(struct hda_codec *codec, hda_nid_t fg,
22742274
static void intel_pin_eld_notify(void *audio_ptr, int port)
22752275
{
22762276
struct hda_codec *codec = audio_ptr;
2277-
int pin_nid = port + 0x04;
2277+
int pin_nid;
22782278

22792279
/* we assume only from port-B to port-D */
22802280
if (port < 1 || port > 3)
22812281
return;
22822282

2283+
switch (codec->core.vendor_id) {
2284+
case 0x80860054: /* ILK */
2285+
case 0x80862804: /* ILK */
2286+
case 0x80862882: /* VLV */
2287+
pin_nid = port + 0x03;
2288+
break;
2289+
default:
2290+
pin_nid = port + 0x04;
2291+
break;
2292+
}
2293+
22832294
/* skip notification during system suspend (but not in runtime PM);
22842295
* the state will be updated at resume
22852296
*/
@@ -2375,7 +2386,7 @@ static int patch_i915_hsw_hdmi(struct hda_codec *codec)
23752386
return 0;
23762387
}
23772388

2378-
/* Intel Baytrail and Braswell; without get_eld notifier */
2389+
/* Intel Baytrail and Braswell; with eld notifier */
23792390
static int patch_i915_byt_hdmi(struct hda_codec *codec)
23802391
{
23812392
struct hdmi_spec *spec;
@@ -2409,10 +2420,11 @@ static int patch_i915_byt_hdmi(struct hda_codec *codec)
24092420
}
24102421

24112422
generic_hdmi_init_per_pins(codec);
2423+
register_i915_notifier(codec);
24122424
return 0;
24132425
}
24142426

2415-
/* Intel SandyBridge and IvyBridge; with i915 eld notifier */
2427+
/* Intel IronLake, SandyBridge and IvyBridge; with eld notifier */
24162428
static int patch_i915_cpt_hdmi(struct hda_codec *codec)
24172429
{
24182430
struct hdmi_spec *spec;
@@ -3614,11 +3626,11 @@ HDA_CODEC_ENTRY(0x11069f80, "VX900 HDMI/DP", patch_via_hdmi),
36143626
HDA_CODEC_ENTRY(0x11069f81, "VX900 HDMI/DP", patch_via_hdmi),
36153627
HDA_CODEC_ENTRY(0x11069f84, "VX11 HDMI/DP", patch_generic_hdmi),
36163628
HDA_CODEC_ENTRY(0x11069f85, "VX11 HDMI/DP", patch_generic_hdmi),
3617-
HDA_CODEC_ENTRY(0x80860054, "IbexPeak HDMI", patch_generic_hdmi),
3629+
HDA_CODEC_ENTRY(0x80860054, "IbexPeak HDMI", patch_i915_cpt_hdmi),
36183630
HDA_CODEC_ENTRY(0x80862801, "Bearlake HDMI", patch_generic_hdmi),
36193631
HDA_CODEC_ENTRY(0x80862802, "Cantiga HDMI", patch_generic_hdmi),
36203632
HDA_CODEC_ENTRY(0x80862803, "Eaglelake HDMI", patch_generic_hdmi),
3621-
HDA_CODEC_ENTRY(0x80862804, "IbexPeak HDMI", patch_generic_hdmi),
3633+
HDA_CODEC_ENTRY(0x80862804, "IbexPeak HDMI", patch_i915_cpt_hdmi),
36223634
HDA_CODEC_ENTRY(0x80862805, "CougarPoint HDMI", patch_i915_cpt_hdmi),
36233635
HDA_CODEC_ENTRY(0x80862806, "PantherPoint HDMI", patch_i915_cpt_hdmi),
36243636
HDA_CODEC_ENTRY(0x80862807, "Haswell HDMI", patch_i915_hsw_hdmi),

0 commit comments

Comments
 (0)