[alsa-devel] ASoC: pxa2xx-ssp
Daniel Ribeiro
drwyrm at gmail.com
Thu Oct 30 12:40:17 CET 2008
Em Seg, 2008-10-27 às 13:44 +0000, Mark Brown escreveu:
> On Mon, Oct 27, 2008 at 11:19:34AM -0200, Daniel Ribeiro wrote:
>
> > Ok, i will rebase my work on pxa-ssp.c. But a first look shows that
> > pxa_ssp_hw_params sets the ssp frame size depending on the audio stream
> > format even for I2S mode. I think it will not work, as I2S needs to
> > stick to 32bit frame size.
>
> That's not a general requirement of I2S - many devices are OK with
> scaling the number of bit clocks with the data.
>
> > Is there anybody using SND_SOC_DAIFMT_I2S with this driver?
>
> I'd go so far as to say that most of the testing has been in I2S mode.
> Other modes have been tested but most of the usage is with I2S.
>
> I suspect that what you need to do here to interoperate well with your
> codec is to set things up to use TDM so that the extra clocks are
> generated by what the CPU believes are idle TDM slots.
Im trying to setup as you said.
I get correct audio if use one tdm_slot and mono audio, but i couldnt
get stereo audio working correctly without changing the ssp frame size.
Here are my test results for stereo S16_LE audio:
set_tdm_slot(cpu_dai, 1, 2), SSCR0_Datasize(16):
Only left channel works.
set_tdm_slot(cpu_dai, 2, 2), SSCR0_Datasize(16):
No I/O.
set_tdm_slot(cpu_dai, 3, 2), SSCR0_Datasize(16):
Only left channel works.
set_tdm_slot(cpu_dai, 1, 1), SSCR0_Datasize(16) | SSCR0_EDSS:
Both channels work.
What could be wrong? Can you suggest me how to setup the tdm slots so i
can get both channels?
On my board CLK and FRM are driven by the codec, pxa is slave. I have
no specs for the codec, only a 2.4 kernel driver that works with
(SSCR0_Datasize(16) | SSCR0_EDSS | SSCR0_SlotsPerFrm(1)).
>
> > I will send you a patch later today. Thanks for the reply! :)
>
> When submitting patches please do try to submit separate patches for
> separate logical changes - for example, your previous patch mixed in
> changes for recent PXA APIs with changes in the behaviour of the code.
That was not a patch submission. :)
--
Daniel Ribeiro
More information about the Alsa-devel
mailing list