Hi,
I have a board with a ICS43434 microphone (I2S device) connected to SAI interface of an IMX8DX. Linux runs on that microprocessor. I'm kind of novice with device tree configuration and I'm struggling to find the correct configuration for the clocks. Whatever configuration I try I have no signal going out of the SAI pins (bit clock and word clock).
I uploaded my device tree file. This is the output of /sys/kernel/debug/clk/clk_summary when runnig arecord:
arecord -l gives me a correct output:
But I get the following error when recording: pcm_read:2221: read error: Input/output error
What is missing so that the SAI1 clock is enabled?
Any help appreciated !
Solved! Go to Solution.
Please try to set like this:
simple-audio-card,bitclock-master = <&cpudai>;
simple-audio-card,frame-master = <&cpudai>;
cpudai: simple-audio-card,cpu {
sound-dai = <&sai1>;
};
Is your audio codec control by I2C? so put it under the I2C node.
FYI. this is the evk device tree file.
No, the ICS43434 has no I2C/SPI interface. I removed the "@" and "reg=" in the codec defintion, those were copy/paste mistakes.
Do you think I shall put the codec under another node so that the clocks are correctly configured?
Have you try to measure the signals? is the clock correct?
You may try to set the mclkout0_lpcg to 12288000.
Yes, I'm measuring the signals (all 3 pins on I2S) and there is no clock at all. I tried many clocks rates including 12288000,
I think that I'm maybe misunderstanding what clocks, assigned-clocks and assigned-clock-parents mean...
And what I should set for sai1, the codec and the sound entry in the device tree. The others example I found while googling seem to use an external clock for the master clock, but I need to use the SAI master clock.
With the attached version of DTS I can see now sai1_lpcg_mclk enabled. But still no signals.
Please try to set like this:
simple-audio-card,bitclock-master = <&cpudai>;
simple-audio-card,frame-master = <&cpudai>;
cpudai: simple-audio-card,cpu {
sound-dai = <&sai1>;
};