From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E35EC43603 for ; Mon, 9 Dec 2019 19:31:42 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E6733205ED for ; Mon, 9 Dec 2019 19:31:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="Gp73NnyM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E6733205ED Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 339EF16F5; Mon, 9 Dec 2019 20:21:02 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 339EF16F5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1575919312; bh=cqiuS/WO5tubLZ8GuCJoLWYeg7xZ+QigKfGpnV01EPY=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Gp73NnyMvn1F+hgi6bA/kUHqY//29ymI2xJNvtOgm0LGLYU6mikPu6Y+JaAwjHMfB Mkae6fX4YfS9QhKeuBWBpa147EKAOsSXVBrEGB2ZeT39hVyTt9n4ewwJSjyyUoGZw6 iIwKt710W7ux9/iGxGu7c8ozJsjQ0+/SpgzrAFCU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D5778F80234; Mon, 9 Dec 2019 20:08:18 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E3343F8023F; Mon, 9 Dec 2019 20:08:16 +0100 (CET) Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 4ED89F800C4 for ; Mon, 9 Dec 2019 20:08:13 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4ED89F800C4 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 2A0F2ABC7; Mon, 9 Dec 2019 19:08:13 +0000 (UTC) Date: Mon, 09 Dec 2019 20:08:12 +0100 Message-ID: From: Takashi Iwai To: Takashi Sakamoto In-Reply-To: References: <20191209094943.14984-1-tiwai@suse.de> <20191209094943.14984-10-tiwai@suse.de> <20191209151655.GA8090@workstation> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Cc: alsa-devel@alsa-project.org Subject: Re: [alsa-devel] [PATCH 5.6 09/71] ALSA: firewire: Use managed buffer allocation X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Mon, 09 Dec 2019 16:58:02 +0100, Takashi Iwai wrote: > > On Mon, 09 Dec 2019 16:16:56 +0100, > Takashi Sakamoto wrote: > > > > Hi, > > > > I'm not opposed to this patchset. The direction is preferable. > > > > However changes in this patchset brings bugs in error path of > > each implementation for pcm.hw_params. > > > > On Mon, Dec 09, 2019 at 10:48:41AM +0100, Takashi Iwai wrote: > > > diff --git a/sound/firewire/bebob/bebob_pcm.c b/sound/firewire/bebob/bebob_pcm.c > > > index d4edd06d32cf..2ee91ff6891e 100644 > > > --- a/sound/firewire/bebob/bebob_pcm.c > > > +++ b/sound/firewire/bebob/bebob_pcm.c > > > @@ -214,10 +214,6 @@ static int pcm_hw_params(struct snd_pcm_substream *substream, > > > struct snd_bebob *bebob = substream->private_data; > > > int err; > > > > > > - err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); > > > - if (err < 0) > > > - return err; > > > - > > > if (substream->runtime->status->state == SNDRV_PCM_STATE_OPEN) { > > > unsigned int rate = params_rate(hw_params); > > > unsigned int frames_per_period = params_period_size(hw_params); > > > @@ -231,7 +227,7 @@ static int pcm_hw_params(struct snd_pcm_substream *substream, > > > mutex_unlock(&bebob->mutex); > > > } > > > > > > - return err; > > > + return 0; > > > } > > > > This should return the err variable to report failure of isochronous > > resources reservation. > > > > However I found that ALSA oxfw/fireface drivers returns 0 even if it > > fails. This is bug since v5.3 kernel. > > > > Would you please apply below two patches into your three, then modify > > your patch for all firewire drivers to return error correctly? > > Yes, that sounds like a correct fix. Thank you for spotting out. > > So, please go ahead, submit these two patches, then I'll update the > fix containing your correction above and submit as v2 (maybe only for > this, as the whole series is too big to re-submit). Never mind, the patches there were already good enough, so I applied these two now. Will resend v2 fix for this patch. thanks, Takashi _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel