Part Number: AM3352
Other Parts Discussed in Thread: TLV320AIC3204, , TLV320AIC3106
Tool/software: Linux
Dear TI Team,
We are design a AI Smart Speaker project. We are used AM3352 and TLV320AIC3204 parts on our boards. We are used Kernel version at 4.4.30 and added "CONFIG_SND_SOC_TLV320AIC32X4" for TLV320AIC3204 audio on defconfig file and build into kernel driver( not kernel module). Beside that, I revise DTS file to integrate it to ALSA audio-simple-codec. Attached below is my dts file.
- After booting, I type "aplay -l" command, log is:
root@beaglebone:~# aplay -l
aplay: device_list:268: no soundcards found...
- Dmesg | grep tlv to see log:
[ 2.327225] tlv320aic32x4 1-0018: Failed getting the mclk. The current implementation does not support the usage of this codec without mclk.
I also try passing this error by using patch file at the link: http://mailman.alsa-project.org/pipermail/alsa-devel/2015-June/094297.html. But, it seems to not be working for this case.
- Could you help to answer my question as below:
+ How can I enable tlv320aic32x4 driver in kernel source?
+ The DTS file is so important. Can you give me some examples of writting DTS file to resolve this problem?
Please see my dts file as below:
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
/dts-v1/;
#include "am33xx.dtsi"
#include "am335x-bone-common.dtsi"
/* pruss: pick one: */
/*
* /etc/modprobe.d/pruss-blacklist.conf
*
* blacklist uio_pruss
*/
/* #include "am33xx-pruss-rproc.dtsi" */
/*
* /etc/modprobe.d/pruss-blacklist.conf
*
* blacklist pruss
* blacklist pruss_intc
* blacklist pru-rproc
*/
/* #include "am33xx-pruss-uio.dtsi" */
/ {
model = "TI AM335x BeagleBone Black";
compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";
};
&ldo3_reg {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
};
&mmc1 {
vmmc-supply = <&vmmcsd_fixed>;
};
&mmc2 {
vmmc-supply = <&vmmcsd_fixed>;
pinctrl-names = "default";
pinctrl-0 = <&emmc_pins>;
bus-width = <8>;
status = "okay";
};
&cpu0_opp_table {
/*
* All PG 2.0 silicon may not support 1GHz but some of the early
* BeagleBone Blacks have PG 2.0 silicon which is guaranteed
* to support 1GHz OPP so enable it for PG 2.0 on this board.
*/
oppnitro@1000000000 {
opp-supported-hw = <0x06 0x0100>;
};
};
&am33xx_pinmux {
mcasp0_pins: mcasp0_pins {
pinctrl-single,pins = <
AM33XX_IOPAD(0x9A8, PIN_INPUT_PULLDOWN | MUX_MODE0) /* mcasp0_axr1.mcasp0_axr1 AM335X_MCASP0_AXR1 */
AM33XX_IOPAD(0x998, PIN_INPUT_PULLDOWN | MUX_MODE0) /* mcasp0_axr0.mcasp0_axr0 AM335X_MCASP0_AXR0 */
AM33XX_IOPAD(0x994, PIN_INPUT_PULLDOWN | MUX_MODE0) /* mcasp0_fsx.mcasp0_fsx AM335X_MCASP0_FSX */
AM33XX_IOPAD(0x990, PIN_INPUT_PULLDOWN | MUX_MODE0) /* mcasp0_aclkx.mcasp0_aclkx AM335X_MCASP0_ACLKX */
>;
};
i2c2_pins: pinmux_i2c2_pins {
pinctrl-single,pins = <
0x150 0x72 /*spi0_scl.i2c2_sda,SLEWCTRL_SLOW | INPUT_PULLUP |MODE2*/
0x154 0x72 /*spi0_d0.i2c2_scl,SLEWCTRL_SLOW | INPUT_PULLUP | MODE2*/
>;
};
i2c1_pins: pinmux_i2c1_pins {
pinctrl-single,pins = <
0x168 (PIN_INPUT_PULLUP | MUX_MODE3) /* uart0_ctsn.i2c1_sda AM335X_I2C1_SDA */
0x16C (PIN_INPUT_PULLUP | MUX_MODE3) /* uart0_rtsn.i2c1_scl AM335X_I2C1_SCL */
>;
};
};
&i2c1 {
pinctrl-names = "default";
pinctrl-0 = <&i2c1_pins>;
status = "okay";
clock-frequency = <100000>;
tlv320aic32x4: tlv320aic32x4@18 {
#sound-dai-cells = <0>;
compatible = "ti,tlv320aic32x4";
reg = <0x18>;
};
};
&mcasp0 {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&mcasp0_pins>;
status = "okay";
op-mode = <0>; /* MCASP_IIS_MODE */
tdm-slots = <2>; /* Indicates number of channels transmitted or received over one serializer. */
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
1 2 0 0
>;
tx-num-evt = <32>;
rx-num-evt = <32>;
};
/ {
sound {
compatible = "simple-audi-ocard";
simple-audio-card,name = "tlv320aic32x4";
simple-audio-card,widgets =
"Headphone", "Headphone Jack",
"Line", "Line In";
simple-audio-card,routing =
"Headphone Jack", "HPL",
"Headphone Jack", "HPR",
"IN1_L", "Line In",
"IN1_R", "Line In";
simple-audio-card,format = "i2s";
simple-audio-card,bitclock-master = <&sound_master>;
simple-audio-card,frame-master = <&sound_master>;
simple-audio-card,bitclock-inversion;
simple-audio-card,cpu {
sound-dai = <&mcasp0>;
};
sound_master: simple-audio-card,codec {
sound-dai = <&tlv320aic32x4>;
system-clock-frequency = <12000000>;
};
};
};

