From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Subject: Re: [PATCH 03/17] ASoC: Add a generic dmaengine_pcm driver Date: Tue, 16 Apr 2013 14:02:23 -0600 Message-ID: <516DAE4F.9030408@wwwdotorg.org> References: <1366046404-8759-1-git-send-email-lars@metafoo.de> <1366046404-8759-4-git-send-email-lars@metafoo.de> <516C8A12.4020405@wwwdotorg.org> <516CE224.2070506@metafoo.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from avon.wwwdotorg.org (avon.wwwdotorg.org [70.85.31.133]) by alsa0.perex.cz (Postfix) with ESMTP id A52DC261599 for ; Tue, 16 Apr 2013 22:02:29 +0200 (CEST) In-Reply-To: <516CE224.2070506@metafoo.de> 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: Lars-Peter Clausen Cc: Ola Lilja , alsa-devel@alsa-project.org, Rajeev Kumar , Russell King , Ryan Mallon , Vinod Koul , Liam Girdwood , Peter Ujfalusi , Hartley Sweeten , Mark Brown , Laxman Dewangan , Sebastien Guiriec , Markus Pargmann , Shawn Guo , Lee Jones , Jarkko Nikula List-Id: alsa-devel@alsa-project.org On 04/15/2013 11:31 PM, Lars-Peter Clausen wrote: > On 04/16/2013 01:15 AM, Stephen Warren wrote: >> On 04/15/2013 11:19 AM, Lars-Peter Clausen wrote: >>> This patch adds a generic dmaengine PCM driver. It builds on top of the >>> dmaengine PCM library and adds the missing pieces like DMA channel management, >>> buffer management and channel configuration. It will be able to replace the >>> majority of the existing platform specific dmaengine based PCM drivers. >> >>> Devicetree is used to map the DMA channels to the PCM device. >> ... >>> diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c >> ... >>> +static const char * const dmaengine_pcm_dma_channel_names[] = { >>> + [SNDRV_PCM_STREAM_PLAYBACK] = "tx", >>> + [SNDRV_PCM_STREAM_CAPTURE] = "rx", >>> +}; >> ... >>> +int snd_dmaengine_pcm_register(struct device *dev, >>> + const struct snd_dmaengine_pcm_config *config, unsigned int flags) >> ... >>> + for (i = SNDRV_PCM_STREAM_PLAYBACK; i <= SNDRV_PCM_STREAM_CAPTURE; i++) { >>> + pcm->chan[i] = of_dma_request_slave_channel(dev->of_node, >>> + dmaengine_pcm_dma_channel_names[i]); >> >> That all means that the Tegra patch won't work yet. Tegra currently uses >> a custom DT binding for DMA since we haven't fully converted everything >> over the very new DT DMA bindings. So, the patches for Tegra may well be >> fine /if/ staged in the correct order with some .dts file changes too. >> >> I wonder if all the other platforms this series modifies already have >> the appropriate DMA properties set up? A very quick look implies that >> (at least some) imx and omap do, but I'm not sure about spear, ep93xx, >> ux500? >> >> Perhaps Laxman can provide appropriate DT fixes for Tegra while I'm on >> vacation, and test out this series, if I don't get to it in the next 2 >> days before my vacation. > > None of the converted platforms is changed to use DT yet, they all use the > compat path. So there shouldn't be any functional change for them. Converting > them to use the generic DT bindings can be done one by one later. Ah right. So, this series works fine on Tegra20 at least: Tested-by: Stephen Warren