Other Parts Discussed in Thread: AM3352, TPS65217
Tool/software: Linux
Hi,
I am working on a TI's customized board using SDCard for booting and ti-processor-sdk-linux-am335x-evm-03.02.00.05-Linux-x86-Install as SDK.
On using "aplay" command, I got the following error.
root@ngt:~# aplay audiocheck1.wav
aplay: /usr/lib/libasound.so.2: no version information available (required by aplay)
aplay: /usr/lib/libasound.so.2: no version information available (required by aplay)
aplay: /usr/lib/libasound.so.2: no version information available (required by aplay)
Playing WAVE 'audiocheck1.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, [ 116.229917] tlv320aic3x-codec 1-001b: Unable to sync registers
0x1-0x1. -121
Mono
^CAborted by signal Interrupt...
root@ngt:~#
Further, I checked snd_soc_tlv320aic3x module and removed it and got the following error.
root@ngt:~# lsmod
Module Size Used by
ecb 1909 0
sha256_generic 9503 0
hmac 2735 0
md5 1897 0
sha1_generic 2621 0
snd_soc_evm 4741 0
sha1_arm_neon 6261 0
sha1_arm 3862 1 sha1_arm_neon
omap_aes_driver 19488 0
omap_sham 21513 0
omap_rng 4759 0
rng_core 7538 1 omap_rng
snd_soc_davinci_mcasp 19249 2
snd_soc_edma 1169 1 snd_soc_davinci_mcasp
snd_soc_tlv320aic3x 48518 1
snd_soc_omap 3193 1 snd_soc_davinci_mcasp
snd_soc_core 141858 5 snd_soc_davinci_mcasp,snd_soc_edma,snd_soc_omap,snd_soc_tlv320aic3x,snd_soc_evm
snd_pcm_dmaengine 5325 2 snd_soc_core,snd_soc_omap
snd_pcm 91588 5 snd_soc_davinci_mcasp,snd_soc_core,snd_soc_omap,snd_soc_tlv320aic3x,snd_pcm_dmaengine
snd_timer 22848 1 snd_pcm
rtc_omap 8272 0
omap_wdt 4634 0
root@ngt:~# i2cdetect -y -r 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: 10 -- -- -- -- -- -- -- -- -- -- UU -- -- -- --
20: 20 21 -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- 4d -- --
50: 50 51 52 53 54 55 56 57 -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- 6c -- -- --
70: -- -- -- -- -- -- -- --
root@ngt:~# speaker-test
speaker-test: /usr/lib/libasound.so.2: no version information available (required by speaker-test)
speaker-test: /usr/lib/libasound.so.2: no version information available (required by speaker-test)
speaker-test 1.0.26
Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
[ 183.648960] tlv320aic3x-codec 1-001b: Unable to sync registers 0x1-0x1. -121
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 256 to 32768
Period size range from 128 to 16384
Using max buffer size 32768
Periods = 4
was set period_size = 8192
was set buffer_size = 32768
0 - Front Left
^C
root@ngt:~# rmmod snd_soc_tlv320aic3x
Error: Module snd_soc_tlv320aic3x is in use
root@ngt:~# rmmod -f snd_soc_tlv320aic3x
[ 225.103446] Disabling lock debugging due to kernel taint
root@ngt:~# i2cdetect -y -r 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: 10 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: 20 21 -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- 4d -- --
50: 50 51 52 53 54 55 56 57 -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- 6c -- -- --
70: -- -- -- -- -- -- -- --
root@ngt:~#
The codec device was at adress 0x1b, but after removing snd_soc_tlv320aic3x "rmmod snd_soc_tlv320aic3x", I'm expecting i2c address of codec to be shown instead of UU. But we are not getting anything on that i2c bus.
Changes Done
I have registered the tlv320aic3106 in the device tree as shown below:
1.
--- a/arch/arm/boot/dts/am335x-bone-common.dtsi
+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
+ i2c1_pins: pinmux_i2c1_pins {
+ pinctrl-single,pins = <
+ 0x158 (PIN_INPUT_PULLUP | MUX_MODE2) /* i2c1_sda.i2c1_sda */
+ 0x15c (PIN_INPUT_PULLUP | MUX_MODE2) /* i2c1_scl.i2c1_scl */
+ >;
+ };
+&i2c1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c1_pins>;
+ status = "okay";
+ clock-frequency = <100000>;
+
+ tlv320aic3106: tlv320aic3106@1b {
+ compatible = "ti,tlv320aic3106";
+ reg = <0x1b>;
+ gpio-reset = <&gpio0 8 0>; /* GPIO_1 AUDIO_CODEC_RST */
+ status = "okay";
+ };
+};
2.
--- a/arch/arm/boot/dts/am335x-boneblack.dts
+++ b/arch/arm/boot/dts/am335x-boneblack.dts
&rtc {
system-power-controller;
@@ -142,7 +152,7 @@
op-mode = <0>; /* MCASP_IIS_MODE */
tdm-slots = <2>;
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
- 0 0 1 0
+ 1 2 0 0 /* Changing from 0 0 1 0 to 1 2 0 0 */
>;
tx-num-evt = <32>;
rx-num-evt = <32>;
@@ -167,19 +177,14 @@
};
sound {
- compatible = "simple-audio-card";
- simple-audio-card,name = "TI BeagleBone Black";
- simple-audio-card,format = "i2s";
- simple-audio-card,bitclock-master = <&dailink0_master>;
- simple-audio-card,frame-master = <&dailink0_master>;
-
- dailink0_master: simple-audio-card,cpu {
- sound-dai = <&mcasp0>;
- clocks = <&clk_mcasp0>;
- };
+ compatible = "ti,da830-evm-audio";
+ ti,model = "DA830 EVM";
+ ti,audio-codec = <&tlv320aic3106>;
+ ti,mcasp-controller = <&mcasp0>;
+ ti,codec-clock-rate = <24000000>;
+ ti,audio-routing =
+ "Headphone Jack", "HPLOUT",
+ "Headphone Jack", "HPROUT";
- simple-audio-card,codec {
- sound-dai = <&tda19988>;
};
};
};
Please suggest how that i2c error and unable to sync registers error can be solved?
Thanks and Regards
Deshvir Malik