No sound from SGTL5000 despite being recognised by kernel

Hello all,

I’ve having trouble getting audio to work on a custom board that has an SGTL5000. The chip is recognised fine by the kernel and we have verified the hardware using another OS image:

idh@colibri-imx6ull:~# dmesg | grep sgtl
[    1.798942] sgtl5000 0-000a: sgtl5000 revision 0x11
[    1.875847] imx-sgtl5000 sound: sgtl5000 <-> 2030000.sai mapping ok
[    2.509764]   #0: imx-audio-sgtl5000

I’ve tried to use the same kernel config and devicetree as the working image, but to no avail. When I try to play an audio file via aplay, the output signal on the Lineout pins jumps up to 1.5V, but no signal is present on this offset.

Details about the system:

Hi
I didnt find &sgtl5000 codec on your DTS and also dont find multiplex
I am not sure what is you board ?
here is my DTS that is working fine with external SGTL5000, with colibri imx6dl

sound2 {
		compatible = "fsl,imx6-colibri-sgtl5000",
					 "fsl,imx-audio-sgtl5000";
		model = "imx6-RMG-sgtl5000";
		cpu-dai = <&ssi2>;
		audio-codec = <&codec2>;
		audio-routing =
		"LINE_IN", "Line In Jack",
		"MIC_IN", "Mic Jack",
		"Mic Jack", "Mic Bias",
		"Line Out Jack", "LINE_OUT";
		mux-int-port = <2>;
		mux-ext-port = <3>;
	};

and Codec

/* I2C */
&i2c1 {

/* sgtl5000 audio codec connected to SSI2*/
codec2: sgtl5000@0a {
	compatible = "fsl,sgtl5000";
	reg = <0x0a>;
	clocks = <&clk12m>;
	lrclk-strength = <0x3>;
	VDDA-supply = <&reg_3p3v>;
	VDDIO-supply = <&reg_3p3v>;
	VDDD-supply =<&vgen4_reg>;
};

Hope it help you .

HI @amrbekhit, could you try the recommendation of @kave. Further more could you also check if the output is not muted and set the Volume sufficient high using alsamixer.

Best regards,
Jaski

Hi @jaski.tx @kave : Regarding the DTS file, it does indeed contain the I2C SGTL codec entry - please check again. As for the audmux entries, the iMX6ULL doesn’t have an AUDMUX module. Looking at the driver source code in imx-sgtl5000.c, the mux-xxx-port entries are only read if the cpu-dai is an SSI port, whereas on the iMX6ULL they are SAI ports.

I’ve checked the volume levels using alsamixer.

Hi @amrbekhit

Thanks for your Input.
Could you share the serial boot-log in a text fie and a output of cat /proc/asound/cards?

Thanks and best regards,
Jaski

Here is the output of dmesg

The output of /proc/asound/cards is:

idh@colibri-imx6ull:~# cat /proc/asound/cards
 0 [imxaudiosgtl500]: imx-audio-sgtl5 - imx-audio-sgtl5000
                      imx-audio-sgtl5000

@jaski.tx @kave - I’ve resolved the problem, it was a gpio configuration issue with the SGTL enable pin. When the DTS was moved from one kernel to the other, I didn’t realise that some of the dtsi files were configuring that pin for the ADC. Deleting that configuration node resolved the issue.

FYI, the DTS file I provided in the original post is a valid configuration for an SGTL5000 with an independent oscillator.

Hello amrbekhit,

Is the issue resolved now with the enable pin, or do you have further issues?

@matthias.tx Yes, the issue is now completely resolved, thanks.

Hello amrbekhit,

thats great! I wish you success with it !