summaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2016-03-02 09:54:57 -0800
committerTakashi Iwai <tiwai@suse.de>2016-03-04 14:50:46 +0100
commit35383a24129a47a0b8365ed17d3dcd2f75175929 (patch)
treeee79e3d0987a602bfedf0d6e47be1dc469a0f29f /sound/core
parent59e4282717cb2adbfd12314ff484669a85827412 (diff)
downloadop-kernel-dev-35383a24129a47a0b8365ed17d3dcd2f75175929.zip
op-kernel-dev-35383a24129a47a0b8365ed17d3dcd2f75175929.tar.gz
ALSA: compress: allow writes in SNDRV_PCM_STATE_PREPARED state
Allow writes in SNDRV_PCM_STATE_PREPARED state so that more than one buffer fragment can be written from user space before calling SNDRV_COMPRESS_START. Signed-off-by: Eric Laurent <elaurent@google.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/compress_offload.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
index 7fac3ca..9e7c2f0 100644
--- a/sound/core/compress_offload.c
+++ b/sound/core/compress_offload.c
@@ -286,6 +286,7 @@ static ssize_t snd_compr_write(struct file *f, const char __user *buf,
mutex_lock(&stream->device->lock);
/* write is allowed when stream is running or has been steup */
if (stream->runtime->state != SNDRV_PCM_STATE_SETUP &&
+ stream->runtime->state != SNDRV_PCM_STATE_PREPARED &&
stream->runtime->state != SNDRV_PCM_STATE_RUNNING) {
mutex_unlock(&stream->device->lock);
return -EBADFD;
OpenPOWER on IntegriCloud