]> git.alsa-project.org Git - alsa-lib.git/commit
pcm: rate: fix last_commit_ptr boundary wrapping
authorAlan Young <consult.awy@gmail.com>
Fri, 30 Dec 2022 16:48:14 +0000 (16:48 +0000)
committerJaroslav Kysela <perex@perex.cz>
Fri, 30 Dec 2022 19:12:42 +0000 (20:12 +0100)
commit2e82060ebcd68f5ea1fe3dccc5a6518008132a54
tree750a3af3ac33bd5a1ac3c2e6210bc54c2adf465a
parent9f2c68cef716aa45942b502a42d94b84289f23bc
pcm: rate: fix last_commit_ptr boundary wrapping

Wrap last_commit_ptr using boundary. Was just wrapped to 0, which is
correct only if the buffer size, and hence the boundary, is an integer
multiple of the period size.

Fixes: 467d69c5bc1 ("Fix CPU hog with combination of rate plugin")
Fixes: 29041c52207 ("fix infinite draining of the rate plugin in SND_PCM_NONBLOCK mode")
Link: https://lore.kernel.org/alsa-devel/20221230164814.901457-1-consult.awy@gmail.com/
Signed-off-by: Alan Young <consult.awy@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/pcm/pcm_rate.c