[PATCH] ASoC: soc-acpi: add alternative id field for machine driver matching

Lu, Brent brent.lu at intel.com
Wed Oct 6 18:31:08 CEST 2021


> 
> I am not following your suggestion. The machine drivers for I2S/TDM platforms
> are typically based on specific headphone codecs, and they we add possible
> swaps for amplifiers. The key to find a machine is typically the headphone HID.
> Exhibit A for this in your own contribution in the recent weeks with the
> sof_cs42l42.c machine driver.
> 
> Are you suggesting we unify e.g. sof_rt5682.c and sof_cs42l42.c?
> 
> The other problem is that today we have one main HID along with 'quirk_data'
> for amplifiers. If we have alternate HIDs, what would be the rule for quirk_data?
> Can the quirks apply to all possible alternate HIDs? Only one of them?
> 
> Without an example where this new alternate ID is used it's hard to see what the
> ask and directions might be.
> 

I've sent the patch again with two follow-up patches for the changes to machine driver
and the enumeration. Currently the sof-rt5682.c supports two headphone codec drivers,
rt5682 and rt5682s, enumerated by different HID. So we need to duplicate all the entries
in enumeration tables and board configs in machine driver to support rt5682s. By adding
an extra field id_alt to the enumeration table, we just need to modify existing entries
instead of creating new ones.

For amplifier, I think we can implement an new machine_quirk function to support multiple
amplifier HID.



More information about the Alsa-devel mailing list