Skip to content

Commit 190cb66

Browse files
perexgtiwai
authored andcommitted
ALSA: pcm: playback silence - remove extra code
The removed condition handles de facto only one situation where runtime->silence_filled variable is equal to runtime->buffer_size, because this variable cannot go over the buffer size. This case is implicitly caught by the required comparison of the noise distance with the threshold. Suggested-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230505155244.2312199-4-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 781b4da commit 190cb66

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

sound/core/pcm_lib.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ void snd_pcm_playback_silence(struct snd_pcm_substream *substream, snd_pcm_ufram
6161
runtime->silence_filled = 0;
6262
runtime->silence_start = appl_ptr;
6363
}
64-
if (runtime->silence_filled >= runtime->buffer_size)
65-
return;
6664
/* initialization outside pointer updates */
6765
if (new_hw_ptr == ULONG_MAX)
6866
new_hw_ptr = runtime->status->hw_ptr;

0 commit comments

Comments
 (0)