All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: omap-mcbsp: On OMAP1 and OMAP2420 only 16bit format is supported
@ 2018-10-25 13:48 Peter Ujfalusi
  2018-10-26  6:00 ` Jarkko Nikula
  2018-11-05 11:58 ` Applied "ASoC: omap-mcbsp: On OMAP1 and OMAP2420 only 16bit format is supported" to the asoc tree Mark Brown
  0 siblings, 2 replies; 5+ messages in thread
From: Peter Ujfalusi @ 2018-10-25 13:48 UTC (permalink / raw)
  To: broonie, lgirdwood, jarkko.nikula; +Cc: alsa-devel, aaro.koskinen

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>
---
Hi,

I have noticed that on Nokia n810 32bit samples just don't work at all for audio

Regards,
Peter

 sound/soc/omap/omap-mcbsp.c | 5 +++++
 1 file changed, 5 insertions(+)

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

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

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

end of thread, other threads:[~2018-11-05 11:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-25 13:48 [PATCH] ASoC: omap-mcbsp: On OMAP1 and OMAP2420 only 16bit format is supported Peter Ujfalusi
2018-10-26  6:00 ` Jarkko Nikula
2018-10-26  6:06   ` Jarkko Nikula
2018-10-26  6:21   ` Peter Ujfalusi
2018-11-05 11:58 ` Applied "ASoC: omap-mcbsp: On OMAP1 and OMAP2420 only 16bit format is supported" to the asoc tree 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.