]> 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:04:54 +0000 (12:04 +0200)
commite275cf3318245690d70ccf649da3470c1dc9ab79
tree47fb34c9d180ad133354a1f98108cbe12ab5de54
parent45321a7d02b7cf9b3f97e3987fc1e4d649b82da2
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