I have a problem with the audio codec - WM8962.
I work on my own platform, modeled on imx8mp-devkit.
Diagram:

Added device to devicetree:
reg_audio_pwr: regulator-audio-pwr {
compatible = "regulator-fixed";
regulator-name = "audio-pwr";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
gpio = <&gpio4 29 GPIO_ACTIVE_HIGH>;
enable-active-high;
regulator-always-on;
};
sound-wm8962 {
compatible = "simple-audio-card";
simple-audio-card,name = "wm8962";
simple-audio-card,format = "i2s";
simple-audio-card,widgets =
"Headphone", "Headphones",
"Microphone", "Headset Mic",
"Speaker", "Speaker";
simple-audio-card,routing =
"Headphones", "HPOUTL",
"Headphones", "HPOUTR",
"Speaker", "SPKOUTL",
"Speaker", "SPKOUTR",
"Headset Mic", "MICBIAS",
"IN3R", "Headset Mic";
simple-audio-card,hp-det-gpio = <&gpio4 28 0>;
simple-audio-card,cpu {
sound-dai = <&sai3>;
};
simple-audio-card,codec {
sound-dai = <&codec>;
frame-master;
bitclock-master;
};
};
&sai3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai3>;
assigned-clocks = <&clk IMX8MP_CLK_SAI3>;
assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
assigned-clock-rates = <6144000>;
fsl,sai-mclk-direction-output;
#sound-dai-cells = <0>;
status = "okay";
};
pinctrl_sai3: sai3grp {
fsl,pins = <
MX8MP_IOMUXC_SAI3_TXFS__AUDIOMIX_SAI3_TX_SYNC 0xd6
MX8MP_IOMUXC_SAI3_TXC__AUDIOMIX_SAI3_TX_BCLK 0xd6
MX8MP_IOMUXC_SAI3_RXD__AUDIOMIX_SAI3_RX_DATA00 0xd6
MX8MP_IOMUXC_SAI3_TXD__AUDIOMIX_SAI3_TX_DATA00 0xd6
MX8MP_IOMUXC_SAI3_MCLK__AUDIOMIX_SAI3_MCLK 0xd6
>;
};
The codec is visible in the system and does not issue any errors:
[ 6.596032] wm8962 2-001a: customer id 0 revision F
[ 6.854604] input: wm8962 Headphones as /devices/platform/sound-wm8962/sound/card2/input1
List of all devices:
root@imx8mp-lpddr4-evk:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: imxaudioxcvr [imx-audio-xcvr], device 0: XCVR PCM snd-soc-dummy-dai-0 [XCVR PCM snd-soc-dummy-dai-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: btscoaudio [bt-sco-audio], device 0: 30c20000.sai-bt-sco-pcm-wb bt-sco-pcm-wb-0 [30c20000.sai-bt-sco-pcm-wb bt-sco-pcm-wb-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: wm8962 [wm8962], device 0: 30c30000.sai-wm8962 wm8962-0 [30c30000.sai-wm8962 wm8962-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
however when i try to play some track nothing happens:
root@imx8mp-lpddr4-evk:~# gst-launch-1.0 playbin uri=file:///unit_tests/Audio/sample_22_frames.mp3 audio-sink="alsasink device=hw:2,0"
[ 27.363409] audit: type=1701 audit(1667923787.928:18): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=682 comm="vsidaemon" exe="/usr/bin/vsidaemon" sig=6 res=1
[ 37.603724] audit: type=1701 audit(1667923798.168:19): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=725 comm="vsidaemon" exe="/usr/bin/vsidaemon" sig=6 res=1
[ 38.876656] audit: type=1334 audit(1667923799.444:20): prog-id=0 op=UNLOAD
[ 38.883569] audit: type=1334 audit(1667923799.444:21): prog-id=0 op=UNLOAD
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
====== BEEP: 4.7.3 build on Feb 3 2023 05:14:46. ======
Core: DSP decoder Wrapper build on Dec 20 2022 13:03:58
file: /usr/lib/imx-mm/audio-codec/wrap/lib_dsp_wrap_arm_elinux.so
====== BEEP: 4.7.3 build on Feb 3 2023 05:14:46. ======
Core: MP3 decoder Wrapper build on Jan 11 2018 10:20:25
file: /usr/lib/imx-mm/audio-codec/wrap/lib_mp3d_wrap_arm_elinux.so.3
CODEC: BLN_MAD-MMCODECS_MP3D_ARM_02.13.01_ARMV8 build on Sep 16 2022 13:30:45.
Redistribute latency...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
Redistribute latency...
New clock: GstAudioSinkClock
Chandling interrupt. (0.0 %)
Do you have any ideas what I might be doing wrong? Or where is the error?