I have a Huawei Matebook 14 AMD 2021 laptop for which the sound isn't supported on Linux. On further investigation in Windows and ACPI tables I could determine that this particular SKU has an ES8336 codec connected to the CPU ACP module. The CPU of my laptop is an AMD Ryzen 5 5500U which seems to be codenamed Lucienne and is a derivation of the Renoir family. Acording to lspci the ACP is revision 1:
03:00.5 Multimedia controller [0480]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor [1022:15e2] (rev 01) Subsystem: Device [1e83:3e4d] Kernel driver in use: snd_rn_pci_acp3x Kernel modules: snd_pci_acp3x, snd_rn_pci_acp3x, snd_pci_acp5x, snd_pci_acp6x, snd_acp_pci, snd_rpl_pci_acp6x, snd_sof_amd_renoir
I have written a machine driver for this platform and managed to make the sound and internal microphone work. I am looking to integrate this support but there are some issues with the current implementation of ACP support.
As far as I can tell there are 4 directions I could take to add support:
- A standalone machine driver in sound/soc/amd that uses the platform
drivers from sound/soc/amd/raven/
An embedded driver in sound/soc/amd/acp/acp-legacy-mach.c
A standalone machine driver in sound/soc/amd that uses the platform
drivers from sound/soc/amd/renoir
- Use the SOF infrastructure
The main issue with this codec is the mind-blowing proliferation of configurations and quirks. I can't comment on AMD-specific stuff, but would recommend you take a look at the GitHub PR we've been reviewing to extract as much information as possible from ACPI _DSM tables (as done by the Windows driver). see https://github.com/thesofproject/linux/pull/4112 (credits to Mauro Chehab for fixing and testing on real hardware and David Yang for providing the DSM information and comments).