From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: compress offload patch Date: Fri, 04 Mar 2016 10:49:34 +0100 Message-ID: References: Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id E60132654BA for ; Fri, 4 Mar 2016 10:49:34 +0100 (CET) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Eric Laurent Cc: "Koul, Vinod" , alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org On Thu, 03 Mar 2016 17:09:52 +0100, Eric Laurent wrote: > > Takashi, Vinod, > > Can you help with merging the attached patch for compress offload core > upstream? Looks good to me, but I'm waiting for ack from Vinod. BTW, I noticed that SNDRV_PCM_STREAM_PREPARED is missing in the comment in snd_compr_open(). Should be fixed in another patch. thanks, Takashi > > Thanks. > > Eric. > [1.2 ] > > From 1166adf4b63ea3ee1d119c46d97fa65c76a08447 Mon Sep 17 00:00:00 2001 > From: Eric Laurent > Date: Wed, 2 Mar 2016 09:54:57 -0800 > Subject: [PATCH] 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 > --- > sound/core/compress_offload.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c > index 1b77852..7c57f37 100644 > --- a/sound/core/compress_offload.c > +++ b/sound/core/compress_offload.c > @@ -281,6 +281,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; > -- > 2.7.0.rc3.207.g0ac5344 >