From patchwork Wed Jun 3 05:28:06 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 27609 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n535Tnxv007637 for ; Wed, 3 Jun 2009 05:29:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755926AbZFCF3m (ORCPT ); Wed, 3 Jun 2009 01:29:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753091AbZFCF3m (ORCPT ); Wed, 3 Jun 2009 01:29:42 -0400 Received: from smtp.nokia.com ([192.100.122.233]:25932 "EHLO mgw-mx06.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753587AbZFCF3l convert rfc822-to-8bit (ORCPT ); Wed, 3 Jun 2009 01:29:41 -0400 Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-mx06.nokia.com (Switch-3.2.6/Switch-3.2.6) with ESMTP id n535SigS023360; Wed, 3 Jun 2009 08:28:46 +0300 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 3 Jun 2009 08:28:05 +0300 Received: from mgw-sa02.ext.nokia.com ([147.243.1.48]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Wed, 3 Jun 2009 08:28:05 +0300 Received: from cseresznye.localnet (cseresznye.ntc.nokia.com [172.22.144.108]) by mgw-sa02.ext.nokia.com (Switch-3.2.6/Switch-3.2.6) with ESMTP id n535S451008134 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 3 Jun 2009 08:28:05 +0300 From: Peter Ujfalusi To: ext Janusz Krzysztofik Subject: Re: *SPAM* Re: Please help in adding ams-delta support to ASoC Date: Wed, 3 Jun 2009 08:28:06 +0300 User-Agent: KMail/1.11.3 (Linux/2.6.29-gentoo-r5; KDE/4.2.3; i686; ; ) Cc: Jarkko Nikula , "linux-omap@vger.kernel.org" , "alsa-devel@vger.kernel.org" References: <4A1BEBE3.8010306@tis.icnet.pl> <20090601210413.7678bf42.jhnikula@gmail.com> <4A25040A.4050506@tis.icnet.pl> In-Reply-To: <4A25040A.4050506@tis.icnet.pl> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200906030828.06933.peter.ujfalusi@nokia.com> X-OriginalArrivalTime: 03 Jun 2009 05:28:05.0637 (UTC) FILETIME=[1268D350:01C9E40C] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Hello Janusz, On Tuesday 02 June 2009 13:50:50 ext Janusz Krzysztofik wrote: > Hi Jarkko, > > Jarkko Nikula wrote: > > Is the older implementation working at commit > > d8376cc482b241701f7606c81ad578b90853e175 in linux-omap, i.e. last > > commit before their removal? > > I have managed to check with that revision this morning and yes, the > driver is working. > > I'll try you other suggestions as soon as I get back home. Looking at the code at commit: d8376cc482b241701f7606c81ad578b90853e175 on l-o the comment about the need for the call the omap_stop_dma puzzled me. Can you try something like this: break; This is on top of sound-2.6:topic/asoc, but l-o should not be that different. Call the omap_stop_dma before actually starting the dma, and call stop also before restarting it. diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index 6454e15..2df1792 100644 --- a/sound/soc/omap/omap-pcm.c +++ b/sound/soc/omap/omap-pcm.c @@ -67,6 +67,7 @@ static void omap_pcm_dma_irq(int ch, u16 stat, void *data) spin_lock_irqsave(&prtd->lock, flags); if (prtd->period_index >= 0) { if (++prtd->period_index == runtime->periods) { + omap_stop_dma(prtd->dma_ch); prtd->period_index = 0; omap_start_dma(prtd->dma_ch); } @@ -191,6 +192,7 @@ static int omap_pcm_trigger(struct snd_pcm_substream *substream, int cmd) case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: + omap_stop_dma(prtd->dma_ch); prtd->period_index = 0; omap_start_dma(prtd->dma_ch);