]> git.itanic.dy.fi Git - linux-stable/commit
ALSA: aloop: Fix random zeros in capture data when using jiffies timer
authorPattara Teerapong <pteerapong@chromium.org>
Thu, 1 Sep 2022 14:40:36 +0000 (14:40 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2022 10:17:05 +0000 (12:17 +0200)
commit763acbb83e501ab710dac7f9f0595f64611377b2
tree7ac35ae6e1559e39d910200dc3f75416b4c83d08
parent88aac6684cf8bc885cca15463cb4407e91f28ff7
ALSA: aloop: Fix random zeros in capture data when using jiffies timer

commit 3e48940abee88b8dbbeeaf8a07e7b2b6be1271b3 upstream.

In loopback_jiffies_timer_pos_update(), we are getting jiffies twice.
First time for playback, second time for capture. Jiffies can be updated
between these two calls and if the capture jiffies is larger, extra zeros
will be filled in the capture buffer.

Change to get jiffies once and use it for both playback and capture.

Signed-off-by: Pattara Teerapong <pteerapong@chromium.org>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220901144036.4049060-1-pteerapong@chromium.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/drivers/aloop.c