summary refs log tree commit diff
path: root/sound/soc/omap
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2018-10-25 16:48:24 +0300
committerMark Brown <broonie@kernel.org>2018-11-05 11:26:12 +0000
commit61f18dc78a6b70c409134d0f4d873e9253565e05 (patch)
tree00c3fb36624d767014febf2eecbaa490dbfaae8a /sound/soc/omap
parentde3636488cff3678bafaf2d024e64c003ed2beae (diff)
downloadlinux-61f18dc78a6b70c409134d0f4d873e9253565e05.tar.gz
ASoC: omap-mcbsp: On OMAP1 and OMAP2420 only 16bit format is supported
For samples sizes of 20/24/32 bit the DRR2/DXR2 registers must be used to
receive or transmit the most significant part of the 32bit sample.
We can not trick the system by using the DRR2/DXR2 register offset and use
32bit element size since these (and other McBSP) registers are 16bit ones.

We would need support for port_window in cyclic mode from the sDMA driver,
but it is not straight forward as we would need to have the sDMA frame to
cover the 32bit (DRR2+DRR1/DXR2+DXR1), but the frames must cover the ALSA
period to be able to receive periodic interrupts.

Since the 32bit samples are not working (DMA timeout), just remove it in
case we have McBSP with reg_size of 2.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/omap')
-rw-r--r--sound/soc/omap/omap-mcbsp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c
index d0ebb6b9bfac..caa24c463b3e 100644
--- a/sound/soc/omap/omap-mcbsp.c
+++ b/sound/soc/omap/omap-mcbsp.c
@@ -862,6 +862,11 @@ static int asoc_mcbsp_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
+	if (mcbsp->pdata->reg_size == 2) {
+		omap_mcbsp_dai.playback.formats = SNDRV_PCM_FMTBIT_S16_LE;
+		omap_mcbsp_dai.capture.formats = SNDRV_PCM_FMTBIT_S16_LE;
+	}
+
 	ret = devm_snd_soc_register_component(&pdev->dev,
 					      &omap_mcbsp_component,
 					      &omap_mcbsp_dai, 1);