On 06/29/2017 04:24 PM, gianluca wrote:
On 06/29/2017 03:49 PM, Fabio Estevam wrote:
On Thu, Jun 29, 2017 at 10:39 AM, gianluca gianlucarenzi@eurekelettronica.it wrote:
In the device-tree the sound node is so configured:
sound { compatible = "fsl,imx-audio-sgtl5000"; model = "imx6-ek360-sgtl5000"; ssi-controller = <&ssi1>; audio-codec = <&sgtl5000>; audio-routing = "MIC_IN", "Mic Jack", "Mic Jack", "Mic Bias", "Headphone Jack", "HP_OUT"; mux-int-port = <1>; mux-ext-port = <4>;
This should be mux-ext-port = <3>;
I've already modified now.
I do not know about the mux-int-port or mux-ext-port. The only thing I know is the hardware guy told me he routed the ssi (CLK and DAT) to:
AUD3_TXC_R (i2s_sclk) AUD3_TXD (i2s_din) AUD3_TXFS (i2s_lrclk) AUD3_RXD (i2s_dout) SYS_MCLK (GPIO_0_CLKO sys_mclk)
since you are using AUD3 pins.
So, are they good?
My only concern is the value after the MSYS_CLK (GPIO_0_CCM_CLK01). It is 0x030b0. Is this correct for output clock signal?
So I configured the pinmux for audio in the following way:
pinctrl_audmux: audmuxgrp { fsl,pins = < /* SGTL5000 sys_mclk */ MX6QDL_PAD_GPIO_0__CCM_CLKO1
0x030b0
The remaining pins seems to be configured as a lot of boards in the current 4.12-rc7 kernel. So I can assume they are good.
MX6QDL_PAD_CSI0_DAT4__AUD3_TXC
0x130b0 MX6QDL_PAD_CSI0_DAT5__AUD3_TXD 0x110b0 MX6QDL_PAD_CSI0_DAT6__AUD3_TXFS 0x130b0 MX6QDL_PAD_CSI0_DAT7__AUD3_RXD 0x130b0 >; };
They should be good.
How can I check or dump the SGTL5000 registers?
cat /sys/kernel/debug/regmap/xxx
I am missing the regmap. Should I configure kernel with additional CONFIG_ ?
I started from the imxv6_imxv7_defconfig, then modified to have the correct drivers module as built-in or dynamic.
Maybe am I missing something else??? :-(
The funny thing is I can clearly hear the 'POP' of the speaker after some seconds the end of the audio stream...
# aplay /usr/share/sounds/alsa/Front_Right.wav