Hello,
The headphone jack is documented as broken and i was wondering if someone could help following a few tests I carried out with two identical laptops, one running the stock bios and the other corebooted.
When unplugged the value is always value = 0x0 and when plugged the value changes to value = 0x80000000. When docked the value on the stock bios gets updated but not in coreboot. When using the headphone it gets updated but no sound is output.
STOCK BIOS - Headphone
sudo hda-verb /dev/snd/hwC1D0 0x15 GET_PIN_SENSE 0 nid = 0x15, verb = 0xf09, param = 0x0 value = 0x0 = Unplugged
sudo hda-verb /dev/snd/hwC1D0 0x15 GET_PIN_SENSE 0 nid = 0x15, verb = 0xf09, param = 0x0 value = 0x80000000 = Plugged
**Sound Works**
COREBOOT - Headphone
sudo hda-verb /dev/snd/hwC1D0 0x15 GET_PIN_SENSE 0 nid = 0x15, verb = 0xf09, param = 0x0 value = 0x0 = Unplugged
sudo hda-verb /dev/snd/hwC1D0 0x15 GET_PIN_SENSE 0 nid = 0x15, verb = 0xf09, param = 0x0 value = 0x80000000 = Plugged
**Sound does not work**
STOCK BIOS - Docked [Headphone jack on the dock]
sudo hda-verb /dev/snd/hwC1D0 0x16 GET_PIN_SENSE 0 nid = 0x16, verb = 0xf09, param = 0x0 value = 0x0 = Unplugged
sudo hda-verb /dev/snd/hwC1D0 0x16 GET_PIN_SENSE 0 nid = 0x16, verb = 0xf09, param = 0x0 value = 0x80000000 = Plugged
COREBOOT - Docked [Headphone jack on the dock]
sudo hda-verb /dev/snd/hwC1D0 0x16 GET_PIN_SENSE 0 nid = 0x16, verb = 0xf09, param = 0x0 value = 0x0 = Unplugged
hda-verb /dev/snd/hwC1D0 0x16 GET_PIN_SENSE 0 nid = 0x16, verb = 0xf09, param = 0x0 value = 0x0 = Plugged but not updated!!!
ONLY the MIC is detected and enabled
sudo hda-verb /dev/snd/hwC1D0 0x19 GET_PIN_SENSE 0 nid = 0x19, verb = 0xf09, param = 0x0 value = 0x0 = unplugged
sudo hda-verb /dev/snd/hwC1D0 0x19 GET_PIN_SENSE 0 nid = 0x19, verb = 0xf09, param = 0x0 value = 0x80000000 = Plugged and Updated!!!
When docked the mic is enabled by default but headphone is not detected. Strangely if i plug another headphone in the laptop headphone jack, the dock headphones start working!
Could it be that the file https://github.com/coreboot/coreboot/blob/master/src/mainboard/lenovo/t440p/... is missing the info about the jack being a combo port just like in the t520 https://github.com/rockchip-linux/coreboot/blob/master/src/mainboard/lenovo/...
Hi, On Sat, May 23, 2020 at 12:50:52PM -0000, acaleechurn@gmail.com wrote:
When docked the mic is enabled by default but headphone is not detected. Strangely if i plug another headphone in the laptop headphone jack, the dock headphones start working!
Could it be that the file https://github.com/coreboot/coreboot/blob/master/src/mainboard/lenovo/t440p/... is missing the info about the jack being a combo port just like in the t520 https://github.com/rockchip-linux/coreboot/blob/master/src/mainboard/lenovo/...
I think it makes sense. I don't have a T440p right now. I can only give you some information I found when I worked on this machine.
I once searched in the OEM firmware, and found the HDA verbs are stored in a UEFI module named PchConfigDxe. I don't know how many of these the Lenovo firmware uses. I've pasted the list of HDA verbs in this module dumped with Ghidra in [1]. I've tried to add the function reset verbs (the four 0x0017ff00) to coreboot before, but it doesn't seem to help.
Also I found other coreboot laptops using Realtek HDA have some verbs used to tune jack detection, with hex like 0x02xxxxxx. There are also some of these in this verb list. I don't know if it can help.
[1] https://paste.debian.net/1148430/
Regards, Iru
Hi,
The paste.debien.net link seems to have expired, could you please reupload the HDA verbs ?
Regards, BayLee