diff options
| author | Joonho Lee <mynameisjune111@gmail.com> | 2026-10-16 08:48:17 +0900 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2026-10-16 10:20:13 +0200 |
| commit | d9f52113f263498f000cecce5c4a82b7d2abf9d2 (patch) | |
| tree | d52856296ddcb490dc34bc7865a4b0a8ae2f8965 /tools/lib/python/kdoc/python_version.py | |
| parent | 1f21537b11863e74d752cab3edbb78cc6efe92fc (diff) | |
ALSA: pcm: refresh linked pointers before draining
Capture hardware can produce samples after the last PCM pointer update.
Drain must refresh those pointers before stopping capture, or its final
availability check can miss the remaining frames. With linked hardware,
the first STOP may freeze other members, so refresh all running members
before entering the drain action.
Factor the traversal into snd_pcm_update_linked_hw_ptr(). Hold
snd_pcm_link_rwsem for reading to keep membership stable during that
traversal, and take each member's stream lock for its ordinary
snd_pcm_update_hw_ptr() call. Include running playback streams and invoke
the helper after pause resume so paused capture also receives its final
update. Keep pause and drain-init outside the helper's rwsem scope.
Updating a pointer inside the group drain action can enter the XRUN stop
path and recursively acquire the group lock. The helper runs before that
action, so an update error follows the existing group XRUN path and is
returned to the caller before drain-init.
Suggested-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/all/87jynkcn60.wl-tiwai@suse.de/
Assisted-by: LLM
Signed-off-by: Joonho Lee <mynameisjune111@gmail.com>
Link: https://patch.msgid.link/v5-core-capture-drain-2.e9b40d3bc08c4162@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
