From: zonque@gmail.com (Daniel Mack)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/5] ASoC: pxa: pxa-ssp: set dma filter data from startup hook
Date: Mon, 12 Aug 2013 10:42:40 +0200 [thread overview]
Message-ID: <1376296961-20564-5-git-send-email-zonque@gmail.com> (raw)
In-Reply-To: <1376296961-20564-1-git-send-email-zonque@gmail.com>
With the new dmaengine implementation, the filter_data parameter has
to be set earlier, from pxa_ssp_startup().
Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Mark Brown <broonie@linaro.org>
---
sound/soc/pxa/pxa-ssp.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c
index c0dcc35..a3119a0 100644
--- a/sound/soc/pxa/pxa-ssp.c
+++ b/sound/soc/pxa/pxa-ssp.c
@@ -84,7 +84,6 @@ static void pxa_ssp_disable(struct ssp_device *ssp)
static void pxa_ssp_set_dma_params(struct ssp_device *ssp, int width4,
int out, struct snd_dmaengine_dai_dma_data *dma)
{
- dma->filter_data = out ? &ssp->drcmr_tx : &ssp->drcmr_rx;
dma->addr_width = width4 ? DMA_SLAVE_BUSWIDTH_4_BYTES :
DMA_SLAVE_BUSWIDTH_2_BYTES;
dma->maxburst = 16;
@@ -107,6 +106,10 @@ static int pxa_ssp_startup(struct snd_pcm_substream *substream,
dma = kzalloc(sizeof(struct snd_dmaengine_dai_dma_data), GFP_KERNEL);
if (!dma)
return -ENOMEM;
+
+ dma->filter_data = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ?
+ &ssp->drcmr_tx : &ssp->drcmr_rx;
+
snd_soc_dai_set_dma_data(cpu_dai, substream, dma);
return ret;
--
1.8.3.1
next prev parent reply other threads:[~2013-08-12 8:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-12 8:42 [PATCH 0/5] ASoC: pxa dmaengine preparation patches Daniel Mack
2013-08-12 8:42 ` [PATCH 1/5] ALSA: move dmaengine implementation from ASoC to ALSA core Daniel Mack
2013-08-12 8:55 ` Daniel Mack
2013-08-15 10:18 ` Mark Brown
2013-08-12 8:42 ` [PATCH 2/5] ASoC: pxa: pxa-ssp: add DT bindings Daniel Mack
2013-08-15 10:33 ` Mark Brown
2013-08-15 10:51 ` Daniel Mack
2013-08-15 13:39 ` Mark Brown
2013-08-15 13:43 ` Daniel Mack
2013-08-15 14:01 ` Mark Brown
2013-08-12 8:42 ` [PATCH 3/5] ASoC: pxa: use snd_dmaengine_dai_dma_data Daniel Mack
2013-08-12 8:42 ` Daniel Mack [this message]
2013-08-12 8:42 ` [PATCH 5/5] ASoC: pxa: add DT bindings for pxa2xx-pcm Daniel Mack
2013-08-12 9:00 ` [alsa-devel] " Lars-Peter Clausen
2013-08-12 9:17 ` Daniel Mack
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1376296961-20564-5-git-send-email-zonque@gmail.com \
--to=zonque@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).