Hi,
I am trying to get the MAX98357 codec working on a custom carrier board for the verdin imx8mm. the codec is connected to the i2s_1 interface as follows:
The overlay I am trying to use is as follows:
&{/} {
codec_ext: max98357a@0 {
compatible = "maxim,max98357a";
#sound-dai-cells = <0>;
status = "okay";
};
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>;
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <16>;
};
dailink_master_cpu: simple-audio-card,cpu {
sound-dai = <&sai2>;
};
};
};
but I get errors such as:
torizon@verdin-imx8mm-14756428:~$ dmesg | grep simple-card
[ 8.209311] asoc-simple-card sound-card: parse error -22
[ 8.214659] asoc-simple-card: probe of sound-card failed with error -22
torizon@verdin-imx8mm-14756428:~$ dmesg | grep sound
[ 1.581745] No soundcards found.
[ 8.191661] OF: /sound-card/simple-audio-card,codec: could not find phandle 134
[ 8.209311] asoc-simple-card sound-card: parse error -22
[ 8.214659] asoc-simple-card: probe of sound-card failed with error -22
torizon@verdin-imx8mm-14756428:~$ dmesg | grep sai
[ 37.138267] fsl-sai 30020000.sai: failed to derive required Tx rate: 1411200
[ 37.145418] fsl-sai 30020000.sai: ASoC: error at snd_soc_dai_hw_params on 30020000.sai: -22
[ 37.153949] 30020000.sai-HiFi: ASoC: __soc_pcm_hw_params() failed (-22)
[ 37.163563] fsl-sai 30020000.sai: failed to derive required Tx rate: 1411200
[ 37.170710] fsl-sai 30020000.sai: ASoC: error at snd_soc_dai_hw_params on 30020000.sai: -22
[ 37.179112] 30020000.sai-HiFi: ASoC: __soc_pcm_hw_params() failed (-22)
[ 37.188039] fsl-sai 30020000.sai: failed to derive required Tx rate: 1411200
[ 37.195165] fsl-sai 30020000.sai: ASoC: error at snd_soc_dai_hw_params on 30020000.sai: -22
[ 37.203555] 30020000.sai-HiFi: ASoC: __soc_pcm_hw_params() failed (-22)
[ 37.217864] fsl-sai 30020000.sai: failed to derive required Tx rate: 1411200
[ 37.224995] fsl-sai 30020000.sai: ASoC: error at snd_soc_dai_hw_params on 30020000.sai: -22
[ 37.233393] 30020000.sai-HiFi: ASoC: __soc_pcm_hw_params() failed (-22)
[ 37.243354] fsl-sai 30020000.sai: failed to derive required Tx rate: 1411200
[ 37.250486] fsl-sai 30020000.sai: ASoC: error at snd_soc_dai_hw_params on 30020000.sai: -22
[ 37.258854] 30020000.sai-HiFi: ASoC: __soc_pcm_hw_params() failed (-22)
[ 37.269695] fsl-sai 30020000.sai: failed to derive required Tx rate: 1411200
[ 37.276774] fsl-sai 30020000.sai: ASoC: error at snd_soc_dai_hw_params on 30020000.sai: -22
[ 37.285201] 30020000.sai-HiFi: ASoC: __soc_pcm_hw_params() failed (-22)
[ 37.294706] fsl-sai 30020000.sai: failed to derive required Tx rate: 1411200
[ 37.301828] fsl-sai 30020000.sai: ASoC: error at snd_soc_dai_hw_params on 30020000.sai: -22
[ 37.310235] 30020000.sai-HiFi: ASoC: __soc_pcm_hw_params() failed (-22)
[ 37.321191] fsl-sai 30020000.sai: failed to derive required Tx rate: 1411200
[ 37.328269] fsl-sai 30020000.sai: ASoC: error at snd_soc_dai_hw_params on 30020000.sai: -22
[ 37.336671] 30020000.sai-HiFi: ASoC: __soc_pcm_hw_params() failed (-22)
[ 37.346028] fsl-sai 30020000.sai: failed to derive required Tx rate: 1411200
[ 37.353151] fsl-sai 30020000.sai: ASoC: error at snd_soc_dai_hw_params on 30020000.sai: -22
[ 37.361550] 30020000.sai-HiFi: ASoC: __soc_pcm_hw_params() failed (-22)
[ 37.372110] fsl-sai 30020000.sai: failed to derive required Tx rate: 1411200
[ 37.379262] fsl-sai 30020000.sai: ASoC: error at snd_soc_dai_hw_params on 30020000.sai: -22
[ 37.387630] 30020000.sai-HiFi: ASoC: __soc_pcm_hw_params() failed (-22)
[ 37.396901] fsl-sai 30020000.sai: failed to derive required Tx rate: 1411200
[ 37.404018] fsl-sai 30020000.sai: ASoC: error at snd_soc_dai_hw_params on 30020000.sai: -22
[ 37.412418] 30020000.sai-HiFi: ASoC: __soc_pcm_hw_params() failed (-22)
[ 37.422003] fsl-sai 30020000.sai: failed to derive required Tx rate: 1411200
[ 37.429153] fsl-sai 30020000.sai: ASoC: error at snd_soc_dai_hw_params on 30020000.sai: -22
[ 37.437523] 30020000.sai-HiFi: ASoC: __soc_pcm_hw_params() failed (-22)
[ 37.446927] fsl-sai 30020000.sai: failed to derive required Tx rate: 1411200
[ 37.454050] fsl-sai 30020000.sai: ASoC: error at snd_soc_dai_hw_params on 30020000.sai: -22
[ 37.462453] 30020000.sai-HiFi: ASoC: __soc_pcm_hw_params() failed (-22)
[ 37.471925] fsl-sai 30020000.sai: failed to derive required Tx rate: 1411200
[ 37.479061] fsl-sai 30020000.sai: ASoC: error at snd_soc_dai_hw_params on 30020000.sai: -22
[ 37.487434] 30020000.sai-HiFi: ASoC: __soc_pcm_hw_params() failed (-22)
[ 37.496864] fsl-sai 30020000.sai: failed to derive required Tx rate: 1411200
[ 37.503982] fsl-sai 30020000.sai: ASoC: error at snd_soc_dai_hw_params on 30020000.sai: -22
[ 37.512381] 30020000.sai-HiFi: ASoC: __soc_pcm_hw_params() failed (-22)
[ 37.523288] fsl-sai 30020000.sai: failed to derive required Tx rate: 1411200
[ 37.530418] fsl-sai 30020000.sai: ASoC: error at snd_soc_dai_hw_params on 30020000.sai: -22
[ 37.538789] 30020000.sai-HiFi: ASoC: __soc_pcm_hw_params() failed (-22)
[ 37.548168] fsl-sai 30020000.sai: failed to derive required Tx rate: 1411200
[ 37.555301] fsl-sai 30020000.sai: ASoC: error at snd_soc_dai_hw_params on 30020000.sai: -22
[ 37.563711] 30020000.sai-HiFi: ASoC: __soc_pcm_hw_params() failed (-22)
[ 37.574438] fsl-sai 30020000.sai: failed to derive required Tx rate: 1411200
[ 37.581562] fsl-sai 30020000.sai: ASoC: error at snd_soc_dai_hw_params on 30020000.sai: -22
[ 37.589971] 30020000.sai-HiFi: ASoC: __soc_pcm_hw_params() failed (-22)
[ 37.599375] fsl-sai 30020000.sai: failed to derive required Tx rate: 1411200
[ 37.606455] fsl-sai 30020000.sai: ASoC: error at snd_soc_dai_hw_params on 30020000.sai: -22
[ 37.614861] 30020000.sai-HiFi: ASoC: __soc_pcm_hw_params() failed (-22)
[ 37.625667] fsl-sai 30020000.sai: failed to derive required Tx rate: 1411200
[ 37.632797] fsl-sai 30020000.sai: ASoC: error at snd_soc_dai_hw_params on 30020000.sai: -22
[ 37.641205] 30020000.sai-HiFi: ASoC: __soc_pcm_hw_params() failed (-22)
[ 37.650649] fsl-sai 30020000.sai: failed to derive required Tx rate: 1411200
[ 37.657727] fsl-sai 30020000.sai: ASoC: error at snd_soc_dai_hw_params on 30020000.sai: -22
[ 37.666126] 30020000.sai-HiFi: ASoC: __soc_pcm_hw_params() failed (-22)
[ 37.676657] fsl-sai 30020000.sai: failed to derive required Tx rate: 1411200
[ 37.683780] fsl-sai 30020000.sai: ASoC: error at snd_soc_dai_hw_params on 30020000.sai: -22
[ 37.692368] 30020000.sai-HiFi: ASoC: __soc_pcm_hw_params() failed (-22)
[ 37.702706] fsl-sai 30020000.sai: failed to derive required Tx rate: 1411200
[ 37.709859] fsl-sai 30020000.sai: ASoC: error at snd_soc_dai_hw_params on 30020000.sai: -22
[ 37.718242] 30020000.sai-HiFi: ASoC: __soc_pcm_hw_params() failed (-22)
[ 37.727832] fsl-sai 30020000.sai: failed to derive required Tx rate: 1411200
[ 37.734974] fsl-sai 30020000.sai: ASoC: error at snd_soc_dai_hw_params on 30020000.sai: -22
[ 37.743403] 30020000.sai-HiFi: ASoC: __soc_pcm_hw_params() failed (-22)
[ 37.752736] fsl-sai 30020000.sai: failed to derive required Tx rate: 1411200
[ 37.759904] fsl-sai 30020000.sai: ASoC: error at snd_soc_dai_hw_params on 30020000.sai: -22
[ 37.768277] 30020000.sai-HiFi: ASoC: __soc_pcm_hw_params() failed (-22)
[ 37.777608] fsl-sai 30020000.sai: failed to derive required Tx rate: 1411200
[ 37.784721] fsl-sai 30020000.sai: ASoC: error at snd_soc_dai_hw_params on 30020000.sai: -22
[ 37.793159] 30020000.sai-HiFi: ASoC: __soc_pcm_hw_params() failed (-22)
[ 37.802464] fsl-sai 30020000.sai: failed to derive required Tx rate: 1411200
[ 37.809593] fsl-sai 30020000.sai: ASoC: error at snd_soc_dai_hw_params on 30020000.sai: -22
[ 37.817964] 30020000.sai-HiFi: ASoC: __soc_pcm_hw_params() failed (-22)
[ 37.827289] fsl-sai 30020000.sai: failed to derive required Tx rate: 1411200
[ 37.834403] fsl-sai 30020000.sai: ASoC: error at snd_soc_dai_hw_params on 30020000.sai: -22
[ 37.842793] 30020000.sai-HiFi: ASoC: __soc_pcm_hw_params() failed (-22)
[ 37.852092] fsl-sai 30020000.sai: failed to derive required Tx rate: 1411200
[ 37.859217] fsl-sai 30020000.sai: ASoC: error at snd_soc_dai_hw_params on 30020000.sai: -22
[ 37.867595] 30020000.sai-HiFi: ASoC: __soc_pcm_hw_params() failed (-22)
[ 37.876932] fsl-sai 30020000.sai: failed to derive required Tx rate: 1411200
[ 37.884068] fsl-sai 30020000.sai: ASoC: error at snd_soc_dai_hw_params on 30020000.sai: -22
[ 37.892467] 30020000.sai-HiFi: ASoC: __soc_pcm_hw_params() failed (-22)
[ 37.901747] fsl-sai 30020000.sai: failed to derive required Tx rate: 1411200
[ 37.908827] fsl-sai 30020000.sai: ASoC: error at snd_soc_dai_hw_params on 30020000.sai: -22
[ 37.917229] 30020000.sai-HiFi: ASoC: __soc_pcm_hw_params() failed (-22)