summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2017-01-04 12:34:14 +0100
committerSasha Levin <alexander.levin@verizon.com>2017-12-06 21:20:11 -0500
commitdb2e059fb898dc8142796b3a7010a626c0c398f5 (patch)
tree218cf471db5e245a0a6b61ae8b861826016ed244 /sound
parentc2bca39c34d8b5e8edcb7d7b629c7f24e011bbe5 (diff)
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>
Diffstat (limited to 'sound')
-rw-r--r--sound/drivers/vx/vx_pcm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/drivers/vx/vx_pcm.c b/sound/drivers/vx/vx_pcm.c
index 11467272089e..69f252585780 100644
--- a/sound/drivers/vx/vx_pcm.c
+++ b/sound/drivers/vx/vx_pcm.c
@@ -1015,7 +1015,7 @@ static void vx_pcm_capture_update(struct vx_core *chip, struct snd_pcm_substream
int size, space, count;
struct snd_pcm_runtime *runtime = subs->runtime;
- if (! pipe->prepared || (chip->chip_status & VX_STAT_IS_STALE))
+ if (!pipe->running || (chip->chip_status & VX_STAT_IS_STALE))
return;
size = runtime->buffer_size - snd_pcm_capture_avail(runtime);