Sound card transplantation

Can you please clarify the audio codec you are using? I don’t see a tlv320aic3109 on the TI website.

The reason I ask is because there are two drivers …

  1. sound/soc/codecs/tlv320aic3x.c
    This driver is compatible with the following devices …
    “ti,tlv320aic3x” - Generic TLV320AIC3x device
    “ti,tlv320aic33” - TLV320AIC33
    “ti,tlv320aic3007” - TLV320AIC3007
    “ti,tlv320aic3106” - TLV320AIC3106
    “ti,tlv320aic3104” - TLV320AIC3104

  2. sound/soc/codecs/tlv320aic31xx.c
    This driver is compatible with the following devices …
    “ti,tlv320aic310x” - Generic TLV320AIC31xx with mono speaker amp
    “ti,tlv320aic311x” - Generic TLV320AIC31xx with stereo speaker amp
    “ti,tlv320aic3100” - TLV320AIC3100 (mono speaker amp, no MiniDSP)
    “ti,tlv320aic3110” - TLV320AIC3110 (stereo speaker amp, no MiniDSP)
    “ti,tlv320aic3120” - TLV320AIC3120 (mono speaker amp, MiniDSP)
    “ti,tlv320aic3111” - TLV320AIC3111 (stereo speaker amp, MiniDSP)
    “ti,tlv320dac3100” - TLV320DAC3100 (no ADC, mono speaker amp, no MiniDSP)

Looking at your dmesg log, the reason why the codec is not registered is because the supplies are missing from the device-tree binding …

[    3.743213] regulator_get() failed for (1-0018,IOVDD), -19
[    3.743217] tlv320aic3x-codec 1-0018: Failed to get supply 'IOVDD': -19
[    3.743220] tlv320aic3x-codec 1-0018: Failed to request supplies: -19

However, before we try to fix the above, let’s clarify exactly what codec you are using so we know we are using the correct driver.

Regards,
Jon

TI’s reply is TLC320AIC3X
Tlv320aic3109 is similar to tlv320aic3104

The power of IOVDD should be 3.3V
Where should I add?

Where can I find this device on the TI website?

Regards,
Jon

http://www.ti.com/tool/tlv320aic3109evm-k?keyMatch=tlv320aic3109&tisearch=Search-EN-Everything

OK, is the codec on some TI evaluation board that is connected to the Jetson? If so then the codec is most likely powered by its own supply and therefore, we would need to have some sort of dummy regulator in device-tree because it is not a regulator that Tegra can control. I wonder if something like the following would work (not tested) …

diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index fe45a16a5142..bd0886066cd0 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -53,12 +53,9 @@
 
 #include "tlv320aic3x.h"
 
-#define AIC3X_NUM_SUPPLIES     4
+#define AIC3X_NUM_SUPPLIES     1
 static const char *aic3x_supply_names[AIC3X_NUM_SUPPLIES] = {
-       "IOVDD",        /* I/O Voltage */
-       "DVDD",         /* Digital Core Voltage */
-       "AVDD",         /* Analog DAC Voltage */
-       "DRVDD",        /* ADC Analog and Output Driver Voltage */
+       "dummy",
 };

Regards,
Jon

After the change did not solve the problem

