diff options
| author | Jaroslav Kysela <[email protected]> | 2023-05-05 15:52:39 +0000 |
|---|---|---|
| committer | Takashi Iwai <[email protected]> | 2023-05-05 16:23:49 +0000 |
| commit | 2fbaa44a59887f9fd70c986f39c4ac9aebd0c8a1 (patch) | |
| tree | 8a6603e95047bfb92bd746ec92a5aaa329bae595 /tools/perf/scripts/python/sctop.py | |
| parent | ALSA: pcm: Revert "ALSA: pcm: rewrite snd_pcm_playback_silence()" (diff) | |
| download | kernel-2fbaa44a59887f9fd70c986f39c4ac9aebd0c8a1.tar.gz kernel-2fbaa44a59887f9fd70c986f39c4ac9aebd0c8a1.zip | |
ALSA: pcm: fix playback silence - use the actual new_hw_ptr for the threshold mode
The snd_pcm_playback_hw_avail() function uses runtime->status->hw_ptr.
Unfortunately, in case when we call this function from snd_pcm_update_hw_ptr0(),
this variable contains the previous hardware pointer. Use the new_hw_ptr
argument to calculate hw_avail (filled samples by the user space) to
correct the threshold comparison.
The new_hw_ptr argument may also be set to ULONG_MAX which means the
initialization phase. In this case, use runtime->status->hw_ptr.
Suggested-by: Oswald Buddenhagen <[email protected]>
Signed-off-by: Jaroslav Kysela <[email protected]>
Reviewed-by: Oswald Buddenhagen <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/sctop.py')
0 files changed, 0 insertions, 0 deletions
