i.MX8MM no audio/I2S after update to Scarthgap

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX8MM no audio/I2S after update to Scarthgap

Jump to solution
300 Views
dpog
Contributor V

After updating to Scarthgap (imx-6.6.36-2.1.0) there is no more audio output on our custom board. The device tree needed a little update, is there anything obvious missing that might cause this issue after the update? I tried with linux-imx and linux-fslc-imx.

sound-max9867 {
compatible = "simple-audio-card";
simple-audio-card,name = "MAX9867";
simple-audio-card,format = "i2s";

simple-audio-card,widgets =
"Speaker", "Jack",
"Microphone", "Mic";
simple-audio-card,routing =
"Jack", "LOUT",
"Jack", "ROUT",
"Mic", "DMICL",
"Mic", "DMICR";

simple-audio-card,frame-master = <&cpudai>;
simple-audio-card,bitclock-master = <&cpudai>;
 
cpudai: simple-audio-card,cpu {
sound-dai = <&sai5>;
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <16>;
};

simple-audio-card,codec {
sound-dai = <&max9867>;
clocks = <&clk IMX8MM_CLK_SAI5_ROOT>;
};
};
 
&i2c2 {
status = "okay";

max9867: audio_codec@18 {
#sound-dai-cells = <0>;
compatible = "maxim,max9867";
reg = <0x18>;
clocks = <&clk IMX8MM_CLK_SAI5_ROOT>; // this line is needed after the update
};
};
 
&sai5 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai5>;
assigned-clocks = <&clk IMX8MM_CLK_SAI5>;
assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>;
assigned-clock-rates = <24576000>;
};
 
 

 

Labels (1)
0 Kudos
Reply
1 Solution
237 Views
dpog
Contributor V
Hi,
I only added the line "clocks = <&clk IMX8MM_CLK_SAI5_ROOT>;" to the codec node. We also have an imx93 in use on the same baseboard, using the same settings/dt-nodes (except that we use sai3 on imx93) and its working fine.

After comparing the two dts, I saw that the i.MX93 had an additional "fsl,sai-mclk-direction-output" in the dt, with that added to the imx8 dt, it is working again.
Thanks for your input, comparing the device trees did the trick

View solution in original post

4 Replies
278 Views
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

Do you get error log when using the CODEC?

Please check if there is no conflicts with your device and driver used compared with previous release.

Best regards.

0 Kudos
Reply
262 Views
dpog
Contributor V
Hi Jorge,
I encountered an error because the max9867 driver needed the clocks property. After adding it, the driver is now probed correctly. I also checked the signals on the board: the master clock (provided by the CPU) is active, but the LR-clock, Bitclock, as well as the I2S Data and Clock are not active.
Were there any recent changes in the SAI driver? I’ll check as well, but if you have any input on this part, I’d appreciate it.

Best regards,
Dominik
0 Kudos
Reply
261 Views
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

Which changes did you did with clock?

simple-audio-card uses the generic driver simple-card.c, but is working as expected in other devices such as i.MX8MMEVK with WM8524 codec. Please check if differences between last release and your past used release could cause the issue.

Is there additional changes that you did in your system to port the CODEC?

Best regards

0 Kudos
Reply
238 Views
dpog
Contributor V
Hi,
I only added the line "clocks = <&clk IMX8MM_CLK_SAI5_ROOT>;" to the codec node. We also have an imx93 in use on the same baseboard, using the same settings/dt-nodes (except that we use sai3 on imx93) and its working fine.

After comparing the two dts, I saw that the i.MX93 had an additional "fsl,sai-mclk-direction-output" in the dt, with that added to the imx8 dt, it is working again.
Thanks for your input, comparing the device trees did the trick