ASoC: SOF: ipc3-topology: Convert the topology pin index to ALH dai index
authorBard Liao <yung-chuan.liao@linux.intel.com>
Wed, 27 Nov 2024 09:29:54 +0000 (17:29 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 27 Nov 2024 11:28:27 +0000 (11:28 +0000)
commite9db1b551774037ebe39dde4a658d89ba95e260b
tree868dc55db62d6e29c156c812958b2364c915e161
parent2f2020327cc8561d7c520d2f2d9acea84fa7b3a3
ASoC: SOF: ipc3-topology: Convert the topology pin index to ALH dai index

Intel SoundWire machine driver always uses Pin number 2 and above.
Currently, the pin number is used as the FW DAI index directly. As a
result, FW DAI 0 and 1 are never used. That worked fine because we use
up to 2 DAIs in a SDW link. Convert the topology pin index to ALH dai
index, the mapping is using 2-off indexing, iow, pin #2 is ALH dai #0.

The issue exists since beginning. And the Fixes tag is the first commit
that this commit can be applied.

Fixes: b66bfc3a9810 ("ASoC: SOF: sof-audio: Fix broken early bclk feature for SSP")
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20241127092955.20026-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/ipc3-topology.c