* How to transfer more than 2 channels between i.MX25 & AD1938 using SSI?
@ 2010-08-26 15:30 Sven Zeisberg
0 siblings, 0 replies; 4+ messages in thread
From: Sven Zeisberg @ 2010-08-26 15:30 UTC (permalink / raw)
To: alsa-devel
Hi,
has anybody succeeded to transfer more than 2 audio channels between
i.MX25 and a CODEC throught the i.MX25 SSI Port?
We have succeeded to set the CODEC (AD1938) as Master to the required
mode (TDM with 8 Timeslots and 32 Bit per Timeslot). However, as soon as
we start to play a wav file with aplay, we can see on the logic analyzer
that the data format on the SSI lines is reset to a stereo mode (2
channels with frame sync changing level between channels).
In the imx-ssi driver, I can see that .channel_max = 2 - therefore my
question: does this driver support more than two channels at all?
BR
Sven
^ permalink raw reply [flat|nested] 4+ messages in thread
* How to transfer more than 2 channels between i.MX25 & AD1938 using SSI?
@ 2010-08-25 14:39 Sven Zeisberg
2010-08-27 11:45 ` Sascha Hauer
0 siblings, 1 reply; 4+ messages in thread
From: Sven Zeisberg @ 2010-08-25 14:39 UTC (permalink / raw)
To: alsa-devel
Hi,
has anybody succeeded to transfer more than 2 audio channels between
i.MX25 and a CODEC throught the i.MX25 SSI Port?
We have succeeded to set the CODEC (AD1938) as Master to the required
mode (TDM with 8 Timeslots and 32 Bit per Timeslot). However, as soon as
we start to play a wav file with aplay, we can see on the logic analyzer
that the data format on the SSI lines is reset to a stereo mode (2
channels with frame sync changing level between channels).
In the imx-ssi driver, I can see that .channel_max = 2 - therefore my
question: does this driver support more than two channels at all?
BR
Sven
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to transfer more than 2 channels between i.MX25 & AD1938 using SSI?
2010-08-25 14:39 Sven Zeisberg
@ 2010-08-27 11:45 ` Sascha Hauer
2010-08-30 6:30 ` Sven Zeisberg
0 siblings, 1 reply; 4+ messages in thread
From: Sascha Hauer @ 2010-08-27 11:45 UTC (permalink / raw)
To: Sven Zeisberg; +Cc: alsa-devel
Hi Sven,
On Wed, Aug 25, 2010 at 04:39:51PM +0200, Sven Zeisberg wrote:
> Hi,
>
> has anybody succeeded to transfer more than 2 audio channels between
> i.MX25 and a CODEC throught the i.MX25 SSI Port?
>
> We have succeeded to set the CODEC (AD1938) as Master to the required
> mode (TDM with 8 Timeslots and 32 Bit per Timeslot). However, as soon as
> we start to play a wav file with aplay, we can see on the logic analyzer
> that the data format on the SSI lines is reset to a stereo mode (2
> channels with frame sync changing level between channels).
>
> In the imx-ssi driver, I can see that .channel_max = 2 - therefore my
> question: does this driver support more than two channels at all?
You have to call snd_soc_dai_set_tdm_slot() with the correct parameters.
This function is currently relatively untested, so expect bugs here. I
would try something like:
snd_soc_dai_set_tdm_slot(cpu_dai, 0xfffff00, 0xfffff00, 8, 32);
slot_width is currently not handled in this function, this may be
wrong. I don't know whether a slot length of 32bit is supported at all
in the hardware.
I only tested this driver with 2 channels since I have no access to a
codec supporting something else.
Hope that helps
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to transfer more than 2 channels between i.MX25 & AD1938 using SSI?
2010-08-27 11:45 ` Sascha Hauer
@ 2010-08-30 6:30 ` Sven Zeisberg
0 siblings, 0 replies; 4+ messages in thread
From: Sven Zeisberg @ 2010-08-30 6:30 UTC (permalink / raw)
To: alsa-devel; +Cc: Sascha Hauer
Hi Sascha,
thanks for your help. We've been trying to use
snd_soc_dai_set_tdm_slot() but had no success. The reason why this
doesn't work is a limitation in the SSI peripheral of the i.MX25:
Acc. to the "i.MX25 Multimedia Applications Processor Reference Manual,
Rev. 1" Chapter 43.1.2.4 I²S Mode, Page 43-16, the i.MX25 reverts in I²S
Slave Mode to "Normal Mode" (as opposed to "Network Mode") by hardware.
In Chapter 43.1.2.1 Normal Mode, Page 43-5, it's explained that this
mode only transfers one timeslot per frame:
"If Normal mode is configured with more than one time slot per frame,
data is transferred only in the first time slot. No data is transferred
in subsequent time slots. In Normal mode, DC[4:0] values corresponding
to more than a single time slot in a frame, only results in lengthening
of the frame."
Therefore, the SSI on the i.MX25 in Slave Mode (I don't know the other
i.MX chips) can not do more than 2 channels.
This kind of explaines also, why all multi channel examples from
freescale use the ESAI Port. The only codec used in their PDKs on the
SSI is a plain stereo chip.
To overcome this limitation, we've split up our working group and will
work on SSI master mode supoprt in the imx-ssc.c driver.
BR Sven
Am 27.08.2010 13:45, schrieb Sascha Hauer:
> Hi Sven,
>
> On Wed, Aug 25, 2010 at 04:39:51PM +0200, Sven Zeisberg wrote:
>> Hi,
>>
>> has anybody succeeded to transfer more than 2 audio channels between
>> i.MX25 and a CODEC throught the i.MX25 SSI Port?
>>
>> We have succeeded to set the CODEC (AD1938) as Master to the required
>> mode (TDM with 8 Timeslots and 32 Bit per Timeslot). However, as soon as
>> we start to play a wav file with aplay, we can see on the logic analyzer
>> that the data format on the SSI lines is reset to a stereo mode (2
>> channels with frame sync changing level between channels).
>>
>> In the imx-ssi driver, I can see that .channel_max = 2 - therefore my
>> question: does this driver support more than two channels at all?
> You have to call snd_soc_dai_set_tdm_slot() with the correct parameters.
> This function is currently relatively untested, so expect bugs here. I
> would try something like:
>
> snd_soc_dai_set_tdm_slot(cpu_dai, 0xfffff00, 0xfffff00, 8, 32);
>
> slot_width is currently not handled in this function, this may be
> wrong. I don't know whether a slot length of 32bit is supported at all
> in the hardware.
>
> I only tested this driver with 2 channels since I have no access to a
> codec supporting something else.
>
> Hope that helps
>
> Sascha
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-08-30 6:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-26 15:30 How to transfer more than 2 channels between i.MX25 & AD1938 using SSI? Sven Zeisberg
-- strict thread matches above, loose matches on Subject: below --
2010-08-25 14:39 Sven Zeisberg
2010-08-27 11:45 ` Sascha Hauer
2010-08-30 6:30 ` Sven Zeisberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).