- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am using a MA12040P for audio playback of a I2S stream being produced by the SAI peripheral of an iMX8M Plus.
I have ported the driver from the Raspberry Pi into the Linux kernel provided for the imx platform and it appears to function.
The problem I am having is that there is no audio output by the amplifier when I run the ALSA speaker test tool using the command line:
speaker-test -FS32_LE -Dsysdefault:merusaudio
My initial schematic for the connection between the iMX and the amp was:
This has been altered to switch the nMute line from a pull up to pull down and the MCLK signal is now routed to a clock output directly from the iMX clock peripheral and is set to 12288kHz.
This was done because the iMX8MP SAI peripheral will only output an MCLK signal during playback.
The SAI peripheral now consumes the MCLK from the external pin and generates the BCLK from that signal.
I have captured some of the signals on my scope:
Full Power-up Sequence:
There is a blip on the MCLK line when the output pin is first muxed to output the clock, a 24MHz signal is briefly present.
Clock Blip Detail
Enable Detail. MCLK is 12.288MHz at this point:
There is a 6-7 ns phase shift between MCLK edge and the BLCK edge, probably due to propagation through the SAI peripheral.
During Playback:
Here is a dump of some of the MA12040P registers after the driver has configured the device:
Address Value
0X00 |
0X3D |
0X01 |
0X3C |
0X02 |
0X32 |
0X03 |
0X5A |
0X04 |
0X50 |
0X08 |
0X26 |
0X0A |
0X0C |
0X12 |
0X13 |
0X13 |
0X0A |
0X14 |
0X14 |
0X15 |
0X09 |
0X16 |
0X0A |
0X17 |
0X14 |
0X18 |
0X14 |
0X19 |
0X1A |
0X1A |
0X20 |
0X1B |
0X19 |
0X1C |
0X0B |
0X1D |
0X00 |
0X1E |
0X2F |
0X20 |
0X1F |
0X25 |
0X10 |
0X26 |
0X05 |
0X27 |
0X08 |
0X2D |
0X30 |
0X2E |
0X84 |
0X35 |
0X88 |
0X36 |
0X41 |
0X40 |
0XFF |
0X41 |
0X00 |
0X42 |
0X18 |
0X43 |
0X18 |
0X44 |
0X18 |
0X45 |
0X18 |
0X46 |
0X00 |
0X47 |
0X27 |
0X48 |
0X27 |
0X49 |
0X18 |
0X4A |
0X18 |
0X4B |
0X00 |
0X60 |
0XC1 |
0X61 |
0X3E |
0X62 |
0X04 |
0X64 |
0XC1 |
0X65 |
0X3E |
0X66 |
0X04 |
0X68 |
0XC0 |
0X69 |
0XC9 |
0X6D |
0X00 |
0X74 |
0X10 |
0X75 |
0X05 |
0X7C |
0X00 |
0X7E |
0X00 |
I do not know what else to check as there are no errors being reported as far as I can tell.
Is the clock blip before the amp is enabled a problem?
Is the phase shift between the MCLK and the BCLK a problem?
Any thoughts on next steps in debugging this issue are appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
For new designs up to 18V DC- supply we strongly recommend the latest release on multilevel technology MA2304DNS or MA2304PNS which also have a public linux ALSASoC driver on this forum.
The problem of audio output might come form the fact the MSEL0 pin requires 5V instead of 3.3V :
Best regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
For new designs up to 18V DC- supply we strongly recommend the latest release on multilevel technology MA2304DNS or MA2304PNS which also have a public linux ALSASoC driver on this forum.
The problem of audio output might come form the fact the MSEL0 pin requires 5V instead of 3.3V :
Best regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thankyou for your reply, we are planning to use the MA12070P for this design in our next board spin. I will pass this recommendation along to the hardware team.
I will test with MSEL 0 connected to 5V and let you know if that resolves the issue.
Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Follow up:
After cutting the MSEL0 connection to 3.3V and connecting it to 5V I am now getting some output from the amp. There is still an issue somewhere as the output is not as expected, but it is probably a software issue that I must debug.
Thank you for your help!