From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755860AbcGEWXr (ORCPT ); Tue, 5 Jul 2016 18:23:47 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:41953 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751052AbcGEWXo (ORCPT ); Tue, 5 Jul 2016 18:23:44 -0400 Date: Tue, 5 Jul 2016 15:23:41 -0700 From: Kenneth Westfield To: Srinivas Kandagatla Cc: Mark Brown , alsa-devel@alsa-project.org, Patrick Lai , kwestfie@codeaurora.org, Banajit Goswami , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/2] sound: lpass-platform: Move dma channel allocation to pcmops Message-ID: <20160705222341.GA14340@kwestfie-linux.qualcomm.com> Mail-Followup-To: Srinivas Kandagatla , Mark Brown , alsa-devel@alsa-project.org, Patrick Lai , Banajit Goswami , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , linux-kernel@vger.kernel.org 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-Disposition: inline In-Reply-To: <1467624109-24230-2-git-send-email-srinivas.kandagatla@linaro.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.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