forked from Minki/linux
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>
This commit is contained in:
parent
59e4282717
commit
35383a2412
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user