[alsa-devel] [RFC] I2S and LEFT_J (was: ASoC: pxa-ssp: enhance I2S and add Left_J support)

Daniel Ribeiro drwyrm at gmail.com
Mon Jun 15 16:57:04 CEST 2009

Em Seg, 2009-06-15 às 16:45 +0800, Eric Miao escreveu:
> Well, I'm completely lost in this thread. Can anyone give a summary
> on this issue? And it looks like set_tdm_slot() is used to generalize
> the issue of envelop (or the actual frame/sample width), and the DAI
> format setting code here will be generalized??

The patches fixes a number of issues on pxa-ssp, and extends

1. No abuse of SSCR0_MOD.

Currently pxa-ssp requires SSCR0_MOD to work, but this should only be
needed if you need a frame width larger than 32 bits or if you are
really using network mode.

2. Frame width is set wrong for 2*16 bits format.

Currently it sets 32bits DMA but 16bits frame width for stereo S16_LE
audio. It currently "works" because people set network mode with 2
active slots.

3. set_tdm_slot should be only for real network mode.

Currently set_tdm_slot is always required. After the patches the users
only need to call set_tdm_slot if they are really using network mode. 

For frame widths > 32bits (SSCR0_MOD is needed to support these cases),
a "fake" network mode is automatically set.

4. Extends set_tdm_slot to include the desired frame width

It is needed to support real network mode. As the code is currently, the
frame width is set based on the the pcm format, so you cant have network
mode running if the devices uses 2 different pcm formats.

5. I2S and LEFT_J

I have 2 versions of this patch, first doesn't do the enveloping, and
just uses 32bits frames for 2*16bits I2S samples. The other does the
enveloping on 64bits frames for 2*16bits I2S samples (this can only work
on pxa3xx). I need somebody to test the first version on pxa3xx, as it
is much simpler and doesn't waste 32 bitclocks for each frame.

Having the start of the sample offset by 1 bitclk is not something
specific to I2S, its how DSP_A works too, and I believe that we
shouldn't make I2S a special case (vs DSP_A).

For what it matters, the only difference on I2S/LEFT_J vs DSP_A/DSP_B
should be the SSPSFRM duration as it is needed to emulate the LRCLK.
(and of course, the fact that I2S/LEFT_J are stereo only and that
network mode can't be supported)

> Could you please send out all the four patches? Sorry late on this,
> busy with the merging stuff.
Yes, i will send the patches again later today.

Daniel Ribeiro
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Esta =?ISO-8859-1?Q?=E9?= uma parte de mensagem
 assinada digitalmente
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20090615/cda481c6/attachment-0001.sig 

More information about the Alsa-devel mailing list