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 37ABAC43603 for ; Mon, 9 Dec 2019 15:59:08 +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 3E20C2077B for ; Mon, 9 Dec 2019 15:59:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="A6Hy98YT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3E20C2077B 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 2319111C; Mon, 9 Dec 2019 16:58:15 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2319111C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1575907145; bh=PIKINXKZLjq4Fh8E9vLXJyBUY3+PMucvlOp6epc8PxI=; h=Date:From:To:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=A6Hy98YTeK5BZ93z55Lhg0smIogvXmptJckLz9FDdFPUal8+x/qcVft6663eZtMuj ovIyQtyNhyrYtSgzYb4xrvBRutn7UeVn8Bn6Mjm9/O05enZZ1Uo8K+i+12WLagJzYt csGfrKW420I16VzdVkLbPsLrncs3sLwCFMEeUzzY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9A690F801F4; Mon, 9 Dec 2019 16:58:14 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C699DF800E1; Mon, 9 Dec 2019 16:58:07 +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 DA338F800E1 for ; Mon, 9 Dec 2019 16:58:04 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DA338F800E1 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 0CD68AD93; Mon, 9 Dec 2019 15:58:03 +0000 (UTC) Date: Mon, 09 Dec 2019 16:58:02 +0100 Message-ID: From: Takashi Iwai To: Takashi Sakamoto In-Reply-To: <20191209151655.GA8090@workstation> 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: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). Takashi _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel