From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lars-Peter Clausen Subject: Re: [PATCH 01/17] ASoC: dmaengine-pcm: Make requesting the DMA channel at PCM open optional Date: Tue, 16 Apr 2013 07:33:12 +0200 Message-ID: <516CE298.6050203@metafoo.de> References: <1366046404-8759-1-git-send-email-lars@metafoo.de> <1366046404-8759-2-git-send-email-lars@metafoo.de> <516C8D1B.3070901@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mailhost.informatik.uni-hamburg.de (mailhost.informatik.uni-hamburg.de [134.100.9.70]) by alsa0.perex.cz (Postfix) with ESMTP id 7EAB02652A3 for ; Tue, 16 Apr 2013 07:30:46 +0200 (CEST) In-Reply-To: <516C8D1B.3070901@gmail.com> 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: Ryan Mallon Cc: Ola Lilja , alsa-devel@alsa-project.org, Rajeev Kumar , Russell King , Stephen Warren , 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/16/2013 01:28 AM, Ryan Mallon wrote: > On 16/04/13 03:19, Lars-Peter Clausen wrote: >> Refactor the dmaengine PCM library to allow the DMA channel to be requested >> before opening a PCM substream. snd_dmaengine_pcm_open() now expects a DMA >> channel instead of a filter function and filter parameter as its parameters. >> snd_dmaengine_pcm_close() is updated to not release the DMA channel. This allows >> a dmaengine based PCM driver to request its channels before the substream is >> opened. >> >> The patch also introduces two new functions, snd_dmaengine_pcm_open_request_chan() >> and snd_dmaengine_pcm_close_release_chan(), which have the same signature and >> behaviour of the old snd_dmaengine_pcm_{open,close}() and internally use the new >> variants of these functions. All users of snd_dmaengine_pcm_{open,close}() are >> updated to use snd_dmaengine_pcm_open_request_chan() and >> snd_dmaengine_pcm_close_release_chan(). >> >> Signed-off-by: Lars-Peter Clausen > > > >> --- a/sound/soc/cirrus/ep93xx-pcm.c >> +++ b/sound/soc/cirrus/ep93xx-pcm.c >> @@ -69,7 +69,8 @@ static int ep93xx_pcm_open(struct snd_pcm_substream *substream) >> >> snd_soc_set_runtime_hwparams(substream, &ep93xx_pcm_hardware); >> >> - return snd_dmaengine_pcm_open(substream, ep93xx_pcm_dma_filter, >> + return snd_dmaengine_pcm_open_request_chan(substream, >> + ep93xx_pcm_dma_filter, >> snd_soc_dai_get_dma_data(rtd->cpu_dai, substream)); > > ep93xx_pcm_dma_filter is now unused and can be removed? It's still used in the same way as before. - Lars