I need help with audio routing in WM8960

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I need help with audio routing in WM8960

2,887 Views
subash_p
Contributor III

Hi, I have a custom board IMX8QXP-MEK with the integration of WM8960. By default, the RINPUT1 is connected to my main board IC. I can hear the .mp3 file sound from the WM8960, but I can't hear the audio from the radio chip. The radio chip ROUT and LOUT are connected to RINPUT2 and LINPUT2. Do I need to modify any DTS file or .c file to hear the audio?

Regards,
subash

0 Kudos
Reply
11 Replies

2,868 Views
jimmychan
NXP TechSupport
NXP TechSupport

Which version of BSP are you using?

2,864 Views
subash_p
Contributor III

Kernel version is 6.1.36

0 Kudos
Reply

2,814 Views
jimmychan
NXP TechSupport
NXP TechSupport

This is the driver of WM8960.

https://github.com/nxp-imx/linux-imx/blob/lf-6.1.y/sound/soc/codecs/wm8960.c

 

This is a document talk about the wm8960 driver. Although it is long time ago, the concept is the same.

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/WM8960-audio-codec/ta-p/1119101

 

You could check the alsamixer first to see the switches/mutes are setting correct.

0 Kudos
Reply

2,811 Views
subash_p
Contributor III

Hi @jimmychan

I enabled all of the RINPUT2 and LINPUT2 options in Alsamixer but I can't hear any sound from my radio chip

 

Thanks,

subash.p

0 Kudos
Reply

2,801 Views
jimmychan
NXP TechSupport
NXP TechSupport

Please check the WM8960 block diagram. There are different path from INPUT to OUTPUT. You could input the audio signal to the ADC. Or you could input the audio signal direct to the output bypass the ADC. Please double check which path you choose and select the correct input in the output mixer.

2,577 Views
subash_p
Contributor III

Hi @jimmychan 

Am I need to modify wm8960 dts file ?

0 Kudos
Reply

2,560 Views
jimmychan
NXP TechSupport
NXP TechSupport

What is your wm8960 setting of routing in the dts file?

0 Kudos
Reply

2,548 Views
subash_p
Contributor III

Hi @jimmychan 

sof-sound-wm8960 {
compatible = "simple-audio-card";
label = "wm8960-audio";
simple-audio-card,bitclock-master = <&sndcodec>;
simple-audio-card,frame-master = <&sndcodec>;
hp-det-gpio = <&lsio_gpio1 0 0>;
mic-det-gpio = <&lsio_gpio1 0 0>;
simple-audio-card,widgets =
"Headphone", "Headphone Jack",
"Speaker", "Ext Spk",
"Microphone", "Mic Jack";
simple-audio-card,audio-routing =
"Headphone Jack", "HP_L",
"Headphone Jack", "HP_R",
"Ext Spk", "SPK_LP",
"Ext Spk", "SPK_LN",
"Ext Spk", "SPK_RP",
"Ext Spk", "SPK_RN",
"LINPUT2", "Mic Jack",
"LINPUT3", "Mic Jack",
"RINPUT1", "Mic Jack",
"RINPUT2", "Mic Jack",
"Playback", "SAI1.OUT",
"SAI1.IN", "Capture";
simple-audio-card,dai-link {
format = "i2s";
cpu {
sound-dai = <&dsp 1>;
};
sndcodec: codec {
sound-dai = <&wm8960>;
};
};
};

0 Kudos
Reply

2,540 Views
jimmychan
NXP TechSupport
NXP TechSupport

Is your signal input through the mic jack? If yes, as your headphone also using the same gpio for detection, the output will be go to the headphone, not the speaker.

0 Kudos
Reply

2,532 Views
subash_p
Contributor III

HI @jimmychan  

On my custom board, RINPUT2 and LINPUT2 are connected to si4754 LOUT and ROUT. I'm not sure the signal is being sent through the mic jack.

0 Kudos
Reply

2,502 Views
jimmychan
NXP TechSupport
NXP TechSupport

If the RINPUT2 and LINPUT2 are connected directly to SI4754 on the circuit and not through the mic. jack, then please remove the "RINPUT2", "Mic Jack" and "LINPUT2", "Mic Jack" in the routing.

0 Kudos
Reply