Skip to contentSkip to conversation

ALSA: hda - bug fix for invalid connection list of more Haswell HDMI codec pins

PATCH In review [email protected] 2 participants 6 messages Dec 18, 2012 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: hda - bug fix for invalid connection list of more Haswell HDMI codec pins

From: Mengdong Lin <[email protected]>

Haswell HDMI codec may report invalid connection list entries on all three pins. But our previous patch only fixes the HDMI pin, not the DP pin, so audio playbak via DP can still fail.

This patch adds fixup for Haswell to set proper connection list entries for the other 2 pins including the DP pin.

sound/pci/hda/patch_hdmi.c +6 -0
index 42fdf14..73d298a 100644
@@ -1710,8 +1710,14 @@ static void intel_haswell_fixup_connect_list(struct hda_codec *codec,
 	if (vendor_param == -1 || !(vendor_param & 0x02))
 		return;
 
+	snd_hda_override_conn_list(codec, 0x05, 3, list);
+	hdmi_read_pin_conn(codec, 1);
+
 	snd_hda_override_conn_list(codec, 0x06, 3, list);
 	hdmi_read_pin_conn(codec, 1);
+
+	snd_hda_override_conn_list(codec, 0x07, 3, list);
+	hdmi_read_pin_conn(codec, 1);
 }
 
 
Signature · 1 line
1.7.9.5
#1 lore raw

At Tue, 18 Dec 2012 13:21:54 -0500,

Quoted 11 lines · [email protected] wrote:

From: Mengdong Lin <[email protected]>

Haswell HDMI codec may report invalid connection list entries on all three pins. But our previous patch only fixes the HDMI pin, not the DP pin, so audio playbak via DP can still fail.

This patch adds fixup for Haswell to set proper connection list entries for the other 2 pins including the DP pin.

Mengdong, your previous patch was currently dropped because it's not clear whether it's correct. As asked in the previous thread, the usage of fixup is doubtful in this case.

Is the fix really needed only for a certain PCI (or codec) *SSID*? If you need to apply it generically to a certain codec, you have to choose another way.

Quoted 7 lines
sound/pci/hda/patch_hdmi.c +0 -0
index 42fdf14..73d298a 100644
@@ -1710,8 +1710,14 @@ static void intel_haswell_fixup_connect_list(struct hda_codec *codec,
 	if (vendor_param == -1 || !(vendor_param & 0x02))

sound/pci/hda/patch_hdmi.c static void intel_haswell_fixup_connect_list(struct hda_codec *codec, · line 1720

Quoted 10 lines
sound/pci/hda/patch_hdmi.c +6 -0
 		return;
 
+	snd_hda_override_conn_list(codec, 0x05, 3, list);
+	hdmi_read_pin_conn(codec, 1);
+
 	snd_hda_override_conn_list(codec, 0x06, 3, list);
 	hdmi_read_pin_conn(codec, 1);
+
+	snd_hda_override_conn_list(codec, 0x07, 3, list);
+	hdmi_read_pin_conn(codec, 1);

What's the reason to call hdmi_read_pin_conn() multiple times?

Takashi

#2 lore raw
Quoted 11 lines

-----Original Message-----
From: Takashi Iwai [mailto:[email protected]]
Sent: Tuesday, December 18, 2012 3:08 PM

Mengdong, your previous patch was currently dropped because it's not clear whether it's correct. As asked in the previous thread, the usage of fixup is doubtful in this case.

Is the fix really needed only for a certain PCI (or codec) *SSID*? If you need to apply it generically to a certain codec, you have to choose another way.

Hi Takashi,

Will OEM change the PCI (or codec) SSID so that this fixup will not be applied at all?

In Haswell, there are two HD-A controllers: one for display codec and the other for legacy 3rd-party codec. I'm not sure if OEM will change the PCI SSID of the display HD-A controller.

Quoted 11 lines

sound/pci/hda/patch_hdmi.c static void intel_haswell_fixup_connect_list(struct hda_codec *codec, · line 1720

Quoted 9 lines
sound/pci/hda/patch_hdmi.c +6 -0
+	snd_hda_override_conn_list(codec, 0x05, 3, list);
+	hdmi_read_pin_conn(codec, 1);
+
 	snd_hda_override_conn_list(codec, 0x06, 3, list);
 	hdmi_read_pin_conn(codec, 1);
+
+	snd_hda_override_conn_list(codec, 0x07, 3, list);
+	hdmi_read_pin_conn(codec, 1);

What's the reason to call hdmi_read_pin_conn() multiple times?

Sorry, it's not necessary here.

Thanks
Mengdong

#3 lore raw

At Tue, 18 Dec 2012 07:36:59 +0000,

Quoted 13 lines · Mengdong
Quoted 5 lines

-----Original Message-----
From: Takashi Iwai [mailto:[email protected]]
Sent: Tuesday, December 18, 2012 3:08 PM

Quoted 7 lines

Mengdong, your previous patch was currently dropped because it's not clear whether it's correct. As asked in the previous thread, the usage of fixup is doubtful in this case.

Is the fix really needed only for a certain PCI (or codec) *SSID*? If you need to apply it generically to a certain codec, you have to choose another way.

Quoted 6 lines

Hi Takashi,

Will OEM change the PCI (or codec) SSID so that this fixup will not be applied at all?

In Haswell, there are two HD-A controllers: one for display codec and the other for legacy 3rd-party codec. I'm not sure if OEM will change the PCI SSID of the display HD-A controller.

Of course, they'll change SSIDs.

Takashi

#4 lore raw
Quoted 5 lines

-----Original Message-----
From: Takashi Iwai [mailto:[email protected]]
Sent: Tuesday, December 18, 2012 3:46 PM

Quoted 9 lines
Quoted 1 line

Will OEM change the PCI (or codec) SSID so that this fixup will not be

applied at all?

Quoted 2 lines

In Haswell, there are two HD-A controllers: one for display codec and the

other for legacy 3rd-party codec.

Quoted 1 line

I'm not sure if OEM will change the PCI SSID of the display HD-A controller.

Of course, they'll change SSIDs.

Thanks for your info, Takashi!
You're right. PCI spec allow these registers in configuration space to be changed.

So snd_hda_pick_fixup/snd_hda_apply_fixup is designed for fixing board or BIOS-specific issues, right?

I'll update the patch as you suggested.

Thanks
Mengdong

#5 lore raw

At Tue, 18 Dec 2012 08:09:12 +0000,

Quoted 13 lines · Mengdong
Quoted 13 lines

-----Original Message-----
From: Takashi Iwai [mailto:[email protected]]
Sent: Tuesday, December 18, 2012 3:46 PM

Quoted 1 line

Will OEM change the PCI (or codec) SSID so that this fixup will not be

applied at all?

Quoted 2 lines

In Haswell, there are two HD-A controllers: one for display codec and the

other for legacy 3rd-party codec.

Quoted 1 line

I'm not sure if OEM will change the PCI SSID of the display HD-A controller.

Quoted 7 lines
Quoted 2 lines

Of course, they'll change SSIDs.

Thanks for your info, Takashi!
You're right. PCI spec allow these registers in configuration space to be changed.

So snd_hda_pick_fixup/snd_hda_apply_fixup is designed for fixing board or BIOS-specific issues, right?

Yes.

Quoted 1 line

I'll update the patch as you suggested.

OK, thanks!

Takashi