Other Parts Discussed in Thread: TLV320AIC3101, TLV320AIC3104
Hi TI
There's a request that customer wants to solve audio issue.
They sent us email because there is an issue where sound cannot be output while verifying audio path.
If they measure it, the audio cordec line out does not swing in 1.65v state.
The brief audio path is as follows.
AM5718 McASP3 <-> TLV320AIC3101 Audio Codec <-> TPA2017 Amp
Here is Audio circuit attached.
< Linux SDK version >
“ti-processor-sdk-linux-am57xx-evm-06.03.00.106”
< Pin Mux >
Pin Mux is configured in mux_data.h as below.
{XREF_CLK0, (M9 | PIN_OUTPUT_PULLDOWN)}, /* xref_clk0.clkout2 */
{MCASP3_ACLKX, (M0 | PIN_INPUT_PULLDOWN)}, /* mcasp3_aclkx.mcasp3_aclkx */
{MCASP3_FSX, (M0 | PIN_INPUT_SLEW)}, /* mcasp3_fsx.mcasp3_fsx */
{MCASP3_AXR0, (M0 | PIN_INPUT_SLEW)}, /* mcasp3_axr0.mcasp3_axr0 */
{MCASP3_AXR1, (M0 | PIN_INPUT_SLEW)}, /* mcasp3_axr1.mcasp3_axr1 */
< Kernel Config >
The followings have been done for audio config. No source code was modified.
CONFIG_SND_SOC_DAVINCI_MCASP=y
CONFIG_SND_SOC_OMAP_HDMI=y
CONFIG_SND_SOC_TLV320AIC31XX=y
CONFIG_SND_SOC_TLV320AIC3X=y
CONFIG_SND_SIMPLE_CARD_UTILS=y
CONFIG_SND_SIMPLE_CARD=y
CONFIG_SND_SIMPLE_SCU_CARD=y
CONFIG_SND_AUDIO_GRAPH_CARD=y
CONFIG_SND_AUDIO_GRAPH_SCU_CARD=y
< Device Tree >
They worked on the existing "am571x-idk.dts" as a base and attached the changed files to the mail. "dts.zip"
The "am57xx-alpha-common.dtsi" file was changed from the existing "am57xx-idk-common.dtsi".
The dtsi files that are not attached are being used the same as before without any changes.
For audio, see "am57xx-beagle-x15-common.dtsi"...
Added "vdd_3v3", "aic_dvdd", "sound0", "tlv320aic3104", and "mcasp3" nodes.
If they measure audio-related signals when playing 44.1 kHz 32bit music...
As below, we confirmed that BCLK is measured Left 32 clock, Right 32 clock and DATA is also output within a WCLK cycle.
- CLKOUT2 22.5792 MHz -> MCLK
- MCASP3_ACLKX 2.8xxx MHz <- BCLK
- MCASP3_FSX 44.1 KHz <- WCLK
- MCASP3_AXR0 DATA -> DIN
Attached log during playback: log.zip
“boot_log_01.txt” -> kernel boot log
“omapconf_mcasp3_play_01.txt” -> Using "omapconf show mcasp3” comamnd during playback
“tlv_reg_p0_idle_01.txt” -> tlv320aic3101 page 0 register dump when no playback is running
“tlv_reg_p0_play_01.txt” -> tlv320aic3101 page 0 register dump while playback is running
Also attached their shell script for playback -> V_audio.txt
#!/bin/sh SYS_CLASS_GPIO=/sys/class/gpio AMP_EN_GPIO_NUM=147 AMP_EN_GPIO=${SYS_CLASS_GPIO}/gpio${AMP_EN_GPIO_NUM} AMP_AGC1_GPIO_NUM=217 AMP_AGC1_GPIO=${SYS_CLASS_GPIO}/gpio${AMP_AGC1_GPIO_NUM} AMP_AGC2_GPIO_NUM=216 AMP_AGC2_GPIO=${SYS_CLASS_GPIO}/gpio${AMP_AGC2_GPIO_NUM} if [ "$1" == "1" ]; then if [ "$#" != "6" ]; then echo "Go to the Home~~!" exit fi echo "Play alphaVaud, Turn on Amp!" if [ -d $AMP_AGC1_GPIO ]; then echo ${AMP_AGC1_GPIO_NUM} > ${SYS_CLASS_GPIO}/unexport fi if [ -d $AMP_AGC2_GPIO ]; then echo ${AMP_AGC2_GPIO_NUM} > ${SYS_CLASS_GPIO}/unexport fi if [ -d $AMP_EN_GPIO ]; then echo ${AMP_EN_GPIO_NUM} > ${SYS_CLASS_GPIO}/unexport fi echo ${AMP_AGC1_GPIO_NUM} > ${SYS_CLASS_GPIO}/export echo ${AMP_AGC2_GPIO_NUM} > ${SYS_CLASS_GPIO}/export echo ${AMP_EN_GPIO_NUM} > ${SYS_CLASS_GPIO}/export echo out > ${AMP_AGC1_GPIO}/direction echo out > ${AMP_AGC2_GPIO}/direction echo out > ${AMP_EN_GPIO}/direction echo amixer -c alphaVaud sset 'Left PGA Mixer Mic2L' off echo amixer -c alphaVaud sset 'Right PGA Mixer Mic2R' off echo amixer -c alphaVaud sset 'Left PGA Mixer Line1L' off echo amixer -c alphaVaud sset 'Right PGA Mixer Line1R' off echo amixer -c alphaVaud sset 'PGA' 0 echo amixer -c alphaVaud sset 'HP' off echo amixer -c alphaVaud sset 'Left HP Mixer DACL1' off echo amixer -c alphaVaud sset 'Right HP Mixer DACR1' off echo amixer -c alphaVaud sset 'HP DAC' 0 echo amixer -c alphaVaud sset 'HPCOM' off echo amixer -c alphaVaud sset 'Left HPCOM Mixer DACL1' off echo amixer -c alphaVaud sset 'Right HPCOM Mixer DACR1' off echo amixer -c alphaVaud sset 'HPCOM DAC' 0 echo amixer -c alphaVaud sset PCM $2 echo amixer -c alphaVaud sset 'Line' on echo amixer -c alphaVaud sset 'Left Line Mixer DACL1' on echo amixer -c alphaVaud sset 'Right Line Mixer DACR1' on echo amixer -c alphaVaud sset 'Line DAC' $3 echo if [ "$4" == "1" ]; then echo 1 > ${AMP_AGC1_GPIO}/value echo "AGC1=1" else echo 0 > ${AMP_AGC1_GPIO}/value echo "AGC1=0" fi if [ "$5" == "1" ]; then echo 1 > ${AMP_AGC2_GPIO}/value echo "AGC2=1" else echo 0 > ${AMP_AGC2_GPIO}/value echo "AGC2=0" fi echo 1 > ${AMP_EN_GPIO}/value echo aplay -Dplughw:alphaVaud,0 $6 #if [ "$6" == "1" ]; then # aplay -Dplughw:alphaVaud,0 /home/root/V_test/sound/SineWaveMinus16.wav #else # aplay -Dplughw:alphaVaud,0 /home/root/V_test/sound/kids-playing-1.wav #fi echo elif [ "$1" == "0" ]; then echo "Turn off DAC, Turn off Amp!" if [ -d $AMP_EN_GPIO ]; then echo 0 > ${AMP_EN_GPIO}/value echo ${AMP_EN_GPIO_NUM} > ${SYS_CLASS_GPIO}/unexport fi if [ -d $AMP_AGC1_GPIO ]; then echo ${AMP_AGC1_GPIO_NUM} > ${SYS_CLASS_GPIO}/unexport fi if [ -d $AMP_AGC2_GPIO ]; then echo ${AMP_AGC2_GPIO_NUM} > ${SYS_CLASS_GPIO}/unexport fi echo amixer -c alphaVaud sset 'Line' off echo amixer -c alphaVaud sset 'Left Line Mixer DACL1' off echo amixer -c alphaVaud sset 'Right Line Mixer DACR1' off echo else echo "Go to the Home~~!" fi
Below is display when aplay -i command executed.
**** List of PLAYBACK Hardware Devices ****
card 0: alphaVaud [alphaVaud], device 0: davinci-mcasp.0-tlv320aic3x-hifi tlv320aic3x-hifi-0 [davinci-mcasp.0-tlv320aic3x-hifi tlv320aic3x-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
Please give your suggestion or hotfix for aci3101 enabling.
Thanks.
Regards,
Jack Cha