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);