提交 be3e0115 编写于 作者: M Marcin Ślusarz 提交者: Jaroslav Kysela

[ALSA] pcm_lib: fix sparse warning about shadowing 'n' symbol

pcm_lib: fix sparse warning about shadowing 'n' symbol
Signed-off-by: NMarcin Ślusarz <marcin.slusarz@gmail.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
Signed-off-by: NJaroslav Kysela <perex@perex.cz>
上级 757d5a75
......@@ -1497,14 +1497,18 @@ void snd_pcm_tick_prepare(struct snd_pcm_substream *substream)
avail = snd_pcm_capture_avail(runtime);
}
if (avail < runtime->control->avail_min) {
snd_pcm_sframes_t n = runtime->control->avail_min - avail;
if (n > 0 && frames > (snd_pcm_uframes_t)n)
frames = n;
snd_pcm_sframes_t to_avail_min =
runtime->control->avail_min - avail;
if (to_avail_min > 0 &&
frames > (snd_pcm_uframes_t)to_avail_min)
frames = to_avail_min;
}
if (avail < runtime->buffer_size) {
snd_pcm_sframes_t n = runtime->buffer_size - avail;
if (n > 0 && frames > (snd_pcm_uframes_t)n)
frames = n;
snd_pcm_sframes_t to_buffer_size =
runtime->buffer_size - avail;
if (to_buffer_size > 0 &&
frames > (snd_pcm_uframes_t)to_buffer_size)
frames = to_buffer_size;
}
if (frames == ULONG_MAX) {
snd_pcm_tick_set(substream, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册