I'm trying to integrate a MAX9867 audio codec in our custom imx8m mini board, but I'm stuck when trying to test the audio output with ALSA speaker-test:
root@evalboard:~# speaker-test
speaker-test 1.2.6
Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
[ 18.948357] max9867 1-0018: ASoC: error at snd_soc_dai_hw_params on max9867-aif1: -22
[ 18.960141] 30050000.sai-max9867-aif1: ASoC: error at __soc_pcm_hw_params on 30050000.sai-max9867-aif1: -22
ALSA lib ../../../alsa-lib-1.2.6.1/src/pcm/pcm_direct.c:1284:(snd1_pcm_direct_initialize_slave) unable to install hw params
ALSA lib ../../../alsa-lib-1.2.6.1/src/pcm/pcm_dmix.c:1044:(snd_pcm_dmix_open) unable to initialize slave
Playback open error: -22,Invalid argument
root@evalboard:~#
my device tree looks as follows, I'm not quite sure what to do with the fsl,dataline, so it's commented out:
已解决! 转到解答。
We do not have an specific device tree configuration to the MAX9867 codec, did you check with vendor for a device tree example?
We have a device tree from the EVK board and also the simple-card.yaml that you could use as a reference for your design.
Best regards.
The device tree has the necessary configuration to use the corresponding driver and be correctly detected and used on the OS.
Are you able to see the sent data to the codec when you hear the noises from the speaker?
Best regards.
Hello,
If you are using a different codec, it is needed to adapt the driver architecture accordingly. The exact adaptation depends on the codec chosen. Please try to check the codec-specific software from the codec vendor.
Best regards.