Hi Developer,
When debug the high resolution audio playback there have very clear noise from imx8mm I2S output, we can see there have i2s data drop during the playback, the high resolution the more data lost.
Problem solved with following change. We can close this ticket.
&sai3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai3>;
assigned-clocks = <&clk IMX8MM_CLK_SAI3_SRC>,
<&clk IMX8MM_CLK_SAI3_DIV>;
assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>;
clocks = <&clk IMX8MM_CLK_SAI3_IPG>, <&clk IMX8MM_CLK_DUMMY>,
<&clk IMX8MM_CLK_SAI3_ROOT>, <&clk IMX8MM_CLK_DUMMY>,
<&clk IMX8MM_CLK_DUMMY>, <&clk IMX8MM_AUDIO_PLL1_OUT>,
<&clk IMX8MM_AUDIO_PLL2_OUT>;
assigned-clock-rates = <0>,<49152000>;
clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3", "pll8k", "pll11k";
status = "okay";
};
Hi Developer,
I would like to update the latest status there.
the playback i2s issue is always there including 44.1k,48k. if the sample rate up to 176.4khz or higher we can hear the noise.
- during my test, i have test continuely write fixed data with snd_pcm_writei and i can see if set card "hw 0:0" to 48k takes 1.024~1.025 sec to finish 48k frame data write. I use block mode and period seize 512 buffer size 8192. Then i do measure I2S output of IMX8MM the L/R clock is stable 48khz and bclk stable 3.072M. I guess something must be wrong with the SAI3 from kernel. on the other words SAI3 playback 48k frame audio data while application do not fill 48k audio data.
- with above similar setup, if playback 768k, the data from i2s lost around 8%, and snd_pcm_writei logic compelete wrong it can only write 700k frame in 1 sec.
I have try a specifial task keep block writing data with snd_pcm_writei, i keep writing 0x01,0x02 for example then i measured the i2s out the data corrupt still there. so the issue is from snd_pcm_writei down layer...