All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Liam Girdwood <lrg@ti.com>, Tony Lindgren <tony@atomide.com>,
	Russell King <rmk+kernel@arm.linux.org.uk>,
	Vinod Koul <vinod.koul@intel.com>, Dan Williams <djbw@fb.com>,
	Jarkko Nikula <jarkko.nikula@bitmer.com>
Cc: alsa-devel@alsa-project.org, linux-omap@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>,
	Ricardo Neri <ricardo.neri@ti.com>,
	Lars-Peter Clausen <lars@metafoo.de>
Subject: [PATCH v3 13/15] ASoC: omap-pcm, omap-dmic: Change the use of omap_pcm_dma_data->data_type
Date: Fri, 14 Sep 2012 15:05:56 +0300	[thread overview]
Message-ID: <1347624358-25582-14-git-send-email-peter.ujfalusi@ti.com> (raw)
In-Reply-To: <1347624358-25582-1-git-send-email-peter.ujfalusi@ti.com>

Instead of the OMAP DMA data type definition the data_type will be used to
specify the number of bits the DMA word should be configured or 0 in case
when based on the stream's format the omap-pcm can decide the needed DMA
word size.
This feature is needed for the omap-hdmi where the sDMA need to be
configured for 32bit word type regardless of the audio format used.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 sound/soc/omap/omap-hdmi.c | 3 +--
 sound/soc/omap/omap-pcm.c  | 3 ++-
 sound/soc/omap/omap-pcm.h  | 3 ++-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/sound/soc/omap/omap-hdmi.c b/sound/soc/omap/omap-hdmi.c
index b194646..0951767 100644
--- a/sound/soc/omap/omap-hdmi.c
+++ b/sound/soc/omap/omap-hdmi.c
@@ -34,7 +34,6 @@
 #include <sound/asoundef.h>
 #include <video/omapdss.h>
 
-#include <plat/dma.h>
 #include "omap-pcm.h"
 #include "omap-hdmi.h"
 
@@ -100,7 +99,7 @@ static int omap_hdmi_dai_hw_params(struct snd_pcm_substream *substream,
 		return -EINVAL;
 	}
 
-	priv->dma_params.data_type = OMAP_DMA_DATA_TYPE_S32;
+	priv->dma_params.data_type = 32;
 
 	snd_soc_dai_set_dma_data(dai, substream,
 				 &priv->dma_params);
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index 4c13a5f..74da4b7 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -183,7 +183,8 @@ static int omap_pcm_prepare(struct snd_pcm_substream *substream)
 	memset(&dma_params, 0, sizeof(dma_params));
 
 	if (dma_data->data_type)
-		dma_params.data_type = dma_data->data_type;
+		dma_params.data_type = omap_pcm_get_dma_type(
+				dma_data->data_type);
 	else
 		dma_params.data_type = omap_pcm_get_dma_type(
 				snd_pcm_format_physical_width(runtime->format));
diff --git a/sound/soc/omap/omap-pcm.h b/sound/soc/omap/omap-pcm.h
index 1bf47e4..cabe74c 100644
--- a/sound/soc/omap/omap-pcm.h
+++ b/sound/soc/omap/omap-pcm.h
@@ -32,7 +32,8 @@ struct omap_pcm_dma_data {
 	int		dma_req;	/* DMA request line */
 	unsigned long	port_addr;	/* transmit/receive register */
 	void (*set_threshold)(struct snd_pcm_substream *substream);
-	int		data_type;	/* data type 8,16,32 */
+	int		data_type;	/* 8, 16, 32 (bits) or 0 to let omap-pcm
+					 * to decide the sDMA data type */
 	int		packet_size;	/* packet size only in PACKET mode */
 };
 
-- 
1.7.12


WARNING: multiple messages have this Message-ID (diff)
From: peter.ujfalusi@ti.com (Peter Ujfalusi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 13/15] ASoC: omap-pcm, omap-dmic: Change the use of omap_pcm_dma_data->data_type
Date: Fri, 14 Sep 2012 15:05:56 +0300	[thread overview]
Message-ID: <1347624358-25582-14-git-send-email-peter.ujfalusi@ti.com> (raw)
In-Reply-To: <1347624358-25582-1-git-send-email-peter.ujfalusi@ti.com>

Instead of the OMAP DMA data type definition the data_type will be used to
specify the number of bits the DMA word should be configured or 0 in case
when based on the stream's format the omap-pcm can decide the needed DMA
word size.
This feature is needed for the omap-hdmi where the sDMA need to be
configured for 32bit word type regardless of the audio format used.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 sound/soc/omap/omap-hdmi.c | 3 +--
 sound/soc/omap/omap-pcm.c  | 3 ++-
 sound/soc/omap/omap-pcm.h  | 3 ++-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/sound/soc/omap/omap-hdmi.c b/sound/soc/omap/omap-hdmi.c
