forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 140
ASoC: SOF: ipc4/Intel: Improve pcm delay reporting #4851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ujfalusi
merged 16 commits into
thesofproject:topic/sof-dev
from
ujfalusi:peter/sof/pr/ipc4_delay_reporting_batch_01
Mar 20, 2024
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
cd2c934
ASoC: SOF: Add dsp_max_burst_size_in_ms member to snd_sof_pcm_stream
ujfalusi ac31adc
ASoC: SOF: ipc4-topology: Save the DMA maximum burst size for PCMs
ujfalusi 61bab4d
ASoC: SOF: Intel: hda-pcm: Use dsp_max_burst_size_in_ms to place cons…
ujfalusi e993c4e
fixup! ASoC: SOF: Intel: hda: Implement get_stream_position (Linear L…
ujfalusi 9aaf4e6
ASoC: SOF: Introduce a new callback pair to be used for PCM delay rep…
ujfalusi 7827066
ASoC: SOF: Intel: Set the dai/host get frame/byte counter callbacks
ujfalusi 69b5bc2
ASoC: SOF: ipc4-pcm: Use the snd_sof_pcm_get_dai_frame_counter() for …
ujfalusi f3ca746
ASoC: SOF: Intel: hda-common-ops: Do not set the get_stream_position …
ujfalusi a9b30e6
ASoC: SOF: Intel: Remove the get_stream_position callback
ujfalusi a757772
ASoC: SOF: ipc4-pcm: Move struct sof_ipc4_timestamp_info definition l…
ujfalusi be10808
ASoC: SOF: ipc4-pcm: Combine the SOF_IPC4_PIPE_PAUSED cases in pcm_tr…
ujfalusi 42c2f6c
ASoC: SOF: ipc4-pcm: Invalidate the stream_start_offset in PAUSED state
ujfalusi f30d6e6
ASoC: SOF: sof-pcm: Add pointer callback to sof_ipc_pcm_ops
ujfalusi 4eeae62
ASoC: SOF: ipc4-pcm: Correct the delay calculation
ujfalusi f44a0d4
ALSA: hda: Add pplcllpl/u members to hdac_ext_stream
ujfalusi a0fb868
ASoC: SOF: Intel: hda: Compensate LLP in case it is not reset
ujfalusi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default
so this forces the ALSA buffer to be a minimum of 4ms.
Also this is a bit ironic that the race happens for large buffers, IIRC the issue was an xrun with small periods with mplayer? If this is only for large buffers, could we enforce this constraint when
spcm->stream[substream->stream].dsp_buffer_time_ms > SOF_IPC4_MIN_DMA_BUFFER_SIZE;Bear with me, reviewing on Friday afternoon...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The xrun happens with large buffers because application rarely if ever took small (< 4ms) buffers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so in practice could we not make this constraint conditional, e.g.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the ALSA buffer must be constrained at all times, if the PCM uses the default 2ms buffer then the first DMA burst will copy 2ms data, the buffer should be double of that.
While on capture the ALSA buffer size should be at least 2ms, the DMA copies 1ms chunks from DSP to host, this I left out, but I can add.