[    3.735153] cpuidle: Initializing cpuidle driver init for A57 cluster
[    3.736090] tachometer tegra-tachometer: Tachometer driver tegra-tachometer registered
[    3.736094] Tachometer driver initialized with pulse_per_rev: 2 and win_len: 2
[    3.738342] usbcore: registered new interface driver snd-usb-audio
[    3.739059] regulator_get() failed for (1-0018,dummy), -19
[    3.739062] tlv320aic3x-codec 1-0018: Failed to get supply 'dummy': -19
[    3.739065] tlv320aic3x-codec 1-0018: Failed to request supplies: -19
[    3.740074] tegra210_adsp_audio_platform_probe: platform probe started
[    3.741001] tegra210-adsp adsp_audio: Default param-type to BYTE for mp3-dec1
[    3.744527] tegra210-adsp adsp_audio: Default param-type to BYTE for spkprot
[    3.744996] tegra210-adsp adsp_audio: Default param-type to BYTE for src
[    3.745430] tegra210-adsp adsp_audio: Default param-type to BYTE for aac-dec1
[    3.745881] tegra210-adsp adsp_audio: Default param-type to BYTE for aec
[    3.745886] tegra210-adsp adsp_audio: adma channel page address dt entry not found
[    3.745889] tegra210-adsp adsp_audio: using adma channel page 0
[    3.745932] input: tegra-hda HDMI/DP,pcm=3 as /devices/3510000.hda/sound/card0/input0
[    3.746145] tegra210_adsp_audio_platform_probe probe successfull.
[    3.746145] input: tegra-hda HDMI/DP,pcm=7 as /devices/3510000.hda/sound/card0/input1
[    3.757098] OPE platform probe
[    3.757178] OPE platform probe successful
[    3.764652] tegra-snd-t186ref-mobile-rt565x sound: Failed to get HP Det GPIO, should be handled by codec
[    3.766877] tegra-snd-t186ref-mobile-rt565x sound: ASoC: CODEC DAI tlv320aic3x-hifi not registered
[    3.766882] tegra-snd-t186ref-mobile-rt565x sound: snd_soc_register_card failed (-517)
[    3.767461] GACT probability NOT on
[    3.767470] Mirror/redirect action on
[    3.767481] u32 classifier
[    3.767482]     Actions configured
[    3.767508] nf_conntrack version 0.5.0 (65536 buckets, 262144 max)
[    3.768169] ipip: IPv4 over IPv4 tunneling driver
[    3.768508] Initializing XFRM netlink socket

Strangely, I can see 3 i2c addresses by plugging in the device

