Tool/software: Linux
Hello !
I'm trying to run the tlv320aic3104 codec on my own board with imx6ul processor. In DTS I make the description:
clock_frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c2>;
status = "okay";
compatible = "ti,tlv320aic3x";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpio_key>;
reg = <0x18>;
gpio-reset = <&gpio5 0 GPIO_ACTIVE_LOW>;
/*
clocks = <&clks IMX6UL_CLK_SAI2>;
clock-names = "mclk";
*/
status = "okay";
};
};
The driver reports successful registration:
/ tlv320aic3x @ 18 [0] '- status (0)
Dec 25 09:44:35 myd-y6ul14x14 user.warn kernel: 1-0018 supply IOVDD not found, using dummy regulator
Dec 25 09:44:35 myd-y6ul14x14 user.warn kernel: 1-0018 supply DVDD not found, using dummy regulator
Dec 25 09:44:35 myd-y6ul14x14 user.warn kernel: 1-0018 supply AVDD not found, using dummy regulator
Dec 25 09:44:35 myd-y6ul14x14 user.warn kernel: 1-0018 supply DRVDD not found, using dummy regulator
Dec 25 09:44:35 myd-y6ul14x14 user.debug kernel: i2c-core: driver [tlv320aic3x-codec] registered
Dec 25 09:44:35 myd-y6ul14x14 user.info kernel: fsl-asrc 2034000.asrc: driver registered
But no more action on the i2c bus.
Dec 25 09:44:35 myd-y6ul14x14 user.info kernel: ALSA device list:
Dec 25 09:44:35 myd-y6ul14x14 user.info kernel: No soundcards found.
i2cdetect also defines response at address 0x18, if remove codec description from DTS.
I tried to debug the tlv320aic3x.c driver:
I tried to describe the sound node in DTS in different ways, but I get the same result:
variant1:
sound {
compatible = "simple-audio-card";
simple-audio-card,name = "OnboardTLV320";
simple-audio-card,format = "i2s";
simple-audio-card,bitclock-master = <&dailink_master>;
simple-audio-card,frame-master = <&dailink_master>;
simple-audio-card, widgets =
"Microphone", "Mic Jack",
"Line", "Line In",
"Line", "Line Out",
"Speaker", "Speaker",
"Headphone", "Headphone Jack";
simple-audio-card, routing =
"Line Out", "LLOUT",
"Line Out", "RLOUT",
"Speaker", "SPOP",
"Speaker", "SPOM",
"Headphone Jack", "HPLOUT",
"Headphone Jack", "HPROUT",
"MIC3L", "Mic Jack",
"MIC3R", "Mic Jack",
"Mic Jack", "Mic Bias",
"LINE1L", "Line In",
"LINE1R", "Line In";
simple-audio-card, cpu {
sound-dai = <&sai2>;
};
dailink_master: simple-audio-card, codec {
sound-dai = <&codec>;
clocks = <&tlv320_mclk>;
};
variant2:
sound {
compatible = "ti,tlv320aic3x";
cpu-dai = <&sai2>;
gpr = <&gpr>;
ti,audio-codec = <&codec>;
ti,asrc-controller = <&asrc>;
ti,codec-clock-rate = <12000000>;
ti,audio-routing =
"Headphone Jack", "HPLOUT",
"Headphone Jack", "HPROUT",
"LINE1L", "Line In",
"LINE1R", "Line In";
};
SAI descritption:
& sai2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai2>;
assigned-clocks = <&clks IMX6UL_CLK_SAI2_SEL>,
<&clks IMX6UL_CLK_SAI2>;
assigned-clock-parents = <& clks IMX6UL_CLK_PLL4_AUDIO_DIV>;
assigned-clock-rates = <0>, <12288000>;
status = "okay";
};
CONFIG_SND=y
CONFIG_SND_TIMER=y
CONFIG_SND_PCM=y
CONFIG_SND_DMAENGINE_PCM=y
CONFIG_SND_HWDEP=y
CONFIG_SND_RAWMIDI=y
CONFIG_SND_COMPRESS_OFFLOAD=y
CONFIG_SND_JACK=y
CONFIG_SND_SUPPORT_OLD_API=y
CONFIG_SND_VERBOSE_PROCFS=y
CONFIG_SND_VERBOSE_PRINTK=y
CONFIG_SND_DEBUG=y
CONFIG_SND_DEBUG_VERBOSE=y
CONFIG_SND_ARM=y
CONFIG_SND_SPI=y
CONFIG_SND_USB=y
CONFIG_SND_USB_AUDIO=y
CONFIG_SND_SOC=y
CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y
CONFIG_SND_SOC_FSL_ASRC=y
CONFIG_SND_SOC_FSL_SAI=y
CONFIG_SND_SOC_FSL_SSI=y
CONFIG_SND_SOC_IMX_PCM_DMA=y
CONFIG_SND_SOC_IMX_AUDMUX=y
CONFIG_SND_IMX_SOC=y
CONFIG_SND_SOC_IMX_PCM_FIQ=y
CONFIG_SND_SOC_I2C_AND_SPI=y
CONFIG_SND_SOC_TLV320AIC3X=y