You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Suspicious buffer position reported with insanely large delays #4686
/* Calculate the delay taking into account that both pointer can wrap */div64_u64_rem(tmp_ptr, substream->runtime->boundary, &tmp_ptr);
if (substream->stream==SNDRV_PCM_STREAM_PLAYBACK) {
head_ptr=substream->runtime->status->hw_ptr;
tail_ptr=tmp_ptr; // stream position reported by FW
} else {
head_ptr=tmp_ptr;
tail_ptr=substream->runtime->status->hw_ptr;
}
if (head_ptr<tail_ptr) {
dev_err(sdev->dev, " delay header %lu, tail %lu, b %lu", head_ptr, tail_ptr, substream->runtime->boundary);
returnsubstream->runtime->boundary-tail_ptr+head_ptr;
}
Activity
RanderWang commentedon Nov 6, 2023
@plbossart I add some log in kernel
[ 1279.512385] sof-audio-pci-intel-mtl 0000:00:1f.3: delay header 35136, tail 35300, b 8646911284551352320
[ 1279.520144] sof-audio-pci-intel-mtl 0000:00:1f.3: delay header 35136, tail 35684, b 8646911284551352320
[ 1279.520622] sof-audio-pci-intel-mtl 0000:00:1f.3: delay header 35520, tail 35684, b 8646911284551352320
[ 1279.520962] sof-audio-pci-intel-mtl 0000:00:1f.3: delay header 35520, tail 35732, b 8646911284551352320
[ 1279.521244] sof-audio-pci-intel-mtl 0000:00:1f.3: delay header 35568, tail 35732, b 8646911284551352320
Should exchange header_ptr & tail_ptr or change above " if (head_ptr < tail_ptr) { " to " if (head_ptr > tail_ptr) {" ?
plbossart commentedon Nov 6, 2023
What code is this referring to @RanderWang? I can't follow the suggestion since there's no context.
RanderWang commentedon Nov 7, 2023
@plbossart it is done in SOF delay function
ASoC: SOF: ipc4-pcm: calculate delay with snd_sof_pcm_platform_pointer
ASoC: SOF: ipc4-pcm: calculate delay with snd_sof_pcm_platform_pointer
plbossart commentedon Feb 9, 2024
replaced by #4781 - same problem with delays.