trace (61.8 KB)
tegra-audio-debug.txt (555.8 KB)
I think I have a routing problem thanks
Terry
trace (61.8 KB)
tegra-audio-debug.txt (555.8 KB)
I think I have a routing problem thanks
Terry
Please check NVIDIA Jetson Linux Driver Package Software Features : Audio Setup and Development | NVIDIA Docs if can help.
tried everything in the doc, nothing changed,
Looks like a routing problem.
Terry
Hi terrysu50z,
Need below inputs
Is the pinmux for I2S1 and aud_mclk set via Jetson-IO tool?
Are you seeing any error logs in dmesg? (during playback)
Share the DAPM routes defined in sound node of device tree (nvidia, audio_routing). Working DAPM routes can be found here (Audio codec TLV320AIC3120 and devicetree config - #29 by bmanyu). Restating for reference
nvidia,audio-routing =
"x Headphone", "x HPL",
"x Headphone", "x HPR",
"x Int Spk", "x SPK",
"x MIC1LP", "x Mic",
"x MIC1RP", "x Mic",
"x MIC1LM", "x Mic",
"y Headphone", "y OUT",
"y IN", "y Mic",
"z Headphone", "z OUT",
"z IN", "z Mic",
"m Headphone", "m OUT",
"m IN", "m Mic",
"n Headphone", "n OUT",
"n IN", "n Mic",
"o Headphone", "o OUT",
"o IN", "o Mic",
"a IN", "a Mic",
"b IN", "b Mic",
"c IN", "c Mic",
"d IN", "d Mic",
"d1 Headphone", "d1 OUT",
"d3 Headphone", "d3 OUT";
Thanks
yes for headphones and mic, but not for the speaker.
I have tried alot of different things in audio-routing but have not found the correct way to get the “Playback” routed to SPK.
Things I have added and tried.
"x Playback", "x SPK",
"x Output Left","x Speaker",
"x Speaker", "x SPK ClassD",
"x Playback", "x DAC Left Input",
"x DAC Left", "x Output Left",
"x Output Left","x Speaker",
"x Speaker", "x SPK ClassD",
"x SPK ClassD", "x SPK",
Also I see that
Playback will be routed to DAC Right/Left, how will this work with the mono speaker on the tlv320aic3100?
Thanks,
Terry
Is the driver missing stereo to mon conversion?
Is there a Theory of Operation doc for the tlv320aic3100, from TI that might mention more about how to use the mono speaker,
It looks like amixer -c 1 does not show all the possible routes and some how more routes are defined in the codec driver, but they are not documented or understandable.
Thanks,
Trying everything I can think of but can’t seem to get the playback enabled and linked to the SKR
Got these from the same post
amixer -c tegrasndt186ref cset name=‘x DAC Left Input’ 3
amixer -c tegrasndt186ref cset name=‘x DAC Playback Volume’ 127
amixer -c tegrasndt186ref cset name=‘x DAC Right Input’ 3
amixer -c tegrasndt186ref cset name=‘x Output Left From Left DAC’ on
amixer -c tegrasndt186ref cset name=‘x Output Right From Right DAC’ on
amixer -c tegrasndt186ref cset name=‘x Speaker Analog Playback Volume’ 127
amixer -c tegrasndt186ref cset name=‘x Speaker Driver Playback Switch’ on
amixer -c tegrasndt186ref cset name=‘x Speaker Driver Playback Volume’ 3
amixer -c tegrasndt186ref cset name=‘x Speaker Switch’ on
I try amixer -c tegrasndt186ref cset name=‘x Playback’ on
amixer: Cannot find the given element from control hw:1
So I don’t understand when Playback is turned on and the routing is set up.
Hi terrysu50z,
The only routes that need to be added are above. Other routes are taken care of by the codec driver and through below settings for both capture and playback
amixer -c tegrasndt186ref cset name='x ADC Capture Switch' on
amixer -c tegrasndt186ref cset name='x ADC Capture Volume' 64
amixer -c tegrasndt186ref cset name='x ADC Fine Capture Volume' 4
amixer -c tegrasndt186ref cset name='x DAC Left Input' 3
amixer -c tegrasndt186ref cset name='x DAC Playback Volume' 127
amixer -c tegrasndt186ref cset name='x DAC Right Input' 3
amixer -c tegrasndt186ref cset name='x HP Analog Playback Volume' 127,127
amixer -c tegrasndt186ref cset name='x HP Driver Playback Switch' on,on
amixer -c tegrasndt186ref cset name='x HP Driver Playback Volume' 7,7
amixer -c tegrasndt186ref cset name='x HP Left Switch' on
amixer -c tegrasndt186ref cset name='x HP Right Switch' on
amixer -c tegrasndt186ref cset name='x MIC1LM M-Terminal' 1
amixer -c tegrasndt186ref cset name='x MIC1LM P-Terminal' 1
amixer -c tegrasndt186ref cset name='x MIC1LP P-Terminal' 1
amixer -c tegrasndt186ref cset name='x MIC1RP P-Terminal' 1
amixer -c tegrasndt186ref cset name='x Mic PGA Capture Volume' 80
amixer -c tegrasndt186ref cset name='x Output Left From Left DAC' on
amixer -c tegrasndt186ref cset name='x Output Left From MIC1LP' on
amixer -c tegrasndt186ref cset name='x Output Left From MIC1RP' on
amixer -c tegrasndt186ref cset name='x Output Right From MIC1RP' on
amixer -c tegrasndt186ref cset name='x Output Right From Right DAC' on
amixer -c tegrasndt186ref cset name='x Speaker Analog Playback Volume' 127
amixer -c tegrasndt186ref cset name='x Speaker Driver Playback Switch' on
amixer -c tegrasndt186ref cset name='x Speaker Driver Playback Volume' 3
amixer -c tegrasndt186ref cset name='x Speaker Switch' on
What is the your observation with above routes and settings? Generally for codec related settings, codec vendor will be able to provide the path details and mixer settings via datasheet/other communication. Since above are used by another user, I have referenced them
Thanks
Yes, I removed anything doing with playback and speaker, spk from the audio-routing and how I get this
It looks like the routing is correct from playback to SPK
cat-24670 [004] .... 55424.181252: snd_soc_dapm_path: *x Playback <- (direct) <- I2S1 DAP Transmit-x Playback
cat-24670 [004] .... 55424.181258: snd_soc_dapm_path: *I2S1 DAP Transmit-x Playback <- (direct) <- I2S1 DAP Transmit
cat-24670 [004] .... 55424.181260: snd_soc_dapm_path: *I2S1 DAP Transmit <- (direct) <- I2S1 DAP TX
cat-24670 [004] .... 55424.181261: snd_soc_dapm_path: *I2S1 DAP TX <- (direct) <- I2S1 CIF RX
cat-24670 [004] .... 55424.181263: snd_soc_dapm_path: *I2S1 CIF RX <- (direct) <- I2S1 CIF Receive
cat-24670 [004] .... 55424.181264: snd_soc_dapm_path: *I2S1 CIF Receive <- (direct) <- I2S1 Transmit-I2S1 CIF Receive
cat-24670 [004] .... 55424.181266: snd_soc_dapm_path: *I2S1 Transmit-I2S1 CIF Receive <- (direct) <- I2S1 Transmit
cat-24670 [004] .... 55424.181267: snd_soc_dapm_path: *I2S1 Transmit <- (direct) <- I2S1 TX
cat-24670 [004] .... 55424.181269: snd_soc_dapm_path: *I2S1 TX <- (direct) <- I2S1 Mux
cat-24670 [004] .... 55424.181338: snd_soc_dapm_path: *I2S1 Mux <- ADMAIF1 <- ADMAIF1 RX
cat-24670 [004] .... 55424.181340: snd_soc_dapm_path: *ADMAIF1 RX <- (direct) <- ADMAIF1 Receive
cat-24672 [005] .... 55424.200377: snd_soc_dapm_path: *x DAC Right <- (direct) <- x Playback
cat-24672 [005] .... 55424.200382: snd_soc_dapm_path: *x DAC Right <- (direct) <- x DAC Right Input
cat-24674 [000] .... 55424.219491: snd_soc_dapm_path: *x DAC Left <- (direct) <- x Playback
cat-24674 [000] .... 55424.219496: snd_soc_dapm_path: *x DAC Left <- (direct) <- x DAC Left Input
cat-24676 [000] .... 55424.238356: snd_soc_dapm_path: x Output Right <- From MIC1RP <- x MIC1RP
cat-24676 [000] .... 55424.238360: snd_soc_dapm_path: *x Output Right <- From Right DAC <- x DAC Right
cat-24678 [005] .... 55424.257439: snd_soc_dapm_path: x Output Left <- From MIC1RP <- x MIC1RP
cat-24678 [005] .... 55424.257444: snd_soc_dapm_path: x Output Left <- From MIC1LP <- x MIC1LP
cat-24678 [005] .... 55424.257445: snd_soc_dapm_path: *x Output Left <- From Left DAC <- x DAC Left
cat-24680 [000] .... 55424.276596: snd_soc_dapm_path: *x Speaker <- Switch <- x Output Left
cat-24682 [003] .... 55424.295969: snd_soc_dapm_path: *x SPK ClassD <- (direct) <- x Speaker
cat-24684 [003] .... 55424.315002: snd_soc_dapm_path: *x SPK <- (direct) <- x SPK ClassD
Ignore this I found that
sudo cat /sys/kernel/debug/asoc/tegra-snd-t186ref-mobile-rt565x/codec:tlv320aic31xx-codec.8-0018/dapm/‘x Playback’
was putting stuff into the trace,
This is all I am getting in my trace when I run aplay
aplay -Dplughw:tegrasndt186ref,0 /usr/share/sounds/alsa/Noise.wav
trace gets two lines.
aplay-10224 [000] … 1750.032147: snd_soc_dapm_path: *ADMAIF1 Receive ← (direct) ← Playback 1
aplay-10224 [000] … 1750.032152: snd_soc_dapm_path: *ADMAIF1 Receive ← (direct) ← ADMAIF1 CIF Receive-ADMAIF1 Receive
So I am missing something to get the aplay to work, even if I use all the amixer command you just gave me, I think I am missing something to get the playback to work with the mono spk, again the other person only need headphones and mic to work, I just want SPK to work.
Thanks,
Hi terrysu50z,
Its not clear to me as to what DAPM routes and mixer settings have been used for the observation in previous comment. Can you share them once. Yes its an incomplete routing issue that is leading to no sound
Thanks
This is the latest and greatest trace,
Is it correct to assume that if it is a “direct” connection nothing needs to be done,
and if speaker-test-10096 [000] … 3527.850577: snd_soc_dapm_path: *x Speaker ← Switch ← x Output Left that the “switch” might need to be enabled.
I can’t figure out how to tell the status of the switch, or turn it on/off
I now get a click whenever I use speaker-test or aplay,
Found I needed audio-routing = “x INT Spk”, “x SPK” to get it to talk to the driver.
pinmux info
sudo grep dap1 /sys/kernel/debug/tegra_pinctrl_reg
Bank: 0 Reg: 0x02431028 Val: 0x00000400 → dap1_fs_pj3
Bank: 0 Reg: 0x02431030 Val: 0x00000454 → dap1_din_pj2
Bank: 0 Reg: 0x02431038 Val: 0x00000400 → dap1_dout_pj1
Bank: 0 Reg: 0x02431040 Val: 0x00000400 → dap1_sclk_pj0
The driver debug I have added shows a bunch of activity during speaker-test or aplay
[ 2836.189473] aic31xx_set_bias_level(1144)
[ 2836.189486] tlv320aic31xx-codec 8-0018: ## aic31xx_set_bias_level: 1 → 2
[ 2836.189490] aic31xx_clk_on(1066)
[ 2836.189495] tlv320aic31xx-codec 8-0018: codec clock → on (rate 48000)
[ 2836.204586] tegra210-i2s tegra210-i2s.0: debug i2s ffffffc0edfdccd8 br 2
[ 2836.211335] tegra210-i2s tegra210-i2s.0: debug ic 3072000
[ 2836.217356] tlv320aic31xx-codec 8-0018: ## aic31xx_hw_params: width 16 rate 48000
[ 2836.217362] aic31xx_setup_pll(782)
[ 2836.222350] tlv320aic31xx-codec 8-0018: pll 8.1920/1 dosr 128 n 8 m 2 aosr 128 n 8 m 2 bclk_n 16
[ 2836.222362] aic31xx_dac_mute(911) mute 0
[ 2836.223200] tegra210-i2s tegra210-i2s.0: debug(206) timeout 65535
[ 2836.230203] aic31xx_dapm_power_event(357)
[ 2836.232302] aic31xx_dapm_power_event(357)
[ 2836.233635] aic31xx_set_bias_level(1144)
[ 2836.233643] tlv320aic31xx-codec 8-0018: ## aic31xx_set_bias_level: 2 → 3
[ 2836.959114] aic31xx_set_bias_level(1144)
[ 2836.959126] tlv320aic31xx-codec 8-0018: ## aic31xx_set_bias_level: 3 → 2
[ 2836.960335] aic31xx_dapm_power_event(357)
[ 2836.962644] aic31xx_dapm_power_event(357)
[ 2836.989838] aic31xx_dac_mute(911) mute 1
[ 2836.990751] aic31xx_set_bias_level(1144)
[ 2836.990761] tlv320aic31xx-codec 8-0018: ## aic31xx_set_bias_level: 2 → 1
[ 2836.990764] aic31xx_clk_off(1085)
[ 2836.990769] tlv320aic31xx-codec 8-0018: codec clock → off
[ 3527.850713] aic31xx_set_bias_level(1144)
[ 3527.850726] tlv320aic31xx-codec 8-0018: ## aic31xx_set_bias_level: 1 → 2
[ 3527.850729] aic31xx_clk_on(1066)
[ 3527.850734] tlv320aic31xx-codec 8-0018: codec clock → on (rate 48000)
[ 3527.865607] tegra210-i2s tegra210-i2s.0: debug i2s ffffffc0edfdccd8 br 2
[ 3527.872416] tegra210-i2s tegra210-i2s.0: debug ic 3072000
[ 3527.878401] tlv320aic31xx-codec 8-0018: ## aic31xx_hw_params: width 16 rate 48000
[ 3527.878407] aic31xx_setup_pll(782)
[ 3527.884096] tlv320aic31xx-codec 8-0018: pll 8.1920/1 dosr 128 n 8 m 2 aosr 128 n 8 m 2 bclk_n 8
[ 3527.884109] aic31xx_dac_mute(911) mute 0
[ 3527.884931] tegra210-i2s tegra210-i2s.0: debug(206) timeout 65535
[ 3527.891936] aic31xx_dapm_power_event(357)
[ 3527.894038] aic31xx_dapm_power_event(357)
[ 3527.895398] aic31xx_set_bias_level(1144)
[ 3527.895406] tlv320aic31xx-codec 8-0018: ## aic31xx_set_bias_level: 2 → 3
trace (11.9 KB)
tegra-audio-debug.txt (555.5 KB)
any input yet?
Hi terrysu50x,
The debug trace you attached seems to complete for the playback via Speaker. Yes, direct connection with prefix can be considered to be enabled. Not sure why the playback sound is not heard still. After click, is there any error on stdout or dmesg?
Can you probe the FS and BCLK lines during use case and see if there frequency is as expected and share the clock summary during playback (cat /sys/kernel/debug/clk/clk_summary) Also, is any MCLK being connected to codec and what is the prescribed MCLK for the codec ? Are we abiding to the MCLK requirement?
Thanks
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.