]> git.alsa-project.org Git - alsa-lib.git/commit
pcm: mmap_emul: account for pending frames in delay and guard avail
authorJaroslav Kysela <perex@perex.cz>
Mon, 30 Nov 2026 20:38:06 +0000 (21:38 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 30 Nov 2026 20:41:19 +0000 (21:41 +0100)
commitaf0cba2f2df4b4b387695d401cdae7c76116ff50
tree11cb5a9f998bda0d437d97d109a0b07fb2a064c9
parentce8faf20348cb2f9f528ed4adbf8b808bcdeeb87
pcm: mmap_emul: account for pending frames in delay and guard avail

Add a delay op that adds the pending frames to the slave delay, so snd_pcm_delay()
and snd_pcm_status() agree after a short write.

Guard the status->avail subtraction against unsigned underflow if the slave
reports an inconsistent avail.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/pcm/pcm_mmap_emul.c