ASoC: Intel: sof_sdw: Add quirk for optional codec speakers
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Tue, 26 Mar 2024 16:04:28 +0000 (11:04 -0500)
committerMark Brown <broonie@kernel.org>
Tue, 26 Mar 2024 16:13:50 +0000 (16:13 +0000)
commit9c09bef69fe9376953348bb367c869f3d16c758c
tree4b403253f985619692768b04b75c68c93939516a
parent36f307d296ad15e3d679d6567112b9ec4c30babc
ASoC: Intel: sof_sdw: Add quirk for optional codec speakers

Some codecs have speaker drivers that may or may not be used in a
given system. Add a quirk (SOF_CODEC_SPKR) that defines if a system
uses the codec speaker, this is kept generic such that any codec
with such a speaker DAI can reuse the quirk.

For implementation of this, add a quirk field into the
sof_sdw_dai_info structure. This field is not used to specify
if a system uses a particular quirk, that is still done through
the sof_sdw_quirk variable, this field is used to flag a DAI as
conditional on a certain quirk. This means the DAI will only be
included in the card if sof_sdw_quirk and the DAI quirk field have
a matching set bit.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240326160429.13560-34-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/sof_sdw.c
sound/soc/intel/boards/sof_sdw_common.h