Linux on ARM based TI OMAP SoCs
 help / color / mirror / Atom feed
From: Sebastien Guiriec <s-guiriec@ti.com>
To: "Sebastien Guiriec" <s-guiriec@ti.com>,
	"Peter Ujfalusi" <peter.ujfalusi@ti.com>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@opensource.wolfsonmicro.com>,
	"Benoît Cousson" <b-cousson@ti.com>,
	"Jarkko Nikula" <jarkko.nikula@bitmer.com>,
	"Tony Lindgren" <tony@atomide.com>
Cc: linux-omap@vger.kernel.org, alsa-devel@alsa-project.org
Subject: [PATCH 1/5] ASoC: omap-pcm: Move to generic DMA for DT binding
Date: Thu, 7 Mar 2013 13:43:20 +0100	[thread overview]
Message-ID: <1362660204-27074-2-git-send-email-s-guiriec@ti.com> (raw)
In-Reply-To: <1362660204-27074-1-git-send-email-s-guiriec@ti.com>

Update in order to use OMAP DMA DT binding for OMAP2+. In case
of DT boot snd_dmaengine_generic_pcm_open function is used.

Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com>
---
 sound/soc/omap/omap-pcm.c |   12 ++++++++++--
 sound/soc/omap/omap-pcm.h |    1 +
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index c722c2e..df01a95 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -176,13 +176,21 @@ static int omap_pcm_open(struct snd_pcm_substream *substream)
 {
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
 	struct omap_pcm_dma_data *dma_data;
+	int ret;
 
 	snd_soc_set_runtime_hwparams(substream, &omap_pcm_hardware);
 
 	dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
 
-	return snd_dmaengine_pcm_open(substream, omap_dma_filter_fn,
-				      &dma_data->dma_req);
+	if (rtd->cpu_dai->dev->of_node)
+		ret = snd_dmaengine_generic_pcm_open(substream,
+						     rtd->cpu_dai->dev,
+						     dma_data->dma_name);
+	else
+		ret = snd_dmaengine_pcm_open(substream, omap_dma_filter_fn,
+					     &dma_data->dma_req);
+
+	return ret;
 }
 
 static int omap_pcm_close(struct snd_pcm_substream *substream)
diff --git a/sound/soc/omap/omap-pcm.h b/sound/soc/omap/omap-pcm.h
index cabe74c..06faa38 100644
--- a/sound/soc/omap/omap-pcm.h
+++ b/sound/soc/omap/omap-pcm.h
@@ -29,6 +29,7 @@ struct snd_pcm_substream;
 
 struct omap_pcm_dma_data {
 	char		*name;		/* stream identifier */
+	char		*dma_name;	/* DMA request name */
 	int		dma_req;	/* DMA request line */
 	unsigned long	port_addr;	/* transmit/receive register */
 	void (*set_threshold)(struct snd_pcm_substream *substream);
-- 
1.7.10.4


  reply	other threads:[~2013-03-07 12:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-07 12:43 [PATCH 0/5] ASoC: OMAP2+: Update Audio IP with sDMA binding for DT boot Sebastien Guiriec
2013-03-07 12:43 ` Sebastien Guiriec [this message]
2013-03-07 12:43 ` [PATCH 2/5] ASoC: omap-dmic: Update driver for DMA DT binding Sebastien Guiriec
2013-03-07 12:43 ` [PATCH 3/5] ASoC: omap-mcpdm: " Sebastien Guiriec
2013-03-07 12:43 ` [PATCH 4/5] ASoC: omap-mcbsp:Update " Sebastien Guiriec
2013-03-07 12:43 ` [PATCH 5/5] ARM: dts: OMAP2+: Add SDMA Audio IPs bindings Sebastien Guiriec
2013-03-07 13:03 ` [PATCH 0/5] ASoC: OMAP2+: Update Audio IP with sDMA binding for DT boot Peter Ujfalusi
2013-03-08  7:25   ` Jarkko Nikula
2013-03-08  9:23     ` Peter Ujfalusi
2013-03-08 17:24       ` Mark Brown

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=1362660204-27074-2-git-send-email-s-guiriec@ti.com \
    --to=s-guiriec@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=b-cousson@ti.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=jarkko.nikula@bitmer.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=peter.ujfalusi@ti.com \
    --cc=tony@atomide.com \
    /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