All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3][RFC] ASoC: pxa-ssp: Use 16-bit DMA for magician stereo
@ 2009-03-11 18:16 Philipp Zabel
  2009-03-11 18:16 ` [PATCH 2/3][RFC] ASoC: Add Magician machine support Philipp Zabel
                   ` (2 more replies)
  0 siblings, 3 replies; 25+ messages in thread
From: Philipp Zabel @ 2009-03-11 18:16 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, Philipp Zabel

Please advise how this behaviour could be made configurable. I guess
the only machines that will ever need this are HTC Magician, Blueangel
and Himalaya.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
---
 sound/soc/pxa/pxa-ssp.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c
index 569c0a6..bc9d306 100644
--- a/sound/soc/pxa/pxa-ssp.c
+++ b/sound/soc/pxa/pxa-ssp.c
@@ -22,6 +22,7 @@
 #include <linux/io.h>
 
 #include <asm/irq.h>
+#include <asm/mach-types.h>
 
 #include <sound/core.h>
 #include <sound/pcm.h>
@@ -634,8 +635,14 @@ static int pxa_ssp_hw_params(struct snd_pcm_substream *substream,
 	/* select correct DMA params */
 	if (substream->stream != SNDRV_PCM_STREAM_PLAYBACK)
 		dma = 1; /* capture DMA offset is 1,3 */
-	if (chn == 2)
-		dma += 2; /* stereo DMA offset is 2, mono is 0 */
+	/* FIXME: Magician needs a way to configure 16-bit DMA for stereo */
+	if (machine_is_magician()) {
+		if (width == 32)
+			dma += 2; /* 32-bit DMA offset is 2, 16-bit is 0 */
+	} else {
+		if (chn == 2)
+			dma += 2; /* stereo DMA offset is 2, mono is 0 */
+	}
 	cpu_dai->dma_data = ssp_dma_params[cpu_dai->id][dma];
 
 	dev_dbg(&ssp->pdev->dev, "pxa_ssp_hw_params: dma %d\n", dma);
-- 
1.6.2

^ permalink raw reply related	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2009-03-12 23:46 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-11 18:16 [PATCH 1/3][RFC] ASoC: pxa-ssp: Use 16-bit DMA for magician stereo Philipp Zabel
2009-03-11 18:16 ` [PATCH 2/3][RFC] ASoC: Add Magician machine support Philipp Zabel
2009-03-11 19:02   ` Liam Girdwood
2009-03-11 21:03     ` pHilipp Zabel
2009-03-11 22:25   ` Mark Brown
2009-03-11 22:38     ` Liam Girdwood
2009-03-11 22:44       ` Mark Brown
2009-03-12 10:07         ` [PATCH 3/5] ASoC: Replace remaining uses of snd_soc_cnew with snd_soc_add_controls Philipp Zabel
2009-03-12 10:11           ` Mark Brown
2009-03-12 10:06     ` [PATCH] ASoC: Add Magician machine support Philipp Zabel
2009-03-12 15:58       ` Mark Brown
2009-03-11 18:17 ` [PATCH 3/3][RFC] ASoC: pxa-ssp: Don't use SSCR0_SerClkDiv and SSCR0_SCR Philipp Zabel
2009-03-11 18:44   ` Daniel Mack
2009-03-11 21:10     ` pHilipp Zabel
2009-03-12  0:46       ` Daniel Mack
2009-03-12 10:23         ` Mark Brown
2009-03-12 10:27           ` Daniel Mack
2009-03-12 10:29             ` Mark Brown
2009-03-12 10:36             ` Daniel Mack
2009-03-12 19:09             ` pHilipp Zabel
2009-03-12 19:18               ` Mark Brown
2009-03-12 23:46                 ` Daniel Mack
2009-03-11 22:27   ` Mark Brown
2009-03-11 22:29     ` Mark Brown
2009-03-12 15:57 ` [PATCH 1/3][RFC] ASoC: pxa-ssp: Use 16-bit DMA for magician stereo Mark Brown

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.