Hi all,
I've always considered the I2S interface as a synchronised bus meant to transmit audio content in PCM format.
Now.. in my project I need to interface a GSM modem to the i.MX8 MQ processor.
All (not only one) the datasheets of all the GSM modems that I've been considering refer to their audio interface as PCM (not I2S).
Signals seem different (although similar). The PCM interface doesn't differentiate between L and R channel and the sync signal only provides synchronisation between successive samples.
GSM modem audio interface signals (PCM interface)
is it possible to configure the SAI in the iMX8 MQ processor to communicate with this standard?
Not interested in details. For now I'd only need the name of the configuration that NXP uses to identify this standard (I2S, Codec/DSP modes, TDM, etc.).
Thanks and kind regards,
Alessandro
Hi Alessandro,
I'm also facing the same issue on IMX8MM.
In your scenario who is the PCM master? Quectel or IMX8?(I mean who generate the clk & sync?)
And how do you set your DAI fmt for PCM interface(SAI)?
I was confuse on the PCM data formats, which one should I need to set?
ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAI_FORMAT_DSP_A | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM);
Thanks
Hi Alessandro
>is it possible to configure the SAI in the iMX8 MQ processor to communicate with this standard?
sorry i.MX8MQ I2S does not support PCM format which described on Pulse-code modulation - Wikipedia
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Alessandro
one can look at sect.3.9.11 SAI/I2S switching specifications
i.MX 8M Dual / 8M QuadLite / 8M Quad Applications Processors Data Sheet for Consumer Products
and sai appnotes for other processors, as sai is the same module:
AN12202 Using Synchronous Audio Interface (SAI) on S32K148
https://www.nxp.com/docs/en/application-note/AN12202.pdf
Best regards
igor
Hi Igor,
Thanks. Actually the first link shows the SAI waveforms only in I2S mode.
The second link shows exactly what I was looking for.
The DSP mode is described at page 4. This matches exactly the waveforms of my GSM module. So, if I could use this operating mode on the iMX8MQ, that would work.
The document that the second link refers to though, is about another processor: the S32K148,
Question:
Can I assume that there is no difference between the implementation of the SAI in the S32K148 and iMX8MQ?
Thanks and kind regards,
Alessandro
Hi Alessandro
yes in general SAI module is the same on both processors.
Best regards
igor
Hi Igor,
I think it's solved... I'm waiting for NXP's official feedback but I think that “codec/DSP” functional mode (as any other SAI operating mode) is nothing but a configuration of the SYNC signal, polarities and width of involved signals.
So there won’t be any register telling the SAI to behave like a “PCM” interface or “DSP/Codec”, or “I2S” interface, but I2S, PCM and DSP/Codec interfaces are different configurations of the signals involved (mainly SCK and SYNC) setting individual registers.
Below an example of how to configure the SAI interface to communicate with the GSM module that I intend to use. Different information came from different sources.. it was a bit of a collage work but I think it makes sense.
Hi Alessandro,
I'm facing the same issue on a custom IMX8M board. I'm going to try your solution to support a Quectel PCM modem.
Any news from NXP support?
Regards
Davide