ASoC: Intel: sof_cs42l42: support arbitrary DAI link sequence
authorBrent Lu <brent.lu@intel.com>
Mon, 12 Jul 2021 20:32:34 +0000 (15:32 -0500)
committerMark Brown <broonie@kernel.org>
Wed, 14 Jul 2021 12:30:34 +0000 (13:30 +0100)
commit3cb97cf3a65a7fdbf4844ccd39b7e96fe14f762b
tree94be3436fce02e86aa2872b70907740fe6a61fc2
parenteb82bae1a0025172a01718ae21e9782132ce076e
ASoC: Intel: sof_cs42l42: support arbitrary DAI link sequence

Currently there are two types of DAI Link sequences defined in
topology files, one starts from speaker link and the other starts from
headphone link.

Type 1: SPK - HP - DMIC - HDMI
Type 2: HP - DMIC - HDMI - SPK

Here we add a macro SOF_CS42L42_DAILINK to define the DAI Link
sequence in quirk and refactor the sof_card_dai_links_create()
function to support arbitrary DAI Link sequence.

Reviewed-by: Bard Liao <bard.liao@intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210712203240.46960-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/sof_cs42l42.c