Hi Pierre
On Fri, Dec 9, 2022 at 11:52 PM Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com wrote:
This looks inconsistent with the commit message. There are separate Kconfigs for different codecs.
SND_SOC_NAU8315 SND_SOC_NAU8825
Which is it?
Sorry about confusing you, I think it is better to change the title as ASoC: Intel: sof_nau8825: add combination of nau8825 headset codec with nau8318 Amp.
And add some information about Nuvoton chips in the comment message. *** The nau8315 and nau8318 are both Nuvoton Amp chips. They use the same Amp driver nau8315.c. The acpi_device_id for nau8315 is "NVTN2010", for nau8318 is "NVTN2012". The nau8825 is one of Nuvoton headset codec, and its acpi_device_id is "10508825". ***
Deep sigh...
This ACPI HID is already used to match with the 8815, so this is not going to work if we confuse two independent drivers...
sound/soc/codecs/nau8315.c:
#ifdef CONFIG_ACPI static const struct acpi_device_id nau8315_acpi_match[] = { { "NVTN2010", 0 }, { "NVTN2012", 0}, {}, }; MODULE_DEVICE_TABLE(acpi, nau8315_acpi_match); #endif
How does this identify a NAU8825?
The NAU8825 Is headset codec, we added a new combination of nau8825 headset codec + nau8318 amp in the machine driver.
.dai_name = "nau8315-hifi",
and again this makes a reference to 8815.
Because the Amp driver is the same file nau8315.c , so nau8318 use the same dai_name "nau8315-hifi"
I will stop the review here.
NAK for this v1. Please clarify which codec you are using and make sure all references are consistent.
I apologize for the unclear comment message, please give me any suggestions if needed, and I will send v2 for review. thanks.