]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: Intel: cirrus-common: Use UID to map correct amp to prefix
authorStefan Binding <sbinding@opensource.cirrus.com>
Mon, 1 Aug 2022 09:40:34 +0000 (10:40 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 15 Aug 2022 00:20:02 +0000 (01:20 +0100)
commit4ffd78a26d0e5e1b3d2611bb95881ddbf64c4485
treec8dd256c447ac18f3351c71a21371916b62cdaf7
parent48e7948219e98c2234c700abf7cc74a555607d73
ASoC: Intel: cirrus-common: Use UID to map correct amp to prefix

Since the order of the amps in the ACPI determines the device name,
and the ACPI order may change depending on hardware configuration,
use UID to dynamically compute the dai links, allowing dynamic
assignment of the name_prefix.

The UIDs for these amps in ACPI are fixed, and map to a name_prefix,
where:
UID 0x0 -> WL
UID 0x1 -> WR
UID 0x2 -> TL
UID 0x3 -> TR

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220801094034.3927841-1-sbinding@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/sof_cirrus_common.c