ASoC: SOF: Intel: Read the LLP via the associated Link DMA channel #5539
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 fro the HDMI playback.
To correct this, we should look up the BE and get the channel used on the Link side.
Fixes: 67b182b ("ASoC: SOF: Intel: hda: Implement get_stream_position (Linear Link Position)")