Hello,
I am posting this to hopefully get some insight on the “correct” overlay for MAX98357a.
I have a Verdin IMX8MP mounted on a custom board. On the custom board, I have an audio chip MAX98357A connected to the Verdin as follows:
Signal Pin Function Pin SoC Name
DIGITAL_AUDIO_1_I2S_MASTER_BCLK SODIMM-30 SAI1_TX_BCLK SAI5_MCLK
DIGITAL_AUDIO_1_I2S_MASTER_D_OUT0 SODIMM-34 SAI1_TX_DATA0 SAI5_RXFS
DIGITAL_AUDIO_1_I2S_MASTER_SYNC SODIMM-32 SAI1_TX_SYNC SAI5_RXD1
My device tree overlay:
verdin-imx8mp_max98357a_overlay.dts (731 Bytes)
/ {
compatible = "toradex,verdin-imx8mp";
// Codec
codec_ext: max98357a@0 {
compatible = "maxim,max98357a";
#sound-dai-cells = <0>;
};
// Sound-card definition
sound {
compatible = "simple-audio-card";
status = "okay";
simple-audio-card,name = "max98357a";
simple-audio-card,format = "i2s";
simple-audio-card,bitclock-master = <&dailink_master_cpu>;
simple-audio-card,frame-master = <&dailink_master_cpu>;
simple-audio-card,codec {
sound-dai = <&codec_ext>;
};
dailink_master_cpu: simple-audio-card,cpu {
sound-dai = <&sai5>;
};
};
};
//Disabling the sound_card previously defined for nau
&sound_card {
status = "disabled";
};
&nau8822_1a {
status = "disabled";
};
/* VERDIN I2S_1 */
&sai5 {
status = "okay";
};
As for the kernel module, I’ve tried two approaches with the same results:
- Add a .conf file in /etc/modules-load.d/ to enable the already on-board snd-soc-max98357a on boot.
- Use the TorizonCore Builder to build and autoload a module for max98357a.
In both cases, if I do lsmod after reboot, I see the module is enabled but unusued. Example:
Module Size Used by
snd_soc_max98357a 20480 0
The problem I’m facing is that there is no soundcard detected.
$ cat /proc/asound/cards
--- no soundcards ---
Some extra info:
- I’m using TorizonCore Builder to customize a TorizonCore image.
- My base device tree is imx8mp-verdin-nonwifi-dev.dts.
I’ve looked at other community posts.
The closest issue I found was: MAX98357a Verdin overlay. I tried almost everything in that discussion to no avail.
Can someone point out what I’m missing please?