ALSA: pcm: playback silence - move silence variable updates to separate function
authorJaroslav Kysela <perex@perex.cz>
Fri, 5 May 2023 15:52:42 +0000 (17:52 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 5 May 2023 16:23:52 +0000 (18:23 +0200)
commit6d8d56db0cd14c415c26e27d949c615750c40d70
tree1ecb903a9fcccc10a10d1af329dafe0b318045fc
parent190cb66a4ee0ac4419e1f8a9de46074a8c8e4c23
ALSA: pcm: playback silence - move silence variable updates to separate function

The code tracking the added samples in thresholded mode and the code
tracking the just played samples in top-up mode are semantically
identical, so factor it out to a common function to enhance readability.

Co-developed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20230505155244.2312199-5-oswald.buddenhagen@gmx.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/pcm_lib.c