nvidia@tegra-ubuntu:~$ sudo i2cdetect -r -y 1
[sudo] password for nvidia: 
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- 18 -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: 50 -- 52 -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --
nvidia@tegra-ubuntu:~$ sudo i2cdump -f -y 1 0x18                                                                  [21/1802]
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 00 00 00 10 04 00 00 00 00 00 00 01 00 00 00 80    ...??......?...?
10: 80 ff ff 78 78 78 78 78 78 06 00 fe 00 00 fe 00    ?..xxxxxx?.?..?.
20: 40 00 00 00 00 00 00 00 00 00 00 80 80 00 00 00    @..........??...
30: 00 00 00 04 00 00 00 00 00 00 04 00 00 00 00 00    ...?......?.....
40: 00 04 00 00 00 00 00 00 04 00 00 00 00 00 00 00    .?......?.......
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
60: 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00    ......?.........
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
80: 00 00 00 10 04 00 00 00 00 00 00 01 00 00 00 80    ...??......?...?
90: 80 ff ff 78 78 78 78 78 78 06 00 fe 00 00 fe 00    ?..xxxxxx?.?..?.
a0: 40 00 00 00 00 00 00 00 00 00 00 80 80 00 00 00    @..........??...
b0: 00 00 00 04 00 00 00 00 00 00 04 00 00 00 00 00    ...?......?.....
c0: 00 04 00 00 00 00 00 00 04 00 00 00 00 00 00 00    .?......?.......
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
e0: 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00    ......?.........
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
nvidia@tegra-ubuntu:~$ sudo i2cdump -f -y 1 0x50
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: ff ff 22 2c fd 00 12 0c 1d 00 63 00 00 75 06 e6    ..",?.???.c..u??
10: e4 f0 3f e4 0f e5 74 7b 58 60 e6 60 00 ff ff ff    ??????t{X`?`....
20: ff ff 22 2c fd 00 12 0c 1d 00 63 00 00 75 06 e6    ..",?.???.c..u??
30: e4 f0 3f e4 0f e5 74 7b 58 60 e6 60 00 ff ff ff    ??????t{X`?`....
40: ff ff 22 2c fd 00 12 0c 1d 00 63 00 00 75 06 e6    ..",?.???.c..u??
50: e4 f0 3f e4 0f e5 74 7b 58 60 e6 60 00 ff ff ff    ??????t{X`?`....
60: ff ff 22 2c fd 00 12 0c 1d 00 63 00 00 75 06 e6    ..",?.???.c..u??
70: e4 f0 3f e4 0f e5 74 7b 58 60 e6 60 00 ff ff ff    ??????t{X`?`....
80: ff ff 22 2c fd 00 12 0c 1d 00 63 00 00 75 06 e6    ..",?.???.c..u??
90: e4 f0 3f e4 0f e5 74 7b 58 60 e6 60 00 ff ff ff    ??????t{X`?`....
a0: ff ff 22 2c fd 00 12 0c 1d 00 63 00 00 75 06 e6    ..",?.???.c..u??
b0: e4 f0 3f e4 0f e5 74 7b 58 60 e6 60 00 ff ff ff    ??????t{X`?`....
c0: ff ff 22 2c fd 00 12 0c 1d 00 63 00 00 75 06 e6    ..",?.???.c..u??
d0: e4 f0 3f e4 0f e5 74 7b 58 60 e6 60 00 ff ff ff    ??????t{X`?`....
e0: ff ff 22 2c fd 00 12 0c 1d 00 63 00 00 75 06 e6    ..",?.???.c..u??
f0: e4 f0 3f e4 0f e5 74 7b 58 60 e6 60 00 ff ff ff    ??????t{X`?`....
nvidia@tegra-ubuntu:~$ sudo i2cdump -f -y 1 0x52
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

Can you ensure that ‘CONFIG_REGULATOR_DUMMY’ is enabled in the kernel configuration (arch/arm64/configs/tegra18_defconfig)? You can check by …

$ zcat /proc/config.gz | grep REGULATOR_DUMMY

Please attached the complete dmesg output.

Thanks
Jon

The good news, according to your suggestion, the problem is solved.
But there is still no sound and the pulse can be seen on the logic analyzer. Is my setting incorrect?

"z LINE1L",			"z IN",
            "z OUT",		"z LLOUT",
            "z OUT",		"z HPLOUT",
            "z OUT",		"z HPLCOM";
static const struct snd_soc_dapm_widget tegra_t186ref_dapm_widgets[] = {
	SND_SOC_DAPM_HP(	"x Headphone Jack",	tegra_rt565x_event_hp),
	SND_SOC_DAPM_SPK(	"x Int Spk",		tegra_rt565x_event_int_spk),
	SND_SOC_DAPM_MIC(	"x Int Mic",		tegra_rt565x_event_int_mic),
	SND_SOC_DAPM_MIC(	"x Mic Jack",		tegra_rt565x_event_ext_mic),
	SND_SOC_DAPM_MIC(	"Int Mic",			NULL),
	SND_SOC_DAPM_HP(	"x Headphone", 		NULL),
	SND_SOC_DAPM_MIC(	"x Mic", 			NULL),
	SND_SOC_DAPM_HP(	"y Headphone", 		NULL),
	SND_SOC_DAPM_MIC(	"y Mic", 			NULL),
	SND_SOC_DAPM_HP(	"m Headphone", 		NULL),
	SND_SOC_DAPM_MIC(	"m Mic", 			NULL),
	SND_SOC_DAPM_HP(	"n Headphone", 		NULL),
	SND_SOC_DAPM_MIC(	"n Mic", 			NULL),
	SND_SOC_DAPM_HP(	"o Headphone", 		NULL),
	SND_SOC_DAPM_MIC(	"o Mic", 			NULL),
	SND_SOC_DAPM_MIC(	"a Mic", 			NULL),
	SND_SOC_DAPM_MIC(	"b Mic", 			NULL),
	SND_SOC_DAPM_MIC(	"c Mic", 			NULL),
	SND_SOC_DAPM_MIC(	"d Mic", 			NULL),
	SND_SOC_DAPM_HP(	"e Headphone", 		NULL),
	SND_SOC_DAPM_MIC(	"e Mic", 			NULL),
	SND_SOC_DAPM_SPK(	"d1 Headphone", 	NULL),
	SND_SOC_DAPM_SPK(	"d2 Headphone", 	NULL),
    SND_SOC_DAPM_HP(	"z OUT", 			NULL),
	SND_SOC_DAPM_MIC(	"z IN", 			NULL),

dmesg.log (94.6 KB)

Hello!

Yes the routing looks OK to me. Are you trying playback or record? If you need both, let’s start with playback and work on record next.

For playback are you using the headphone or line-out outputs? I see you have both included in the route, but which interface are you using on the board?

Can you trace the DAPM power widgets when starting playback/capture?

echo 0 | sudo tee /sys/kernel/debug/tracing/trace
echo 0 | sudo tee /sys/kernel/debug/tracing/events/enable
echo 1 | sudo tee /sys/kernel/debug/tracing/tracing_on
echo 1 | sudo tee /sys/kernel/debug/tracing/events/asoc/snd_soc_dapm_widget_power/enable

aplay ...

sudo cat /sys/kernel/debug/tracing/trace

Regards,
Jon

root@tegra-ubuntu:~# echo 0 sudo tee /sys/kernel/debug/tracing/trace
0 sudo tee /sys/kernel/debug/tracing/trace
root@tegra-ubuntu:~# echo 0 sudo tee /sys/kernel/debug/tracing/events/enable 
0 sudo tee /sys/kernel/debug/tracing/events/enable
root@tegra-ubuntu:~# echo 1 sudo tee /sys/kernel/debug/tracing/tracing_on 
1 sudo tee /sys/kernel/debug/tracing/tracing_on
root@tegra-ubuntu:~# echo 1 sudo tee /sys/kernel/debug/tracing/events/asoc/snd_soc_dapm_widget_power/enable 
1 sudo tee /sys/kernel/debug/tracing/events/asoc/snd_soc_dapm_widget_power/enable
root@tegra-ubuntu:~# sudo cat /sys/kernel/debug/tracing/trac
trace            trace_marker     trace_pipe       tracing_on       
trace_clock      trace_options    tracing_cpumask  tracing_thresh   
root@tegra-ubuntu:~# sudo cat /sys/kernel/debug/tracing/trac
trace            trace_marker     trace_pipe       tracing_on       
trace_clock      trace_options    tracing_cpumask  tracing_thresh   
root@tegra-ubuntu:~# sudo cat /sys/kernel/debug/tracing/trace
# tracer: nop
#
# entries-in-buffer/entries-written: 0/0   #P:6
#
#                              _-----=> irqs-off
#                             / _----=> need-resched
#                            | / _---=> hardirq/softirq
#                            || / _--=> preempt-depth
#                            ||| /     delay
#           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
#              | |       |   ||||       |         |
root@tegra-ubuntu:~# echo 0 sudo tee /sys/kernel/debug/tracing/trace
0 sudo tee /sys/kernel/debug/tracing/trace
root@tegra-ubuntu:~# echo 0 sudo tee /sys/kernel/debug/tracing/events/enable 
0 sudo tee /sys/kernel/debug/tracing/events/enable
root@tegra-ubuntu:~# echo 1 sudo tee /sys/kernel/debug/tracing/tracing_on 
1 sudo tee /sys/kernel/debug/tracing/tracing_on
root@tegra-ubuntu:~# echo 1 sudo tee /sys/kernel/debug/tracing/events/asoc/snd_soc_dapm_widget_power/enable 
1 sudo tee /sys/kernel/debug/tracing/events/asoc/snd_soc_dapm_widget_power/enable
root@tegra-ubuntu:~# sudo cat /sys/kernel/debug/tracing/trac
trace            trace_marker     trace_pipe       tracing_on       
trace_clock      trace_options    tracing_cpumask  tracing_thresh   
root@tegra-ubuntu:~# sudo cat /sys/kernel/debug/tracing/trac
trace            trace_marker     trace_pipe       tracing_on       
trace_clock      trace_options    tracing_cpumask  tracing_thresh   
root@tegra-ubuntu:~# sudo cat /sys/kernel/debug/tracing/trace
# tracer: nop
#
# entries-in-buffer/entries-written: 0/0   #P:6
#
#                              _-----=> irqs-off
#                             / _----=> need-resched
#                            | / _---=> hardirq/softirq
#                            || / _--=> preempt-depth
#                            ||| /     delay
#           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
#              | |       |   ||||       |         |
          amixer-1820  [005] ...1  6316.258699: snd_soc_dapm_start: card=tegra-snd-t186ref-mobile-rt565x
          amixer-1820  [005] ...1  6316.258825: snd_soc_dapm_walk_done: tegra-snd-t186ref-mobile-rt565x: checks 0 power, 0 
path, 0 neighbour
          amixer-1820  [005] ...1  6316.259050: snd_soc_dapm_done: card=tegra-snd-t186ref-mobile-rt565x
           aplay-1843  [003] ...1  6316.640119: snd_soc_dapm_start: card=tegra-snd-t186ref-mobile-rt565x
           aplay-1843  [003] ...1  6316.640185: snd_soc_dapm_path: *ADMAIF1 Receive <- (direct) <- Playback 1
           aplay-1843  [003] ...1  6316.640186: snd_soc_dapm_path: *ADMAIF1 Receive <- (direct) <- ADMAIF1 CIF Receive-ADM$
IF1 Receive
           aplay-1843  [003] ...1  6316.640247: snd_soc_dapm_walk_done: tegra-snd-t186ref-mobile-rt565x: checks 2 power, 2 
path, 2 neighbour
           aplay-1843  [003] ...1  6316.640469: snd_soc_dapm_done: card=tegra-snd-t186ref-mobile-rt565x
 alsa-sink-ADMAI-1007  [003] ...1  6347.985025: snd_soc_dapm_start: card=tegra-snd-t186ref-mobile-rt565x
 alsa-sink-ADMAI-1007  [003] ...1  6347.985092: snd_soc_dapm_widget_power: widget=Playback 1 val=1
 alsa-sink-ADMAI-1007  [003] ...1  6347.985092: snd_soc_dapm_widget_power: widget=ADMAIF1 Receive val=1
 alsa-sink-ADMAI-1007  [003] ...1  6347.985094: snd_soc_dapm_path: *ADMAIF1 RX <- (direct) <- ADMAIF1 Receive
 alsa-sink-ADMAI-1007  [003] ...1  6347.985095: snd_soc_dapm_widget_power: widget=ADMAIF1 RX val=1
 alsa-sink-ADMAI-1007  [003] ...1  6347.985107: snd_soc_dapm_path:  I2S1 Mux <- ARAD1 <- ARAD1 RX
 alsa-sink-ADMAI-1007  [003] ...1  6347.985108: snd_soc_dapm_path:  I2S1 Mux <- ADX4-4 <- ADX4-4 RX
 alsa-sink-ADMAI-1007  [003] ...1  6347.985109: snd_soc_dapm_path:  I2S1 Mux <- ADX4-3 <- ADX4-3 RX
 alsa-sink-ADMAI-1007  [003] ...1  6347.985109: snd_soc_dapm_path:  I2S1 Mux <- ADX4-2 <- ADX4-2 RX
 alsa-sink-ADMAI-1007  [003] ...1  6347.985110: snd_soc_dapm_path:  I2S1 Mux <- ADX4-1 <- ADX4-1 RX
 alsa-sink-ADMAI-1007  [003] ...1  6347.985110: snd_soc_dapm_path:  I2S1 Mux <- AMX4 <- AMX4 RX
 alsa-sink-ADMAI-1007  [003] ...1  6347.985111: snd_soc_dapm_path:  I2S1 Mux <- ADX3-4 <- ADX3-4 RX
 alsa-sink-ADMAI-1007  [003] ...1  6347.985111: snd_soc_dapm_path:  I2S1 Mux <- ADX3-3 <- ADX3-3 RX
 alsa-sink-ADMAI-1007  [003] ...1  6347.985111: snd_soc_dapm_path:  I2S1 Mux <- ADX3-2 <- ADX3-2 RX
 alsa-sink-ADMAI-1007  [003] ...1  6347.985112: snd_soc_dapm_path:  I2S1 Mux <- ADX3-1 <- ADX3-1 RX
 alsa-sink-ADMAI-1007  [003] ...1  6347.985112: snd_soc_dapm_path:  I2S1 Mux <- AMX3 <- AMX3 RX
 alsa-sink-ADMAI-1007  [003] ...1  6347.985113: snd_soc_dapm_path:  I2S1 Mux <- ASRC1-6 <- ASRC1-6 RX

trace.log (29.1 KB)

Hello!

Looks like the audio route is still not complete and the I2S interface is not being enabled. Can you run the attached script and send the output file generated?

Thanks
Jon
tegra-audio-debug.sh.txt (383 Bytes)

In the annex
tegra-audio-debug.txt (730 KB)

Can you respond to the above questions so I understand what you are testing and what interface on the codec you are using?

Jon

@jonathanh
Both, including recording and playback
Play contains headphones and speakers

So you want to play to both headphones and speakers at the same time?

Jon

If you can, if it is not easy to achieve,Optional one channel.

How do I need to set it up?

I have referenced https://devtalk.nvidia.com/default/topic/1027508/jetson-tx2/tlv320aic32x4-evaluation-board-with-tx2/9

Am I also a problem with codec mixers?

If so, I have related setup parameters
This is a configuration given by the official

DAC: Mono Playback to AC coupled Headphone output
####################################################### 
# Mono Playback to AC coupled Headphone output #
 # Switch SW1 on AC-COUPLED position #
# DAC connected to headphone output through mixer path #
# Mixer Gain = 0dB; Output amplifier gain = 0dB #
# AC coupled headphone configuration # 
#I2S, 16-bits, fs = 44.1KHz # 
#MCLK = 11.2896MHz; BCLK = 2.8224MHz; WCLK = 44.1KHz # 
####################################################### 
# # Page 0 selected 
w 30 00 00
# # Software Reset
w 30 01 80 
# # fs(ref) setting and DAC data 
w 30 07 8A 
# # DAC unmuted, 0dB gain 
w 30 2B 00 
# # AC-coupling output 
w 30 0E C0 
# # DAC powered up 
w 30 25 80 
# # HPCOM as independent single-ended output 
w 30 26 10 
# # DAC routed to HPOUT output 
w 30 3D 80 
# # HPOUT output powered up, 0dB 
w 30 41 0D 
# # DAC reference current 100% 
w 30 6D C0
DAC: Mono Playback to Line output
#######################################################
# Mono Playback to Line output # 
# DAC connected to line output through mixer path #
# Mixer Gain = 0dB;#
# Output amplifier gain = 0dB # I2S, 16-bits,#
#fs = 44.1KHz # MCLK = 11.2896MHz; BCLK = 2.8224MHz;#
# WCLK = 44.1KHz # 
####################################################### 
# # Page 0 selected 
w 30 00 00 
# # Software Reset 
w 30 01 80 
# # fs(ref) setting and DAC data 
w 30 07 8A 
# # DAC unmuted, 0dB gain 
w 30 2B 00 
# # DAC powered up 
w 30 25 80 
# # DAC routed to LEFT_LOP output 
w 30 52 80 
# # LEFT_LOP output powered up, 0dB 
w 30 56 0D 
# # DAC routed to RIGHT_LOP output 
w 30 59 80 
# # RIGHT_LOP output powered up, 0dB 
w 30 5D 0D 
# # DAC reference current 100% 
w 30 6D C0

I passed the host computer test and found that this configuration can work with both the headphones and the speakers.

DAC		
    - left data to LDAC and right data to RDAC		w 30 07 8A
    - volume control = 0dB		                w 30 29 02
    - Connected to outputs via mixer mode		w 30 2B 00
		                                        w 30 0E C0
High Power Outputs		
    - Single-ended headphone outputs		        w 30 25 E0
    - AC-coupled headphone configuration		w 30 26 10
    - LDAC to HPLOUT		                        w 30 2F 80
    - RDAC to HPRDAC		                        w 30 40 80
    - Mixer gain = 0dB		                        w 30 41 0D
    - Output amplifier gain = 0dB		        w 30 33 0D