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=-7.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 15B97C2BA83 for ; Wed, 12 Feb 2020 10:13:41 +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 9267120848 for ; Wed, 12 Feb 2020 10:13:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="IJg2wRQS"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="u3KLHJfw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9267120848 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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 B6A66166C; Wed, 12 Feb 2020 11:12:48 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B6A66166C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1581502418; bh=5eIcOX1XqO8WEtm+Zq3LIG2ukAbor26UDjUyMFVaKTY=; h=Date:From:To:References:In-Reply-To:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=IJg2wRQSbCYPOfEOjxdYh6k11EyoHj2EwdhUoCSnuCWnVhxwV4hBMWP+KZuUgyHGf sLt5Dv6rAzeSHuDfMS3+BnbkVSmMB2fCttPei9fcmcqOFLJZZK25alyjn9oxm+3TLX 0ZIu3yLsdZhGoY2+l/XDZNTH/5tk9sr/hW0PxRPw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9AE28F80125; Wed, 12 Feb 2020 11:12:47 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3565DF8014F; Wed, 12 Feb 2020 11:12:46 +0100 (CET) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id DCA23F800F0 for ; Wed, 12 Feb 2020 11:12:42 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DCA23F800F0 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="u3KLHJfw" Received: from localhost (unknown [223.226.122.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 085742082F; Wed, 12 Feb 2020 10:12:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581502360; bh=/31DSUbyPT9wvjIWjWYSvPsSt0/Uzn2WXGcTVsBqR4w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=u3KLHJfwWM5DHICrdvCb93YHo1u/HKp2PkWx0Hrp/vQvwo+SJkYyj/IMTFf5cX14S +nitThSNqpqLK2WPbX6qIrDRa4CH8uyAomaNW1qeVl+MXtMiA84M98sHqti59BTnN1 g4s7coO9TL6NAKV3ulLgiYrC4GNxlE6XSHYWZNo8= Date: Wed, 12 Feb 2020 15:42:33 +0530 From: Vinod Koul To: Pierre-Louis Bossart Message-ID: <20200212101233.GA2618@vkoul-mobl> References: <20200114234257.14336-1-pierre-louis.bossart@linux.intel.com> <20200114234257.14336-5-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200114234257.14336-5-pierre-louis.bossart@linux.intel.com> Cc: alsa-devel@alsa-project.org, tiwai@suse.de, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, Ranjani Sridharan , broonie@kernel.org, srinivas.kandagatla@linaro.org, jank@cadence.com, slawomir.blauciak@intel.com, Sanyog Kale , Bard liao , Rander Wang Subject: Re: [alsa-devel] [PATCH v2 4/5] soundwire: intel: add sdw_stream_setup helper for .startup callback 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 14-01-20, 17:42, Pierre-Louis Bossart wrote: > From: Rander Wang > > The sdw stream is allocated and stored in dai to share the sdw runtime > information. > > Signed-off-by: Rander Wang > Signed-off-by: Pierre-Louis Bossart > --- > drivers/soundwire/intel.c | 64 +++++++++++++++++++++++++++++++++++++++ > 1 file changed, 64 insertions(+) > > diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c > index 999aa2cd9fea..c498812522ab 100644 > --- a/drivers/soundwire/intel.c > +++ b/drivers/soundwire/intel.c > @@ -617,6 +617,68 @@ static int intel_post_bank_switch(struct sdw_bus *bus) > * DAI routines > */ > > +static int sdw_stream_setup(struct snd_pcm_substream *substream, > + struct snd_soc_dai *dai) > +{ > + struct snd_soc_pcm_runtime *rtd = substream->private_data; > + struct sdw_stream_runtime *sdw_stream = NULL; > + char *name; > + int i, ret; > + > + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) > + name = kasprintf(GFP_KERNEL, "%s-Playback", dai->name); > + else > + name = kasprintf(GFP_KERNEL, "%s-Capture", dai->name); I don't see name being feed on success. It is nicely freed on error but on success it should be freed when you close -- ~Vinod _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel