Hello,
I have a custom board based on iMX8MM-EVK. I would like to connect PCM1754 (controlled in a hardware mode) to the board via I2S audio output without any configuration via SPI or I2C.
I am not familiar with sound field, and below things that all I tried to do the work.
I used "simple-audio-card" driver, declared the board as master device, and PCM1754 as "linux,snd-soc-dummy" (applied this patch https://patchwork.kernel.org/patch/7679391), that played slave role.
Device tree:
pcm1754: pcm1754 {
compatible = "linux,snd-soc-dummy";
#sound-dai-cells = <0>;
status = "okay";
};
sound-pcm1754 {
compatible = "simple-audio-card";
simple-audio-card,name = "pcm1754";
simple-audio-card,format = "i2s";
simple-audio-card,bitclock-master = <&dailink0_master>;
simple-audio-card,frame-master = <&dailink0_master>;
simple-audio-card,widgets =
"Line", "Line Out";
simple-audio-card,routing =
"Line Out", "LLOUT",
"Line Out", "RLOUT";
dailink0_master: simple-audio-card,cpu {
sound-dai = <&sai3>;
};
simple-audio-card,codec {
sound-dai = <&pcm1754>;
};
};
&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>;
assigned-clock-rates = <0>, <24576000>;
#sound-dai-cells = <0>;
status = "okay";
};
pcm1754 soundcard appeared after boot, and It's the only playback soundcard (hw:0,0) .
.asoundrc:
pcm.dmix_192000
{
type dmix
ipc_key 5678293
ipc_key_add_uid yes
slave{
pcm "hw:0,0"
period_time 40000
format S24_LE
rate 192000
}
}
pcm.iMic
{
type hw
card "Mic"
}
pcm.imx8{
type asym
playback.pcm "dmix_192000"
capture.pcm "iMic"
}
pcm.!default
{
type plug
route_policy "average"
slave.pcm "imx8"
}
ctl.!default
{
type plug
route_policy "average"
slave.pcm "imx8"
}
But there was no sound out to speaker connected to codec IC when I played a sound file.
Please help me correct any mistakes.
Thank you,
Thanks igorpadykov,
I have checked this thread before, but it seems to not my case.
Hi Tu
for i.MX8M Mini "simple-audio-card" example one can look on
https://community.nxp.com/thread/504807
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------