Skip to content

Commit 3b985d3

Browse files
tiwaigregkh
authored andcommitted
ALSA: vx: Don't try to update capture stream before running
[ Upstream commit ed3c177d960bb5881b945ca6f784868126bb90db ] The update of stream costs significantly, and we should avoid it unless the stream really has started. Check pipe->running flag instead of pipe->prepared. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 51abb2a commit 3b985d3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sound/drivers/vx/vx_pcm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ static void vx_pcm_capture_update(struct vx_core *chip, struct snd_pcm_substream
10151015
int size, space, count;
10161016
struct snd_pcm_runtime *runtime = subs->runtime;
10171017

1018-
if (! pipe->prepared || (chip->chip_status & VX_STAT_IS_STALE))
1018+
if (!pipe->running || (chip->chip_status & VX_STAT_IS_STALE))
10191019
return;
10201020

10211021
size = runtime->buffer_size - snd_pcm_capture_avail(runtime);

0 commit comments

Comments
 (0)