ASoC: intel: sof_sdw: Use a fixed DAI link id for AMP
authorBard Liao <yung-chuan.liao@linux.intel.com>
Wed, 27 Oct 2021 02:18:19 +0000 (10:18 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 15 Nov 2021 13:26:54 +0000 (13:26 +0000)
commitd471c034f83201f84330e9ed46ad5139d32e77ce
treea23ff8cb0a1a0e956c03f2ee3069f8a82871b260
parentb63137cf5167b73d9d68a2334b835996bfc3b941
ASoC: intel: sof_sdw: Use a fixed DAI link id for AMP

Currently, we assign SoundWire DAI link id according to the order in
the link address table, with the assumption that the headset codec is
listed first, then amplifiers and last capture devices. If the headset
codec is not present in a platform, the dai link for amplifiers will be
shifted, which can be handled in two ways
a) modify the topology to renumber the dailink changes
b) keep the dailink numbers constant in topology but also avoid the
   variations in the machine driver.

This patch adds support for option b), the dailink index for amplifiers
and capture devices becomes fixed.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20211027021824.24776-6-yung-chuan.liao@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