[SKIP SOFCI-TEST] set of PCM delay handling fixes#5511
Closed
kv2019i wants to merge 3 commits intothesofproject:topic/sof-devfrom
Closed
[SKIP SOFCI-TEST] set of PCM delay handling fixes#5511kv2019i wants to merge 3 commits intothesofproject:topic/sof-devfrom
kv2019i wants to merge 3 commits intothesofproject:topic/sof-devfrom
Conversation
When the sampling rates going in (host) and out (dai) from the DSP are different, the IPC4 delay reporting does not work correctly. Add support for this case by scaling the all raw position values to a common timebase before calculating real-time delay for the PCM. Fixes: 0ea0668 ("ASoC: SOF: ipc4-pcm: Correct the delay calculation") Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
If the stream hits an xrun condition, the delay calculation results in invalid, very large values. The application has no way to interpret these values as it doesn't know the internal boundary limits used in delay calculation. Add a sanity to check the delay value before it is reported back. If it's clearly invalid, return a zero delay and emit a rate limited warning to kernel log. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
6d6dcb5 to
2cb723b
Compare
Assumption that chain DMA module starts the link DMA when 1ms of data is available from host is not correct. Instead the firmware chain DMA module fills the link DMA with initial buffer of zeroes and the host and link DMAs are started at the same time. This results in a small error in delay calculation. This can become a more severe problem if host DMA has delays that exceed 1ms. This results in negative delay to be calculated and bogus values reported to applications. This can confuse some applications like alsa_conformance_test. Fix the issue by correctly calculating the firmware chain DMA preamble size and initializing the start offset to this value. Fixes: a1d203d ("ASoC: SOF: ipc4-pcm: Enable delay reporting for ChainDMA streams") Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> (cherry picked from commit e31e448)
2cb723b to
8a916a5
Compare
Collaborator
Author
|
No longer needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.