[alsa-devel] [PATCH 1/4] ASoC: pxa-ssp: enhance I2S and add Left_J support

Mark Brown broonie at opensource.wolfsonmicro.com
Tue Jun 9 11:58:21 CEST 2009


On Tue, Jun 09, 2009 at 05:39:18PM +0800, Eric Miao wrote:

> OK, not having enough time to read all this thread, let's make sure
> first we are on the same floor:

> frame_width  = number of bit clocks per frame
> sample_width = number of bits per sample

Yes.

> And the assumption that

> frame_width = sample_width * channel ( = LRCLK for I2S )

> is no longer (and ever) correct.

Ish.  That's always been a minimum for most frame formats, though with
programmable ports like the PXA SSP ports I2S normally makes it an exact
requirement.  At the minute the magician is abusing a low frame width to
produce a double rate frame clock but this is an abuse.

> And the TDM mode is actually special for PXA-SSP to emulate the I2S
> protocol, it's no way generic TDM in a common sense. So talking about
> set_tdm_slots(), I'd really like to hide into the format setting code
> of I2S/Left_J to avoid further confusion.

In terms of the ASoC APIs TDM mode should only be required in order to
configure actual TDM.  Ideally the PXA driver should only ever require
set_tdm_slot() for actual TDM configurations and setting up a single
slot for TDM should be equivalent to never having called it at all.

It's use in the PXA code has always been a wart.

> And I still didn't quite capture the issue of magician. Phillip, do
> you have any HW reference to the audio codec and the connection on
> magician?

Essentially his hardware ends up requiring one frame clock per sample in
a stereo stream - ie, a double rate frame clock.  I strongly expect that
it is actually running in a DSP mode with one frame sync per sample
rather than per frame.


More information about the Alsa-devel mailing list