ALSA: hda: cs35l56: Add support for speaker id
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Mon, 18 Sep 2023 09:51:28 +0000 (10:51 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 18 Sep 2023 15:49:26 +0000 (17:49 +0200)
commit6f03b446cbaeb3187b1df1e7e8b13c6340cd6c68
tree9ec515975b6c31e72e623bfd9814cf44481b4569
parent6e743781d62e28f5fa095e5f31f878819622c143
ALSA: hda: cs35l56: Add support for speaker id

Add handling of the "spk-id-gpios" _DSD property. If present, the
value indicated by the GPIOs is appended to the subsystem-id
part of the firmware name to load the appropriate tunings for that
speaker.

Some manufacturers use multiple sources of speakers, which need
different tunings for best performance. On these models the type
of speaker fitted is indicated by the values of one or more GPIOs.
The number formed by the GPIOs identifies the tuning required.

The speaker ID is only used in combination with a _SUB identifier
because the value is only meaningful if the exact model is known.

The code to get the speaker ID value has been implemented as a
new library so that the cs35l41_hda driver can be switched in
future to share common code. This library can be extended for
other common functionality shared by Cirrus Logic amp drivers.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230918095129.440-2-rf@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
MAINTAINERS
sound/pci/hda/Kconfig
sound/pci/hda/Makefile
sound/pci/hda/cirrus_scodec.c [new file with mode: 0644]
sound/pci/hda/cirrus_scodec.h [new file with mode: 0644]
sound/pci/hda/cs35l56_hda.c