]> git.baikalelectronics.ru Git - kernel.git/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)
committerTakashi Iwai <tiwai@suse.de>
Fri, 2 Sep 2022 06:58:20 +0000 (08:58 +0200)
commit3def5dea6e0028a5069e4a158669b5546c801892
treeaeb2ae363b3317d99aff66f82c015b6a80d82b2c
parent4c51084fed6e39fb353851c895c5a151edfa0a88
ALSA: aloop: Fix random zeros in capture data when using jiffies timer

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>
sound/drivers/aloop.c