ASoC: cs35l56: Use PCI SSID as the firmware UID
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Tue, 12 Sep 2023 16:32:07 +0000 (17:32 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 12 Sep 2023 17:53:50 +0000 (18:53 +0100)
commit1a1c3d794ef65ef2978c5e65e1aed3fe6f014e90
tree9094d3d44c50872e36151885b3cb6ddf905cf239
parentd8b387544ff4d02eda1d1839a0c601de4b037c33
ASoC: cs35l56: Use PCI SSID as the firmware UID

If the driver properties do not define a cirrus,firmware-uid try to get the
PCI SSID as the UID.

On PCI-based systems the PCI SSID is used to uniquely identify the specific
sound hardware. This is the standard mechanism for x86 systems and is the
way to get a unique system identifier for systems that use the CS35L56 on
SoundWire.

For non-SoundWire systems there is no Windows equivalent of the ASoC driver
in I2C/SPI mode. These would be:

1. HDA systems, which are handled by the HDA subsystem.
2. Linux-specific systems.
3. Composite devices where the cs35l56 is not present in ACPI and is
   configured using software nodes.

Case 2 can use the firmware-uid property, though the PCI SSID is supported
as an alternative, as it is the standard PCI mechanism.

Case 3 is a SoundWire system where some other codec is the SoundWire bridge
device and CS35L56 is not listed in ACPI. As these are SoundWire systems
they will normally use the PCI SSID.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230912163207.3498161-5-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs35l56.c