]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ASoC: SOF: Intel: Read the LLP via the associated Link DMA channel
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Thu, 2 Oct 2025 07:47:19 +0000 (10:47 +0300)
committerMark Brown <broonie@kernel.org>
Fri, 3 Oct 2025 11:39:48 +0000 (12:39 +0100)
commitaaab61de1f1e44a2ab527e935474e2e03a0f6b08
tree1970d5a74d2d5adcb98ff9d77a9d7b3a9d2a0711
parenta4b8152c09a832b089864e5e209a479bb0fb5cc9
ASoC: SOF: Intel: Read the LLP via the associated Link DMA channel

It is allowed to mix Link and Host DMA channels in a way that their index
is different. In this case we would read the LLP from a channel which is
not used or used for other operation.

Such case can be reproduced on cAVS2.5 or ACE1 platforms with soundwire
configuration:
playback to SDW would take Host channel 0 (stream_tag 1) and no Link DMA
used
Second playback to HDMI (HDA) would use Host channel 1 (stream_tag 2) and
Link channel 0 (stream_tag 1).

In this case reading the LLP from channel 2 is incorrect as that is not the
Link channel used for the HDMI playback.

To correct this, we should look up the BE and get the channel used on the
Link side.

Fixes: 67b182bea08a ("ASoC: SOF: Intel: hda: Implement get_stream_position (Linear Link Position)")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.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/20251002074719.2084-6-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/hda-stream.c