From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kenneth Westfield Subject: Re: [PATCH v3 2/2] sound: lpass-platform: Move dma channel allocation to pcmops Date: Tue, 5 Jul 2016 15:23:41 -0700 Message-ID: <20160705222341.GA14340@kwestfie-linux.qualcomm.com> References: <1467624109-24230-1-git-send-email-srinivas.kandagatla@linaro.org> <1467624109-24230-2-git-send-email-srinivas.kandagatla@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from smtp.codeaurora.org (smtp.codeaurora.org [198.145.29.96]) by alsa0.perex.cz (Postfix) with ESMTP id 1E75B265E22 for ; Wed, 6 Jul 2016 00:23:45 +0200 (CEST) Content-Disposition: inline In-Reply-To: <1467624109-24230-2-git-send-email-srinivas.kandagatla@linaro.org> 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: Srinivas Kandagatla Cc: alsa-devel@alsa-project.org, Banajit Goswami , linux-kernel@vger.kernel.org, Patrick Lai , Takashi Iwai , kwestfie@codeaurora.org, Liam Girdwood , Mark Brown List-Id: alsa-devel@alsa-project.org On Mon, Jul 04, 2016 at 10:21:49AM +0100, Srinivas Kandagatla wrote: > Move dma channel allocations to pcmops open and close functions. Reason > to do this is that, lpass_platform_pcm_free() accesses snd_soc_pcm_runtime > via substream->private data, However By this time runtimes are already > freed as part of soc_cleanup_card_resources() sequence. > > This patch moves the channel allocations/deallocations to pcmops open() > and close() respectively, where the code has valid snd_soc_pcm_runtime. > > Without this patch unloading lpass sound card module would result in below > crash: snip... > Signed-off-by: Srinivas Kandagatla > --- LGTM. Acked-by: Kenneth Westfield -- Kenneth Westfield Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project