Hi
I'm trying to play wav file on my custom board(i.mx8mm, android 11.0.0_2.6.0).
when i play tinyplay utility, it is stuck. it stopped at wait_for_avail function and error message is like this.
"playback write error (DMA or IRQ trouble?)"
audio output is SAI3, and it is connected to external codec(wm8904).
sai3: sai@30030000 {
#sound-dai-cells = <0>;
compatible = "fsl,imx8mm-sai", "fsl,imx8mq-sai";
reg = <0x30030000 0x10000>;
interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk IMX8MM_CLK_SAI3_IPG>, <&clk IMX8MM_CLK_DUMMY>,
<&clk IMX8MM_CLK_SAI3_ROOT>,
<&clk IMX8MM_CLK_DUMMY>, <&clk IMX8MM_CLK_DUMMY>;
clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3";
dmas = <&sdma2 4 2 0>, <&sdma2 5 2 0>;
dma-names = "rx", "tx";
status = "disabled";
};
&sai3 {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai3>;
assigned-clocks = <&clk IMX8MM_CLK_SAI3>;
assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>;
assigned-clock-rates = <1536000>;
status = "okay";
};
what do i have to do?
can anyone give some advice?
已解决! 转到解答。
Hi Dhruvit,
thanks for your reply.
i thought f/w was loaded correctly because there was no error in sdma_load_script(i think it is f/w loading function).
but i'm not sure f/w was really loaded correctly.
in the end of imx-sdma.c, MODULE_FIRMWARE("imx/sdma/sdma-imx7d.bin"); is wrapped in #if like below
#if IS_ENABLED(CONFIG_SOC_IMX7D)
MODULE_FIRMWARE("imx/sdma/sdma-imx7d.bin");
#endif
do i have to add CONFIG_SOC_IMX7D config?
anyway, i uploaded log and device tree files.
in the log, tinyplay start point is line 1249.
sometimes it stuck at pcm open, and sometime it stuck at wait_for_avail,
but today, it only stuck at pcm open and i can't reproduce the other case.
let me know if you need anything
Thanks and BR
Hi @sung-ho,
I hope you are doing well.
Please make sure sdma firmware(imx/sdma/sdma-imx7d.bin) is correctly loaded.
Please provide me with the dts file, boot logs and error logs for further debugging.
Please refer to Chapter 7 Audio and Section 11.6 Audio in i.MX Linux Reference Manual and imx-test for Audio-related tests.
Thanks & Regards,
Dhruvit Vasavada