From: Takashi Iwai Subject: Re: patch 1/1: ASoC, DMA crash with application- resolved Date: Sun, 21 Dec 2008 11:28:42 +0100 Message-ID: References: Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 6C0CA2433B for ; Sun, 21 Dec 2008 11:28:43 +0100 (CET) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: "naveenkrishna.ch" Cc: tony@atomide.com, alsa-devel@alsa-project.org, jarkko.nikula@nokia.com List-Id: alsa-devel@alsa-project.org At Sun, 21 Dec 2008 15:08:21 +0530, naveenkrishna.ch wrote: > > On Sun, Dec 21, 2008 at 3:06 PM, Jarkko Nikula wrote: > > > On Sun, Dec 21, 2008 at 9:22 AM, naveenkrishna. ch < > > naveenkrishna.ch@gmail.com> wrote: > > > >> Hi ALSA SOC, > >> > >> I am using a OMAP3 + TWL4030 combination with ASoC > >> > >> in the sound/soc/omap/omap-pcm.c > >> DMA channels are being freed after unlinking in the omap_pcm_hw_free > >> function > >> > >> Which is causing a crash during applications > >> So, stopping the DMA channels before unlinking resolves the issue. > >> > >> here is the patch that solves the issue > >> > >> diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c > >> index e9084fd..679e384 100644 > >> --- a/sound/soc/omap/omap-pcm.c > >> +++ b/sound/soc/omap/omap-pcm.c > >> @@ -116,6 +116,7 @@ static int omap_pcm_hw_free(struct snd_pcm_substream > >> *substream) > >> if (prtd->dma_data == NULL) > >> return 0; > >> > >> + omap_stop_dma(prtd->dma_ch); > >> if (!cpu_is_omap1510()) > >> omap_dma_unlink_lch(prtd->dma_ch, prtd->dma_ch); > >> omap_free_dma(prtd->dma_ch); > >> > >> > >> Is this ok or is there any better way out > >> -- > >> > > > > This looks a bit familiar, I hope so. Is this from linux-omap, mainline or > > in-house kernel? > > > This is what i have seen in the alsa-kernel Check sound git tree. git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git Takashi