Hello Iru Cai,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/45693
to review the following change.
Change subject: [TEST] lenovo/t440p: Add HDA verbs from OEM firmware ......................................................................
[TEST] lenovo/t440p: Add HDA verbs from OEM firmware
I don't know if this solves the audio output problem.
Change-Id: Ie359fdf6785b1c0be8dc201cd76176c0a7fe7942 Signed-off-by: Iru Cai mytbk920423@gmail.com --- M src/mainboard/lenovo/t440p/hda_verb.c 1 file changed, 22 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/93/45693/1
diff --git a/src/mainboard/lenovo/t440p/hda_verb.c b/src/mainboard/lenovo/t440p/hda_verb.c index e0c19dc..4446119 100644 --- a/src/mainboard/lenovo/t440p/hda_verb.c +++ b/src/mainboard/lenovo/t440p/hda_verb.c @@ -5,8 +5,9 @@ const u32 cim_verb_data[] = { 0x10ec0292, /* Codec Vendor / Device ID: Realtek */ 0x17aa220e, /* Subsystem ID */ - 12, /* Number of 4 dword sets */ + 32, /* Number of 4 dword sets */ AZALIA_SUBVENDOR(0, 0x17aa220e), + 0x0017ff00, 0x0017ff00, 0x0017ff00, 0x0017ff00, AZALIA_PIN_CFG(0, 0x12, 0x90a60130), AZALIA_PIN_CFG(0, 0x13, 0x40000000), AZALIA_PIN_CFG(0, 0x14, 0x90170110), @@ -18,6 +19,26 @@ AZALIA_PIN_CFG(0, 0x1b, 0x411111f0), AZALIA_PIN_CFG(0, 0x1d, 0x40738105), AZALIA_PIN_CFG(0, 0x1e, 0x411111f0), + + 0x05350000, 0x0534601a, 0x05450000, 0x05442000, + 0x05350003, 0x05341ef8, 0x05450003, 0x05441ef8, + 0x05350016, 0x05341ee1, 0x05450016, 0x05441ee1, + 0x05350023, 0x05341f7b, 0x05450023, 0x05441f7b, + 0x05350030, 0x05341fbd, 0x05450030, 0x05441fbd, + 0x05350000, 0x0534e01a, 0x05450030, 0x05441fbd, + 0x02050020, 0x02048014, 0x02050020, 0x02040014, + 0x05350000, 0x0534e01a, 0x05450000, 0x0544e01a, + 0x0205001c, 0x02046800, 0x0205006d, 0x0204aa10, + 0x02050076, 0x02040009, 0x0205006b, 0x02045029, + 0x0205006c, 0x0204a400, 0x02050018, 0x02047208, + 0x0205001a, 0x02049ad2, 0x02050014, 0x02040710, + 0x02050079, 0x02040b40, 0x02050070, 0x02048800, + 0x00b3f410, 0x00c3f11f, 0x00c3f001, 0x015707c0, + 0x0153b080, 0x01470740, 0x0143b000, 0x02050004, + 0x02040080, 0x01470c02, 0x000f0000, 0x000f0000, + 0x02050029, 0x02040050, 0x02050025, 0x0204ebc2, + 0x02050026, 0x02044028, 0x02050029, 0x02040250, + 0x000f0000, 0x000f0000, 0x02050005, 0x0204ff1f, };
const u32 pc_beep_verbs[0] = {};
Vladyslav Shtabovenko has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45693 )
Change subject: [TEST] lenovo/t440p: Add HDA verbs from OEM firmware ......................................................................
Patch Set 1: Code-Review+1
Dear Iru Cai,
thank you so much for this patch! I've just applied it on top of the current master, rebuilt my T440p BIOS and voilà, the headphone jack is now working 😄 🎉
I have a fresh Ubuntu 20.04 installed on the machine and the jack was not working with my previous coreboot BIOS from the current master. After having cherry-picked your patch, the magic has happened!
The mic on my headset is working too. I don't observe any drawbacks w.r.t the sound. The normal output via the laptop speakers is still fully functional when no headphones are plugged in.
The machine is equipped with an i7-4700MQ and has no dGPU. If you need any debugging output or more tests, please let me know.
Cheers, Vladyslav
Hello Vladyslav Shtabovenko, build bot (Jenkins), Alexander Couzens, Patrick Rudolph, Iru Cai,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/45693
to look at the new patch set (#2).
Change subject: lenovo/t440p: Add HDA verbs from the OEM firmware ......................................................................
lenovo/t440p: Add HDA verbs from the OEM firmware
To get the HDA verbs from the OEM firmware, open the firmware with UEFITool, search for the existing HDA verbs, extract the UEFI module and look for the verbs. Copy the consecutive 4 dword sets that look like HDA verbs.
It is tested to make audio output from both the speaker and headphone work.
Change-Id: Ie359fdf6785b1c0be8dc201cd76176c0a7fe7942 Signed-off-by: Iru Cai mytbk920423@gmail.com --- M Documentation/mainboard/lenovo/t440p.md M src/mainboard/lenovo/t440p/hda_verb.c 2 files changed, 22 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/93/45693/2
Iru Cai (vimacs) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45693 )
Change subject: lenovo/t440p: Add HDA verbs from the OEM firmware ......................................................................
Patch Set 2:
Thank you for testing.
Dear Iru Cai,
thank you so much for this patch! I've just applied it on top of the current master, rebuilt my T440p BIOS and voilà, the headphone jack is now working 😄 🎉
The mic on my headset is working too. I don't observe any drawbacks w.r.t the sound. The normal output via the laptop speakers is still fully functional when no headphones are plugged in.
Cheers, Vladyslav
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45693 )
Change subject: lenovo/t440p: Add HDA verbs from the OEM firmware ......................................................................
Patch Set 2: Code-Review+1
(1 comment)
https://review.coreboot.org/c/coreboot/+/45693/2/src/mainboard/lenovo/t440p/... File src/mainboard/lenovo/t440p/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/45693/2/src/mainboard/lenovo/t440p/... PS2, Line 10: 0x0017ff00, 0x0017ff00, 0x0017ff00, 0x0017ff00, I think this is an azalia reset, and there should be a macro for it
Iru Cai (vimacs) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45693 )
Change subject: lenovo/t440p: Add HDA verbs from the OEM firmware ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/45693/2/src/mainboard/lenovo/t440p/... File src/mainboard/lenovo/t440p/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/45693/2/src/mainboard/lenovo/t440p/... PS2, Line 10: 0x0017ff00, 0x0017ff00, 0x0017ff00, 0x0017ff00,
I think this is an azalia reset, and there should be a macro for it
There're some boards using this function reset verb 0x0017ff00, but no macro for it.
Iru Cai (vimacs) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45693 )
Change subject: lenovo/t440p: Add HDA verbs from the OEM firmware ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/45693/2/src/mainboard/lenovo/t440p/... File src/mainboard/lenovo/t440p/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/45693/2/src/mainboard/lenovo/t440p/... PS2, Line 10: 0x0017ff00, 0x0017ff00, 0x0017ff00, 0x0017ff00,
There're some boards using this function reset verb 0x0017ff00, but no macro for it.
Oh, I read the device/azalia_device.h and see the AZALIA_RESET macro.
Hello build bot (Jenkins), Vladyslav Shtabovenko, Angel Pons, Alexander Couzens, Patrick Rudolph, Iru Cai,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/45693
to look at the new patch set (#3).
Change subject: lenovo/t440p: Add HDA verbs from the OEM firmware ......................................................................
lenovo/t440p: Add HDA verbs from the OEM firmware
To get the HDA verbs from the OEM firmware, open the firmware with UEFITool, search for the existing HDA verbs, extract the UEFI module and look for the verbs. Copy the consecutive 4 dword sets that look like HDA verbs.
It is tested to make audio output from both the speaker and headphone work.
Change-Id: Ie359fdf6785b1c0be8dc201cd76176c0a7fe7942 Signed-off-by: Iru Cai mytbk920423@gmail.com --- M Documentation/mainboard/lenovo/t440p.md M src/mainboard/lenovo/t440p/hda_verb.c 2 files changed, 22 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/93/45693/3
Iru Cai (vimacs) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45693 )
Change subject: lenovo/t440p: Add HDA verbs from the OEM firmware ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/45693/2/src/mainboard/lenovo/t440p/... File src/mainboard/lenovo/t440p/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/45693/2/src/mainboard/lenovo/t440p/... PS2, Line 10: 0x0017ff00, 0x0017ff00, 0x0017ff00, 0x0017ff00,
Oh, I read the device/azalia_device.h and see the AZALIA_RESET macro.
Done
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45693 )
Change subject: lenovo/t440p: Add HDA verbs from the OEM firmware ......................................................................
Patch Set 3: Code-Review+2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45693 )
Change subject: lenovo/t440p: Add HDA verbs from the OEM firmware ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/45693/3/src/mainboard/lenovo/t440p/... File src/mainboard/lenovo/t440p/hda_verb.c:
https://review.coreboot.org/c/coreboot/+/45693/3/src/mainboard/lenovo/t440p/... PS3, Line 41: 0x000f0000, 0x000f0000, 0x02050005, 0x0204ff1f, It would be good to use macros for these verbs, but this can be done in a follow-up (and checked with BUILD_TIMELESS=1 to be sure the conversion is correct)
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/45693 )
Change subject: lenovo/t440p: Add HDA verbs from the OEM firmware ......................................................................
lenovo/t440p: Add HDA verbs from the OEM firmware
To get the HDA verbs from the OEM firmware, open the firmware with UEFITool, search for the existing HDA verbs, extract the UEFI module and look for the verbs. Copy the consecutive 4 dword sets that look like HDA verbs.
It is tested to make audio output from both the speaker and headphone work.
Change-Id: Ie359fdf6785b1c0be8dc201cd76176c0a7fe7942 Signed-off-by: Iru Cai mytbk920423@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/45693 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Angel Pons th3fanbus@gmail.com --- M Documentation/mainboard/lenovo/t440p.md M src/mainboard/lenovo/t440p/hda_verb.c 2 files changed, 22 insertions(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved
diff --git a/Documentation/mainboard/lenovo/t440p.md b/Documentation/mainboard/lenovo/t440p.md index 08df76f..f364f07 100644 --- a/Documentation/mainboard/lenovo/t440p.md +++ b/Documentation/mainboard/lenovo/t440p.md @@ -30,7 +30,6 @@
## Known Issues
-- No audio output when using a headphone - Cannot get the mainboard serial number from the mainboard: the OEM UEFI firmware gets the serial number from an "emulated EEPROM" via I/O port 0x1630/0x1634, but it's still unknown how to make it work diff --git a/src/mainboard/lenovo/t440p/hda_verb.c b/src/mainboard/lenovo/t440p/hda_verb.c index e0c19dc..fac8400 100644 --- a/src/mainboard/lenovo/t440p/hda_verb.c +++ b/src/mainboard/lenovo/t440p/hda_verb.c @@ -5,8 +5,9 @@ const u32 cim_verb_data[] = { 0x10ec0292, /* Codec Vendor / Device ID: Realtek */ 0x17aa220e, /* Subsystem ID */ - 12, /* Number of 4 dword sets */ + 32, /* Number of 4 dword sets */ AZALIA_SUBVENDOR(0, 0x17aa220e), + AZALIA_RESET(1), AZALIA_PIN_CFG(0, 0x12, 0x90a60130), AZALIA_PIN_CFG(0, 0x13, 0x40000000), AZALIA_PIN_CFG(0, 0x14, 0x90170110), @@ -18,6 +19,26 @@ AZALIA_PIN_CFG(0, 0x1b, 0x411111f0), AZALIA_PIN_CFG(0, 0x1d, 0x40738105), AZALIA_PIN_CFG(0, 0x1e, 0x411111f0), + + 0x05350000, 0x0534601a, 0x05450000, 0x05442000, + 0x05350003, 0x05341ef8, 0x05450003, 0x05441ef8, + 0x05350016, 0x05341ee1, 0x05450016, 0x05441ee1, + 0x05350023, 0x05341f7b, 0x05450023, 0x05441f7b, + 0x05350030, 0x05341fbd, 0x05450030, 0x05441fbd, + 0x05350000, 0x0534e01a, 0x05450030, 0x05441fbd, + 0x02050020, 0x02048014, 0x02050020, 0x02040014, + 0x05350000, 0x0534e01a, 0x05450000, 0x0544e01a, + 0x0205001c, 0x02046800, 0x0205006d, 0x0204aa10, + 0x02050076, 0x02040009, 0x0205006b, 0x02045029, + 0x0205006c, 0x0204a400, 0x02050018, 0x02047208, + 0x0205001a, 0x02049ad2, 0x02050014, 0x02040710, + 0x02050079, 0x02040b40, 0x02050070, 0x02048800, + 0x00b3f410, 0x00c3f11f, 0x00c3f001, 0x015707c0, + 0x0153b080, 0x01470740, 0x0143b000, 0x02050004, + 0x02040080, 0x01470c02, 0x000f0000, 0x000f0000, + 0x02050029, 0x02040050, 0x02050025, 0x0204ebc2, + 0x02050026, 0x02044028, 0x02050029, 0x02040250, + 0x000f0000, 0x000f0000, 0x02050005, 0x0204ff1f, };
const u32 pc_beep_verbs[0] = {};