From patchwork Thu Jun 12 13:16:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 4341991 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C1D78BEEAA for ; Thu, 12 Jun 2014 13:19:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 11CE520357 for ; Thu, 12 Jun 2014 13:19:26 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 5199520351 for ; Thu, 12 Jun 2014 13:19:20 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 05A1426578E; Thu, 12 Jun 2014 15:19:19 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 46B9B26576D; Thu, 12 Jun 2014 15:19:06 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id B2638265770; Thu, 12 Jun 2014 15:19:04 +0200 (CEST) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.130]) by alsa0.perex.cz (Postfix) with ESMTP id B9DA1265711 for ; Thu, 12 Jun 2014 15:18:56 +0200 (CEST) Received: from wuerfel.localnet (HSI-KBW-134-3-133-35.hsi14.kabel-badenwuerttemberg.de [134.3.133.35]) by mrelayeu.kundenserver.de (node=mreue001) with ESMTP (Nemesis) id 0Ld9iz-1WUEYf1RHV-00iRg2; Thu, 12 Jun 2014 15:16:28 +0200 From: Arnd Bergmann To: Mark Brown Date: Thu, 12 Jun 2014 15:16:27 +0200 Message-ID: <5498575.LeGAfDJTRA@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.11.0-18-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <4306380.m7SZhHfhaK@wuerfel> References: <6123933.aGtaUr149J@wuerfel> <20140605133606.GX2520@sirena.org.uk> <4306380.m7SZhHfhaK@wuerfel> MIME-Version: 1.0 X-Provags-ID: V02:K0:pt+1IlgpSb1QRc33Gn4Cd9ZqUlFjRMDwNmqPci6VlLd YHXYlR+b9ZP8EsqKUPkNRrp4+92a3Nu0LUburi7SjqBWgZ6B8c sZb2G1BO8frPTSAAVhOiElU8mNDxNdx3VsFHL0xDt9pCqEYakP /e6zokl5COcrxfk330cvSjafpE8UXdzesH4qF5VS+wroHpOoGr KqUW8sSGVNm5YgBMyNVCi6t2HC5tlQssthtY0d7IQlvYygOYXu eteDxC+1Vav3bEnloZ8oB2aHsweIhRA0n+Wb5xcuobUkjkcQiG xU16M5l8dkFQ6Qi2Tp31eQBwN4+96bBCgxonriaiR5JI0R4MPc FFkb0aaAX3ZZXLf7GMNw= Cc: alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org, Russell Linux , Heiko Stuebner , Sangbeom Kim , lgirdwood@gmail.com, Kukjin Kim , Ben Dooks , linux-arm-kernel@lists.infradead.org Subject: Re: [alsa-devel] [PATCH 1/2] [RFC] ASoC: samsung: move s3c24xx over to dmaengine X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP On Thursday 05 June 2014 16:04:03 Arnd Bergmann wrote: > On Thursday 05 June 2014 14:36:06 Mark Brown wrote: > > On Thu, Jun 05, 2014 at 03:20:50PM +0200, Arnd Bergmann wrote: > > > The s3c24xx sound support keeps giving randconfig build errors, this > > > is a new attempt to solve it by moving the driver over to use dmaengine > > > exclusively. > > > > We already have a patch pending for this, it's just waiting until after > > the merge window to avoid bisection breakage since it depends on > > dmaengine changes. > > Ok, very good. Actually, I think it would still be good to do something about the samsung/ac97.c file, which is the only reason we are keeping the SAMSUNG_DMADEV code around that is part of the dependency chain Russell posted, and it's definitely broken on anything but s3c24xx. If we do something like the patch below, we can just disable SAMSUNG_DMADEV already, which simplifies the dependency chains a lot. We can then remove that code entirely in 3.17. Note that for !CONFIG_S3C24XX_DMA, the code is currently broken, as samsung_dma_get_ops()->started is a NULL pointer for dmadev. Arnd diff --git a/sound/soc/samsung/ac97.c b/sound/soc/samsung/ac97.c index 68d9303..1db1028 100644 --- a/sound/soc/samsung/ac97.c +++ b/sound/soc/samsung/ac97.c @@ -225,9 +225,11 @@ static int s3c_ac97_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai) { u32 ac_glbctrl; +#ifdef CONFIG_S3C24XX_DMA struct snd_soc_pcm_runtime *rtd = substream->private_data; struct s3c_dma_params *dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); +#endif ac_glbctrl = readl(s3c_ac97.regs + S3C_AC97_GLBCTRL); if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) @@ -253,10 +255,9 @@ static int s3c_ac97_trigger(struct snd_pcm_substream *substream, int cmd, writel(ac_glbctrl, s3c_ac97.regs + S3C_AC97_GLBCTRL); - if (!dma_data->ops) - dma_data->ops = samsung_dma_get_ops(); - - dma_data->ops->started(dma_data->channel); +#ifdef CONFIG_S3C24XX_DMA + s3c2410_dma_ctrl(dma_data->channel, S3C2410_DMAOP_STARTED); +#endif return 0; } @@ -265,9 +266,11 @@ static int s3c_ac97_mic_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai) { u32 ac_glbctrl; +#ifdef CONFIG_S3C24XX_DMA struct snd_soc_pcm_runtime *rtd = substream->private_data; struct s3c_dma_params *dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); +#endif ac_glbctrl = readl(s3c_ac97.regs + S3C_AC97_GLBCTRL); ac_glbctrl &= ~S3C_AC97_GLBCTRL_MICINTM_MASK; @@ -287,10 +290,9 @@ static int s3c_ac97_mic_trigger(struct snd_pcm_substream *substream, writel(ac_glbctrl, s3c_ac97.regs + S3C_AC97_GLBCTRL); - if (!dma_data->ops) - dma_data->ops = samsung_dma_get_ops(); - - dma_data->ops->started(dma_data->channel); +#ifdef CONFIG_S3C24XX_DMA + s3c2410_dma_ctrl(dma_data->channel, S3C2410_DMAOP_STARTED); +#endif return 0; }