* [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
* Re: [PATCH] ASoC: omap-mcbsp: On OMAP1 and OMAP2420 only 16bit format is supported
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
1 sibling, 2 replies; 5+ messages in thread
From: Jarkko Nikula @ 2018-10-26 6:00 UTC (permalink / raw)
To: Peter Ujfalusi; +Cc: alsa-devel, broonie, lgirdwood, aaro.koskinen
On Thu, Oct 25, 2018 at 04:48:24PM +0300, Peter Ujfalusi wrote:
> 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(+)
>
I guess this same holds for OMAP1 too as it has 16-bit McBSP registers
too.
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC: omap-mcbsp: On OMAP1 and OMAP2420 only 16bit format is supported
2018-10-26 6:00 ` Jarkko Nikula
@ 2018-10-26 6:06 ` Jarkko Nikula
2018-10-26 6:21 ` Peter Ujfalusi
1 sibling, 0 replies; 5+ messages in thread
From: Jarkko Nikula @ 2018-10-26 6:06 UTC (permalink / raw)
To: Peter Ujfalusi; +Cc: alsa-devel, broonie, lgirdwood, aaro.koskinen
On Fri, Oct 26, 2018 at 09:00:44AM +0300, Jarkko Nikula wrote:
> On Thu, Oct 25, 2018 at 04:48:24PM +0300, Peter Ujfalusi wrote:
> > 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(+)
> >
> I guess this same holds for OMAP1 too as it has 16-bit McBSP registers
> too.
>
Never mind, I forgot the subject line which mention the OMAP1 while
reading the patch and looking at the code. -ENOCOFFEE yet.
> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Above holds.
--
Jarkko
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC: omap-mcbsp: On OMAP1 and OMAP2420 only 16bit format is supported
2018-10-26 6:00 ` Jarkko Nikula
2018-10-26 6:06 ` Jarkko Nikula
@ 2018-10-26 6:21 ` Peter Ujfalusi
1 sibling, 0 replies; 5+ messages in thread
From: Peter Ujfalusi @ 2018-10-26 6:21 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: alsa-devel, broonie, lgirdwood, aaro.koskinen
On 2018-10-26 09:00, Jarkko Nikula wrote:
> On Thu, Oct 25, 2018 at 04:48:24PM +0300, Peter Ujfalusi wrote:
>> 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(+)
>>
> I guess this same holds for OMAP1 too as it has 16-bit McBSP registers
> too.
Yes, it does. That's why I check for the reg_size.
> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Thanks.
There is a slight chance that I can make the 32bit samples to work on
the sDMA side, but it is a long shot:
Add support for port_window to cyclic
Set the dev_width for omap1/omap2420 to 16bit (as this is the case)
If port_windows is set and it is multiple of dev_width
use single indexed addressing on the McBSP side instead of constant
set the csdp.xxx_packed
set the csdp.data_type to 32bit
set the ES (element size) to 16bit
set EI to -4
Aaargh, no, it can not be done... The TRM states that Packed access only
works if EI=1 in single/double indexed modes.
I don't see how this can be done :(
- Péter
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Applied "ASoC: omap-mcbsp: On OMAP1 and OMAP2420 only 16bit format is supported" to the asoc tree
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-11-05 11:58 ` Mark Brown
1 sibling, 0 replies; 5+ messages in thread
From: Mark Brown @ 2018-11-05 11:58 UTC (permalink / raw)
To: Peter Ujfalusi
Cc: alsa-devel, broonie, lgirdwood, jarkko.nikula, aaro.koskinen
The patch
ASoC: omap-mcbsp: On OMAP1 and OMAP2420 only 16bit format is supported
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 61f18dc78a6b70c409134d0f4d873e9253565e05 Mon Sep 17 00:00:00 2001
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
Date: Thu, 25 Oct 2018 16:48:24 +0300
Subject: [PATCH] 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>
---
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);
--
2.19.0.rc2
^ 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.