index b194646..0951767 100644
--- a/sound/soc/omap/omap-hdmi.c
+++ b/sound/soc/omap/omap-hdmi.c
@@ -34,7 +34,6 @@
 #include <sound/asoundef.h>
 #include <video/omapdss.h>
 
-#include <plat/dma.h>
 #include "omap-pcm.h"
 #include "omap-hdmi.h"
 
@@ -100,7 +99,7 @@ static int omap_hdmi_dai_hw_params(struct snd_pcm_substream *substream,
 		return -EINVAL;
 	}
 
-	priv->dma_params.data_type = OMAP_DMA_DATA_TYPE_S32;
+	priv->dma_params.data_type = 32;
 
 	snd_soc_dai_set_dma_data(dai, substream,
 				 &priv->dma_params);
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index 4c13a5f..74da4b7 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -183,7 +183,8 @@ static int omap_pcm_prepare(struct snd_pcm_substream *substream)
 	memset(&dma_params, 0, sizeof(dma_params));
 
 	if (dma_data->data_type)
-		dma_params.data_type = dma_data->data_type;
+		dma_params.data_type = omap_pcm_get_dma_type(
+				dma_data->data_type);
 	else
 		dma_params.data_type = omap_pcm_get_dma_type(
 				snd_pcm_format_physical_width(runtime->format));
diff --git a/sound/soc/omap/omap-pcm.h b/sound/soc/omap/omap-pcm.h
index 1bf47e4..cabe74c 100644
--- a/sound/soc/omap/omap-pcm.h
+++ b/sound/soc/omap/omap-pcm.h
@@ -32,7 +32,8 @@ struct omap_pcm_dma_data {
 	int		dma_req;	/* DMA request line */
 	unsigned long	port_addr;	/* transmit/receive register */
 	void (*set_threshold)(struct snd_pcm_substream *substream);
-	int		data_type;	/* data type 8,16,32 */
+	int		data_type;	/* 8, 16, 32 (bits) or 0 to let omap-pcm
+					 * to decide the sDMA data type */
 	int		packet_size;	/* packet size only in PACKET mode */
 };
 
-- 
1.7.12

  parent reply	other threads:[~2012-09-14 12:07 UTC|newest]

