Hello,
I have a custom board based on the iMX8M Plus where I am trying to make the audio work. Here is the relevant schematic part:
And, I added the following device-tree nodes:
/ {
sound_card: sound-card {
compatible = "simple-audio-card";
simple-audio-card,bitclock-master = <&dailink_master>;
simple-audio-card,format = "i2s";
simple-audio-card,frame-master = <&dailink_master>;
simple-audio-card,mclk-fs = <256>;
simple-audio-card,name = "imx8mp-nau8822";
simple-audio-card,routing =
"Headphones", "LHP",
"Headphones", "RHP",
"Speaker", "LSPK",
"Speaker", "RSPK",
"Line Out", "AUXOUT1",
"Line Out", "AUXOUT2",
"LAUX", "Line In",
"RAUX", "Line In",
"LMICP", "Mic In",
"RMICP", "Mic In";
simple-audio-card,widgets =
"Headphones", "Headphones",
"Line Out", "Line Out",
"Speaker", "Speaker",
"Microphone", "Mic In",
"Line", "Line In";
dailink_master: simple-audio-card,codec {
sound-dai = <&nau8822_1a>;
clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIO_BLK_CTRL_SAI1_MCLK1>;
};
simple-audio-card,cpu {
sound-dai = <&sai1>;
};
};
};
/* Verdin I2C_1 */
&i2c4 {
status = "okay";
/* Audio Codec */
nau8822_1a: codec-nau@1a {
compatible = "nuvoton,nau8822";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai1>;
#sound-dai-cells = <0>;
reg = <0x1a>;
};
};
However, I can’t seem to be able to use it to play audio:
torizon@verdin-imx8mp-15133370:~$ lsmod | grep nau8822
snd_soc_nau8822 53248 0
torizon@verdin-imx8mp-15133370:~$ cat /proc/asound/cards
--- no soundcards ---
In a container with /dev/snd, gstreamer, and all necessary libraries:
root@db0418a7b30d:/app/gui/bundle# gst-launch-1.0 audiotestsrc ! audioconvert ! pulsesink
Setting pipeline to PAUSED ...
XDG_RUNTIME_DIR (/tmp/1000-runtime-dir) is not owned by us (uid 0), but by uid 1000! (This could e.g. happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
ERROR: from element /GstPipeline:pipeline0/GstPulseSink:pulsesink0: Failed to connect: Connection refused
Additional debug info:
../ext/pulse/pulsesink.c(616): gst_pulseringbuffer_open_device (): /GstPipeline:pipeline0/GstPulseSink:pulsesink0
ERROR: pipeline doesn't want to preroll.
Failed to set pipeline to PAUSED.
Setting pipeline to NULL ...
Freeing pipeline ...
What is wrong with my configuration, what am I missing?
Thank you for your time.
Best regards,