diff options
| author | Joonho Lee <mynameisjune111@gmail.com> | 2026-10-16 08:48:09 +0900 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2026-10-16 10:19:58 +0200 |
| commit | 1f21537b11863e74d752cab3edbb78cc6efe92fc (patch) | |
| tree | 21793e03f05b1dfa9cb1b67ca9855c29ecffeca0 /tools/lib/python/kdoc/python_version.py | |
| parent | e05347e54ae3dd0f44cf332d7cb4e29e027e170c (diff) | |
ALSA: pcm: allow capture reads while draining
Capture drain can leave buffered samples in DRAINING, but the transfer
state check rejects reads in that state. Allow capture reads to consume
the remaining frames while preserving the playback state check.
When drain wakes a blocked capture reader, return the actual available
frame count from wait_for_avail(). A zero count would make the transfer
loop discard a nonempty tail. Finish capture EOF with snd_pcm_drain_done()
so the state transition applies to that substream and leaves a linked
playback stream draining its queued data.
Allow capture hwsync to use the cached final pointer in DRAINING. Capture
has already stopped, so DELAY and SYNC_PTR(HWSYNC) can report its remaining
frames without another driver pointer callback. Playback retains its
existing pointer update.
Synthetic atomic and nonatomic tests reproduce dropped tail frames,
linked playback stopping at capture EOF, and rejected position queries.
With this change, a blocked read gets all 64 tail frames, playback stays
DRAINING at capture EOF, and the queries succeed with no extra callback.
Assisted-by: LLM
Signed-off-by: Joonho Lee <mynameisjune111@gmail.com>
Link: https://patch.msgid.link/v5-core-capture-drain-1.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