Thread overview: 82+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-14 12:05 [PATCH v3 00/15] ASoC: OMAP: Convert to use dmaengine Peter Ujfalusi
2012-09-14 12:05 ` Peter Ujfalusi
2012-09-14 12:05 ` Peter Ujfalusi
2012-09-14 12:05 ` [PATCH v3 01/15] dmaengine: omap: Support for element mode in cyclic DMA Peter Ujfalusi
2012-09-14 12:05   ` Peter Ujfalusi
2012-09-14 12:05   ` Peter Ujfalusi
2012-09-14 12:05 ` [PATCH v3 02/15] dmaengine: omap: Add support for pause/resume in cyclic dma mode Peter Ujfalusi
2012-09-14 12:05   ` Peter Ujfalusi
2012-09-17  3:13   ` Vinod Koul
2012-09-17  3:13     ` Vinod Koul
2012-09-17  3:13     ` Vinod Koul
2012-09-17  8:41     ` Peter Ujfalusi
2012-09-17  8:41       ` Peter Ujfalusi
2012-09-18  8:28     ` Russell King - ARM Linux
2012-09-18  8:28       ` Russell King - ARM Linux
2012-09-18  8:28       ` Russell King - ARM Linux
2012-09-17  9:55   ` Vinod Koul
2012-09-17  9:55     ` Vinod Koul
2012-09-17  9:55     ` Vinod Koul
2012-09-14 12:05 ` [PATCH v3 03/15] dmaengine: Add flags parameter to dmaengine_prep_dma_cyclic() Peter Ujfalusi
2012-09-14 12:05   ` Peter Ujfalusi
2012-09-14 12:05   ` Peter Ujfalusi
2012-09-17  9:58   ` Vinod Koul
2012-09-17  9:58     ` Vinod Koul
2012-09-22 15:09   ` Mark Brown
2012-09-22 15:09     ` Mark Brown
2012-09-22 15:09     ` Mark Brown
2012-09-14 12:05 ` [PATCH v3 04/15] dmaengine: Pass flags via device_prep_dma_cyclic() callback Peter Ujfalusi
2012-09-14 12:05   ` Peter Ujfalusi
2012-09-14 12:05   ` Peter Ujfalusi
2012-09-17  9:59   ` Vinod Koul
2012-09-17  9:59     ` Vinod Koul
2012-09-17  9:59     ` Vinod Koul
2012-09-17 10:06   ` Nicolas Ferre
2012-09-17 10:06     ` Nicolas Ferre
2012-09-17 10:06     ` Nicolas Ferre
2012-09-19  2:45   ` Shawn Guo
2012-09-19  2:45     ` Shawn Guo
2012-09-19  2:45     ` Shawn Guo
2012-09-14 12:05 ` [PATCH v3 05/15] dmaengine: omap-dma: Add support to suppress interrupts in cyclic mode Peter Ujfalusi
2012-09-14 12:05   ` Peter Ujfalusi
2012-09-14 12:05   ` Peter Ujfalusi
2012-09-17 10:00   ` Vinod Koul
2012-09-17 10:00     ` Vinod Koul
2012-09-14 12:05 ` [PATCH v3 06/15] ASoC: omap-mcbsp: Use sDMA packet mode instead of frame mode Peter Ujfalusi
2012-09-14 12:05   ` Peter Ujfalusi
2012-09-14 12:05 ` [PATCH v3 07/15] ASoC: omap-pcm: Select sDMA synchronization based on packet_size Peter Ujfalusi
2012-09-14 12:05   ` Peter Ujfalusi
2012-09-14 12:05 ` [PATCH v3 08/15] ASoC: OMAP: Remove sync_mode from omap_pcm_dma_data struct Peter Ujfalusi
2012-09-14 12:05   ` Peter Ujfalusi
2012-09-14 12:05   ` Peter Ujfalusi
2012-09-14 12:05 ` [PATCH v3 09/15] ASoC: omap-pcm: Prepare to configure the DMA data_type based on stream properties Peter Ujfalusi
2012-09-14 12:05   ` Peter Ujfalusi
2012-09-14 12:05   ` Peter Ujfalusi
2012-09-14 12:05 ` [PATCH v3 10/15] ARM: OMAP4: hwmod_data: Add resource names to McPDM memory ranges Peter Ujfalusi
2012-09-14 12:05   ` Peter Ujfalusi
2012-09-14 12:05 ` [PATCH v3 11/15] ASoC: omap-mcpdm: Use platform_get_resource_* to get resources Peter Ujfalusi
2012-09-14 12:05   ` Peter Ujfalusi
2012-09-14 12:05   ` Peter Ujfalusi
2012-09-14 12:05 ` [PATCH v3 12/15] ASoC: OMAP: mcbsp, mcpdm, dmic: Let omap-pcm to pick the dma_type Peter Ujfalusi
2012-09-14 12:05   ` Peter Ujfalusi
2012-09-14 12:05 ` Peter Ujfalusi [this message]
2012-09-14 12:05   ` [PATCH v3 13/15] ASoC: omap-pcm, omap-dmic: Change the use of omap_pcm_dma_data->data_type Peter Ujfalusi
2012-09-14 12:05 ` [PATCH v3 14/15] ASoC: OMAP: mcbsp, mcpdm, dmic, hdmi: Set dma_data at startup time Peter Ujfalusi
2012-09-14 12:05   ` Peter Ujfalusi
2012-09-14 12:05 ` [PATCH v3 15/15] ASoC: omap-pcm: Convert to use dmaengine Peter Ujfalusi
2012-09-14 12:05   ` Peter Ujfalusi
2012-09-15 21:38 ` [alsa-devel] [PATCH v3 00/15] ASoC: OMAP: " Janusz Krzysztofik
2012-09-15 21:38   ` Janusz Krzysztofik
2012-09-15 21:38   ` Janusz Krzysztofik
2012-09-17  3:17 ` Vinod Koul
2012-09-17  3:17   ` Vinod Koul
2012-09-17  3:17   ` Vinod Koul
2012-09-17  8:44   ` [alsa-devel] " Peter Ujfalusi
2012-09-17  8:44     ` Peter Ujfalusi
2012-09-17  8:44     ` Peter Ujfalusi
2012-09-17  9:51     ` Vinod Koul
2012-09-17  9:51       ` Vinod Koul
2012-09-17  9:51       ` Vinod Koul
2012-09-24 23:36 ` [alsa-devel] " Ricardo Neri
2012-09-24 23:36   ` Ricardo Neri
2012-09-24 23:36   ` Ricardo Neri

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=1347624358-25582-14-git-send-email-peter.ujfalusi@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=djbw@fb.com \
    --cc=jarkko.nikula@bitmer.com \
    --cc=jkrzyszt@tis.icnet.pl \
    --cc=lars@metafoo.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=ricardo.neri@ti.com \
    --cc=rmk+kernel@arm.linux.org.uk \
    --cc=tony@atomide.com \
    --cc=vinod.koul@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.