Re: [PATCH 0/3] Multiple headphone codec driver support

From: Pierre-Louis Bossart
Date: Wed Oct 06 2021 - 12:58:12 EST




On 10/6/21 11:18 AM, Brent Lu wrote:
> Support multiple headphone drivers in same machine driver. In this
> case, both rt5682 and rt5682s are supported and enumerated by different
> ACPI HID "10EC5682" and "RTL5682".

Ah, now I get what you're trying to do. I like this a lot!

This is really a 'compatible_id' that the machine driver is capable of
handling.

It would be quite useful indeed to prune some of the tables we have, e.g.

"10EC5640" "10EC5642", "INTCCFFD"
"10EC5645" "10EC5648", etc

In your case you pushed the logic a bit further in that the codec driver
might be different, but the machine driver can deal with it with
run-time autodetection.

Would you mind going through the tables and suggest additional
simplifications with more patches when relevant?

> Brent Lu (3):
> ASoC: soc-acpi: add alternative id field for machine driver matching
> ASoC: Intel: sof_rt5682: detect codec variant in probe function
> ASoC: Intel: sof_rt5682: use id_alt to enumerate rt5682s
>
> include/sound/soc-acpi.h | 2 ++
> sound/soc/intel/boards/sof_rt5682.c | 34 +++----------------
> .../intel/common/soc-acpi-intel-adl-match.c | 8 +++++
> .../intel/common/soc-acpi-intel-byt-match.c | 6 ++++
> .../intel/common/soc-acpi-intel-cht-match.c | 6 ++++
> .../intel/common/soc-acpi-intel-cml-match.c | 8 +++++
> .../intel/common/soc-acpi-intel-icl-match.c | 6 ++++
> .../intel/common/soc-acpi-intel-jsl-match.c | 32 +++++------------
> .../intel/common/soc-acpi-intel-tgl-match.c | 8 +++++
> sound/soc/soc-acpi.c | 21 +++++++++++-
> 10 files changed, 76 insertions(+), 55 deletions(-)
>