[alsa-devel] [PATCH 1/3][RFC] ASoC: pxa-ssp: Use 16-bit DMA for magician stereo

Philipp Zabel philipp.zabel at gmail.com
Wed Mar 11 19:16:58 CET 2009


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 at 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



More information about the Alsa-devel mailing list