RockPi S + CS42448 I2S/I2C DAC setup


Tried both branches: stable-4.4-rockpis, linux-6.1-stan-rkr1

For linux-6.1 it’s here:

For stable-4.4-rockpis message is less verbose, just:

[   78.877368] rockchip-i2s-tdm ff300000.i2s: Set mclk_rx: clk_i2s0_8ch_rx freq: 0 failed: -22
[   78.877417] rockchip-i2s-tdm ff300000.i2s: ASoC: can't set ff300000.i2s hw params: -22

and it’s in sound/soc/rockchip/rockchip_i2s_tdm.c

Very good. Apparently google does not have indexed all kernel versions :slight_smile:

Now that dump_stack() command should (hopefully) show which set_rate call in rockchip_i2s_tdm.c is doing this.

If you are already using 6.1, you may want to look at this patch which was crucial for me (I had my own but this one looks better) https://lore.kernel.org/all/20240221-rk3308-audio-codec-v3-1-dfa34abfcef6@bootlin.com/ . The current mainlined rockchip_i2s_tdm.c is very buggy https://lore.kernel.org/linux-arm-kernel/20240221-rk3308-audio-codec-v3-7-dfa34abfcef6@bootlin.com/T/#m6394df5f853fd62d100fb0c7c9756a87c921585a

dump stack:

[   92.253523] clk_i2s0_8ch_rx_frac p_rate(49152000), rate(0), maybe invalid frequency setting!
[   92.253572] CPU: 3 PID: 1252 Comm: arecord Not tainted 6.1.43+ #8
[   92.253593] Hardware name: Radxa ROCK Pi S (DT)
[   92.253604] Call trace:
[   92.253615]  dump_backtrace.part.5+0x98/0xc0
[   92.253653]  show_stack+0x14/0x28
[   92.253674]  dump_stack_lvl+0x68/0x80
[   92.253694]  dump_stack+0x14/0x2c
[   92.253711]  rockchip_fractional_approximation+0x48/0x164
[   92.253737]  clk_fd_round_rate+0x4c/0x94
[   92.253756]  clk_composite_round_rate+0x2c/0x34
[   92.253777]  clk_core_determine_round_nolock+0xb0/0xc8
[   92.253802]  clk_core_round_rate_nolock+0x60/0xcc
[   92.253825]  clk_mux_determine_rate_flags+0x128/0x1a8
[   92.253848]  clk_mux_determine_rate+0x10/0x18
[   92.253867]  clk_core_determine_round_nolock+0x8c/0xc8
[   92.253888]  clk_core_round_rate_nolock+0x60/0xcc
[   92.253912]  clk_mux_determine_rate_flags+0x128/0x1a8
[   92.253935]  clk_mux_determine_rate+0x10/0x18
[   92.253955]  clk_composite_determine_rate+0x214/0x234
[   92.253975]  clk_core_determine_round_nolock+0x8c/0xc8
[   92.253998]  clk_core_round_rate_nolock+0x60/0xcc
[   92.254021]  clk_core_set_rate_nolock+0x100/0x158
[   92.254038]  clk_set_rate+0x38/0x68
[   92.254054]  rockchip_i2s_tdm_hw_params+0x30c/0x848
[   92.254078]  snd_soc_dai_hw_params+0x8c/0x94
[   92.254099]  __soc_pcm_hw_params+0x390/0x434
[   92.254120]  soc_pcm_hw_params+0x34/0x54
[   92.254142]  snd_pcm_hw_params+0x308/0x338
[   92.254163]  snd_pcm_common_ioctl+0x4f4/0xd08
[   92.254183]  snd_pcm_ioctl+0x28/0x3c
[   92.254201]  vfs_ioctl+0x24/0x40
[   92.254227]  __arm64_sys_ioctl+0x5c/0x8c
[   92.254249]  invoke_syscall+0x68/0xe8
[   92.254270]  el0_svc_common.constprop.3+0xa8/0xd4
[   92.254292]  do_el0_svc+0x18/0x20
[   92.254312]  el0_svc+0x14/0x3c
[   92.254328]  el0t_64_sync_handler+0x64/0x140
[   92.254347]  el0t_64_sync+0x148/0x14c
[   92.254540] clk_i2s0_8ch_tx_frac p_rate(50176000), rate(0), maybe invalid frequency setting!
[   92.254560] CPU: 3 PID: 1252 Comm: arecord Not tainted 6.1.43+ #8
[   92.254580] Hardware name: Radxa ROCK Pi S (DT)
[   92.254592] Call trace:
[   92.254599]  dump_backtrace.part.5+0x98/0xc0
[   92.254624]  show_stack+0x14/0x28
[   92.254645]  dump_stack_lvl+0x68/0x80
[   92.254661]  dump_stack+0x14/0x2c
[   92.254677]  rockchip_fractional_approximation+0x48/0x164
[   92.254701]  clk_fd_round_rate+0x4c/0x94
[   92.254722]  clk_composite_round_rate+0x2c/0x34
[   92.254742]  clk_core_determine_round_nolock+0xb0/0xc8
[   92.254764]  clk_core_round_rate_nolock+0x60/0xcc
[   92.254786]  clk_mux_determine_rate_flags+0x128/0x1a8
[   92.254811]  clk_mux_determine_rate+0x10/0x18
[   92.254828]  clk_core_determine_round_nolock+0x8c/0xc8
[   92.254850]  clk_core_round_rate_nolock+0x60/0xcc
[   92.254871]  clk_mux_determine_rate_flags+0x128/0x1a8
[   92.254896]  clk_mux_determine_rate+0x10/0x18
[   92.254915]  clk_composite_determine_rate+0x214/0x234
[   92.254936]  clk_core_determine_round_nolock+0x8c/0xc8
[   92.254957]  clk_core_round_rate_nolock+0x60/0xcc
[   92.254980]  clk_core_set_rate_nolock+0x100/0x158
[   92.254995]  clk_set_rate+0x38/0x68
[   92.255012]  rockchip_i2s_tdm_hw_params+0x30c/0x848
[   92.255032]  snd_soc_dai_hw_params+0x8c/0x94
[   92.255053]  __soc_pcm_hw_params+0x390/0x434
[   92.255076]  soc_pcm_hw_params+0x34/0x54
[   92.255099]  snd_pcm_hw_params+0x308/0x338
[   92.255119]  snd_pcm_common_ioctl+0x4f4/0xd08
[   92.255139]  snd_pcm_ioctl+0x28/0x3c
[   92.255157]  vfs_ioctl+0x24/0x40
[   92.255179]  __arm64_sys_ioctl+0x5c/0x8c
[   92.255201]  invoke_syscall+0x68/0xe8
[   92.255223]  el0_svc_common.constprop.3+0xa8/0xd4
[   92.255244]  do_el0_svc+0x18/0x20
[   92.255265]  el0_svc+0x14/0x3c
[   92.255280]  el0t_64_sync_handler+0x64/0x140
[   92.255299]  el0t_64_sync+0x148/0x14c
[   92.255367] clk_i2s0_8ch_rx_frac p_rate(49152000), rate(0), maybe invalid frequency setting!
[   92.255382] CPU: 3 PID: 1252 Comm: arecord Not tainted 6.1.43+ #8
[   92.255399] Hardware name: Radxa ROCK Pi S (DT)
[   92.255411] Call trace:
[   92.255419]  dump_backtrace.part.5+0x98/0xc0
[   92.255443]  show_stack+0x14/0x28
[   92.255462]  dump_stack_lvl+0x68/0x80
[   92.255478]  dump_stack+0x14/0x2c
[   92.255495]  rockchip_fractional_approximation+0x48/0x164
[   92.255515]  clk_fd_round_rate+0x4c/0x94
[   92.255533]  clk_composite_round_rate+0x2c/0x34
[   92.255554]  clk_core_determine_round_nolock+0xb0/0xc8
[   92.255576]  clk_core_round_rate_nolock+0x60/0xcc
[   92.255599]  clk_mux_determine_rate_flags+0x128/0x1a8
[   92.255622]  clk_mux_determine_rate+0x10/0x18
[   92.255643]  clk_core_determine_round_nolock+0x8c/0xc8
[   92.255664]  clk_core_round_rate_nolock+0x60/0xcc
[   92.255688]  clk_mux_determine_rate_flags+0x128/0x1a8
[   92.255710]  clk_mux_determine_rate+0x10/0x18
[   92.255731]  clk_composite_determine_rate+0x214/0x234
[   92.255751]  clk_core_determine_round_nolock+0x8c/0xc8
[   92.255774]  clk_calc_new_rates+0x9c/0x1ac
[   92.255795]  clk_core_set_rate_nolock+0x9c/0x158
[   92.255812]  clk_set_rate+0x38/0x68
[   92.255828]  rockchip_i2s_tdm_hw_params+0x30c/0x848
[   92.255849]  snd_soc_dai_hw_params+0x8c/0x94
[   92.255870]  __soc_pcm_hw_params+0x390/0x434
[   92.255894]  soc_pcm_hw_params+0x34/0x54
[   92.255915]  snd_pcm_hw_params+0x308/0x338
[   92.255937]  snd_pcm_common_ioctl+0x4f4/0xd08
[   92.255957]  snd_pcm_ioctl+0x28/0x3c
[   92.255977]  vfs_ioctl+0x24/0x40
[   92.255998]  __arm64_sys_ioctl+0x5c/0x8c
[   92.256020]  invoke_syscall+0x68/0xe8
[   92.256039]  el0_svc_common.constprop.3+0xa8/0xd4
[   92.256061]  do_el0_svc+0x18/0x20
[   92.256081]  el0_svc+0x14/0x3c
[   92.256098]  el0t_64_sync_handler+0x64/0x140
[   92.256117]  el0t_64_sync+0x148/0x14c
[   92.256212] clk_i2s0_8ch_tx_frac p_rate(50176000), rate(0), maybe invalid frequency setting!
[   92.256230] CPU: 3 PID: 1252 Comm: arecord Not tainted 6.1.43+ #8
[   92.256249] Hardware name: Radxa ROCK Pi S (DT)
[   92.256259] Call trace:
[   92.256266]  dump_backtrace.part.5+0x98/0xc0
[   92.256291]  show_stack+0x14/0x28
[   92.256311]  dump_stack_lvl+0x68/0x80
[   92.256327]  dump_stack+0x14/0x2c
[   92.256342]  rockchip_fractional_approximation+0x48/0x164
[   92.256364]  clk_fd_round_rate+0x4c/0x94
[   92.256382]  clk_composite_round_rate+0x2c/0x34
[   92.256401]  clk_core_determine_round_nolock+0xb0/0xc8
[   92.256425]  clk_core_round_rate_nolock+0x60/0xcc
[   92.256448]  clk_mux_determine_rate_flags+0x128/0x1a8
[   92.256470]  clk_mux_determine_rate+0x10/0x18
[   92.256488]  clk_core_determine_round_nolock+0x8c/0xc8
[   92.256508]  clk_core_round_rate_nolock+0x60/0xcc
[   92.256530]  clk_mux_determine_rate_flags+0x128/0x1a8
[   92.256552]  clk_mux_determine_rate+0x10/0x18
[   92.256573]  clk_composite_determine_rate+0x214/0x234
[   92.256593]  clk_core_determine_round_nolock+0x8c/0xc8
[   92.256615]  clk_calc_new_rates+0x9c/0x1ac
[   92.256636]  clk_core_set_rate_nolock+0x9c/0x158
[   92.256651]  clk_set_rate+0x38/0x68
[   92.256666]  rockchip_i2s_tdm_hw_params+0x30c/0x848
[   92.256684]  snd_soc_dai_hw_params+0x8c/0x94
[   92.256704]  __soc_pcm_hw_params+0x390/0x434
[   92.256726]  soc_pcm_hw_params+0x34/0x54
[   92.256748]  snd_pcm_hw_params+0x308/0x338
[   92.256767]  snd_pcm_common_ioctl+0x4f4/0xd08
[   92.256787]  snd_pcm_ioctl+0x28/0x3c
[   92.256805]  vfs_ioctl+0x24/0x40
[   92.256825]  __arm64_sys_ioctl+0x5c/0x8c
[   92.256846]  invoke_syscall+0x68/0xe8
[   92.256865]  el0_svc_common.constprop.3+0xa8/0xd4
[   92.256887]  do_el0_svc+0x18/0x20
[   92.256909]  el0_svc+0x14/0x3c
[   92.256927]  el0t_64_sync_handler+0x64/0x140
[   92.256947]  el0t_64_sync+0x148/0x14c
[   92.257037] rockchip-i2s-tdm ff300000.i2s: ASoC: error at snd_soc_dai_hw_params on ff300000.i2s: -22
[   92.257096]  ff300000.i2s-dummy_codec: ASoC: error at __soc_pcm_hw_params on ff300000.i2s-dummy_codec: -22

Regarding tdm patch - it doesn’t apply against 6.1 unfortunately:

# patch -p1 --dry-run < tdm.patch
checking file sound/soc/rockchip/rockchip_i2s_tdm.c
Hunk #1 FAILED at 25.
Hunk #2 succeeded at 97 (offset 44 lines).
Hunk #3 FAILED at 62.
Hunk #4 succeeded at 180 (offset 80 lines).
Hunk #5 FAILED at 122.
Hunk #6 FAILED at 544.
Hunk #7 FAILED at 833.
Hunk #8 FAILED at 953.
Hunk #9 FAILED at 1052.
Hunk #10 succeeded at 2241 with fuzz 2 (offset 1146 lines).
Hunk #11 succeeded at 2602 (offset 1179 lines).
Hunk #12 succeeded at 2902 (offset 1342 lines).
Hunk #13 FAILED at 1612.
8 out of 13 hunks FAILED
checking file sound/soc/rockchip/rockchip_i2s_tdm.c
Hunk #1 FAILED at 25.
Hunk #2 succeeded at 97 (offset 44 lines).
Hunk #3 FAILED at 62.
Hunk #4 succeeded at 180 (offset 80 lines).
Hunk #5 FAILED at 122.
Hunk #6 FAILED at 544.
Hunk #7 FAILED at 833.
Hunk #8 FAILED at 953.
Hunk #9 FAILED at 1052.
Hunk #10 succeeded at 2241 with fuzz 2 (offset 1146 lines).
Hunk #11 succeeded at 2602 (offset 1179 lines).
Hunk #12 succeeded at 2902 (offset 1342 lines).
Hunk #13 FAILED at 1612.
8 out of 13 hunks FAILED
checking file sound/soc/rockchip/rockchip_i2s_tdm.c
Hunk #1 FAILED at 25.
Hunk #2 succeeded at 97 (offset 44 lines).
Hunk #3 FAILED at 62.
Hunk #4 succeeded at 180 (offset 80 lines).
Hunk #5 FAILED at 122.
Hunk #6 FAILED at 544.
Hunk #7 FAILED at 833.
Hunk #8 FAILED at 953.
Hunk #9 FAILED at 1052.
Hunk #10 succeeded at 2241 with fuzz 2 (offset 1146 lines).
Hunk #11 succeeded at 2602 (offset 1179 lines).
Hunk #12 succeeded at 2902 (offset 1342 lines).
Hunk #13 FAILED at 1612.
8 out of 13 hunks FAILED

btw, adding system-clock-frequency = <49152000>; to cpu and codec dai eliminates dmesg error regarding clocks, just gives snd_pcm_open error: Invalid argument without any dmesg output.

I do not know what exactly system-clock-frequency does and whether it is safe in this context. The yaml description talks about fixed mclk.

This is my dts for i2s:

i2s_8ch_0: i2s@ff300000 {
    compatible = "rockchip,rk3308-i2s-tdm";
    reg = <0x0 0xff300000 0x0 0x1000>;
    interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
    clocks = <&cru SCLK_I2S0_8CH_TX>, <&cru SCLK_I2S0_8CH_RX>, <&cru HCLK_I2S0_8CH>,
        <&cru SCLK_I2S0_8CH_TX_SRC>,
        <&cru SCLK_I2S0_8CH_RX_SRC>,
        <&cru PLL_VPLL0>,
        <&cru PLL_VPLL1>;
    clock-names = "mclk_tx", "mclk_rx", "hclk",
             "mclk_tx_src", "mclk_rx_src",
             "mclk_root0", "mclk_root1";
    dmas = <&dmac1 0>, <&dmac1 1>;
    dma-names = "tx", "rx";
    resets = <&cru SRST_I2S0_8CH_TX_M>, <&cru SRST_I2S0_8CH_RX_M>;
    reset-names = "tx-m", "rx-m";
    rockchip,cru = <&cru>;
    rockchip,grf = <&grf>;
    //rockchip,mclk-calibrate;
    rockchip,trcm-sync-tx-only;
    pinctrl-names = "default";
    pinctrl-0 = <&i2s_8ch_0_sclktx
            &i2s_8ch_0_sclkrx
            &i2s_8ch_0_lrcktx
            &i2s_8ch_0_lrckrx
            &i2s_8ch_0_sdi0
            &i2s_8ch_0_sdi1
            &i2s_8ch_0_sdi2
            &i2s_8ch_0_sdi3
            &i2s_8ch_0_sdo0
            &i2s_8ch_0_sdo1
            &i2s_8ch_0_sdo2
            &i2s_8ch_0_sdo3
            &i2s_8ch_0_mclk>;
    status = "ok";
};

Does the alsa device still exist, is it created?

Does the playback device run OK?

Yep, device is there

#0: Loopback 1
#1: multi-ch-card

Playback seems ok, gives no errors at least

I would suggest to try adding the config rockchip,trcm-sync-tx-only;. IIUC it internally connects clock tx to clock rx and makes the two interfaces synchronously running. I remember I was hitting the same error when trying to find a working config, but do not remember exactly if it was this one. This config should already work in 6.1

That was the culprit indeed.
Spectrogram 96kHz:


192kHz:

Hm, that looks pretty clean. Please can you make the two spectrograms of e.g. 10 minutes too?

I wonder why my spectrogram at 192kHz is basically totally broken and I never get a clean 96kHz loopback either. Please can you post:

Your whole DTS tree:

dtc -I fs /sys/firmware/devicetree/base

Your clock tree while running playback and capture /sys/kernel/debug/clk/clk_summary

What cpu freq governor do you use?

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

What extra patches to the kernel have you applied?

How did you get your 6.1 kernel? Maybe there is some issue introduced between your 6.1 and my 6.6, maybe your 6.1 source has some extra patches required for RK3308.

Thanks a lot!!

192kHz:


clk_summary:
clk.zip (2.2 KB)

96kHz:


clk_summary:
clk96.zip (2.2 KB)

dts:
dts.zip (14.0 KB)

governor:

# cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
cat: can't open '/sys/devices/system/cpu/cpu*/cpufreq/scaling_governor': No such file or directory

How did you get your 6.1 kernel? Maybe there is some issue introduced between your 6.1 and my 6.6, maybe your 6.1 source has some extra patches required for RK3308.

I posted link above with the branch name. It’s radxa kernel. I did not apply any patches personally.

Thanks a lot. I will play with your configs/kernel etc. to try fixing my issues and let you know my results.

A few questions please, to check for possible HW differences.

Do you have RK3308B or the newer RK3308B-S (should be written on the SoC, IIUC). I have RK3308B.

How do you power your Pi-S?

You have a heatsink on your Pi-S SoC. Mine runs hardly warm even when stressing all cores to max. Does your SoC run hot without the heatsink?

Thanks a lot!

Hm, I built the 6.1 kernel using bsp stable, but IIUC that does not build https://github.com/radxa/kernel/tree/linux-6.1-stan-rkr1 , but mainline with some patches included in bsp

BSP_GIT="https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux.git"
BSP_TAG="v6.1.68"

I get even worse results than on 6.6.

The radxa kernel linux-6.1-stan-rkr1 is likely very different. Please how did you build your kernel, what .config did you use?

I am sorry for bothering you, but this situation bugs me too. Kind of looks like a mess in the radxa kernel projects.

Thanks a lot,

Pavel

I have RK3308B SoC, v1.3 board produced in 20190910. Powered up from an USB3 port at the moment. Heatsink is for ‘just in case’ reason, SoC does not become that hot in real.

I’m crosscompiling it with ‘gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu’ toolchain.
My defconfig:

CONFIG_DTC_SYMBOLS=y
CONFIG_WERROR=y
CONFIG_DEFAULT_HOSTNAME="localhost"
CONFIG_SYSVIPC=y
CONFIG_FHANDLE=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_PREEMPT=y
CONFIG_LOG_BUF_SHIFT=18
CONFIG_CGROUPS=y
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_PIDS=y
CONFIG_CGROUP_DEVICE=y
CONFIG_CPUSETS=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_MEMCG=y
CONFIG_MEMCG_KMEM=y
CONFIG_CGROUP_PERF=y
CONFIG_CGROUP_SCHED=y
CONFIG_CFS_BANDWIDTH=y
CONFIG_RT_GROUP_SCHED=y
CONFIG_BLK_CGROUP=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_EMBEDDED=y
CONFIG_PROFILING=y
CONFIG_ARCH_ROCKCHIP=y
CONFIG_SCHED_MC=y
CONFIG_NR_CPUS=4
CONFIG_HZ_1000=y
CONFIG_COMPAT=y
CONFIG_PM_DEBUG=y
CONFIG_PM_ADVANCED_DEBUG=y
CONFIG_WQ_POWER_EFFICIENT_DEFAULT=y
CONFIG_ENERGY_MODEL=y
CONFIG_CPU_IDLE=y
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPUFREQ_DT=y
CONFIG_ARM_ROCKCHIP_CPUFREQ=y
CONFIG_JUMP_LABEL=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_PARTITION_ADVANCED=y
CONFIG_DEFAULT_MMAP_MIN_ADDR=32768
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_NET_KEY=y
CONFIG_INET=y
CONFIG_SYN_COOKIES=y
CONFIG_BT=y
CONFIG_BT_RFCOMM=y
CONFIG_BT_RFCOMM_TTY=y
CONFIG_BT_HIDP=y
CONFIG_BT_HCIUART=y
CONFIG_BT_HCIUART_H4=y
CONFIG_BT_RTL=y
CONFIG_RFKILL=y
CONFIG_RFKILL_RK=y
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_ROCKCHIP_SIP=y
CONFIG_NETDEVICES=y
CONFIG_STMMAC_ETH=y
CONFIG_REALTEK_PHY=y
CONFIG_WL_ROCKCHIP=y
CONFIG_WIFI_BUILD_MODULE=y
CONFIG_WIFI_LOAD_DRIVER_WHEN_KERNEL_BOOTUP=y
CONFIG_RTL8723DS=y
CONFIG_INPUT_EVDEV=y
CONFIG_KEYBOARD_ADC=y
CONFIG_KEYBOARD_GPIO=y
CONFIG_INPUT_MISC=y
CONFIG_INPUT_GPIO_ROTARY_ENCODER=y
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_NR_UARTS=5
CONFIG_SERIAL_8250_RUNTIME_UARTS=5
CONFIG_SERIAL_8250_DW=y
CONFIG_HW_RANDOM=y
CONFIG_HW_RANDOM_ROCKCHIP=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_MUX=y
CONFIG_I2C_RK3X=y
CONFIG_SPI=y
CONFIG_SPI_ROCKCHIP=y
CONFIG_SPI_SPIDEV=y
CONFIG_GPIO_SYSFS=y
CONFIG_SYSCON_REBOOT_MODE=y
CONFIG_BATTERY_RK816=y
CONFIG_POWER_AVS=y
CONFIG_THERMAL=y
CONFIG_THERMAL_WRITABLE_TRIPS=y
CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR=y
CONFIG_THERMAL_GOV_USER_SPACE=y
CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y
CONFIG_CPU_THERMAL=y
CONFIG_DEVFREQ_THERMAL=y
CONFIG_ROCKCHIP_THERMAL=y
CONFIG_WATCHDOG=y
CONFIG_DW_WATCHDOG=y
CONFIG_MFD_RK808=y
CONFIG_REGULATOR=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
CONFIG_REGULATOR_GPIO=y
CONFIG_REGULATOR_PWM=y
CONFIG_REGULATOR_RK808=y
CONFIG_DRM=y
CONFIG_DRM_IGNORE_IOTCL_PERMIT=y
CONFIG_DRM_ROCKCHIP=y
CONFIG_DRM_PANEL_SIMPLE=y
CONFIG_BACKLIGHT_PWM=y
CONFIG_SOUND=y
CONFIG_SND=y
CONFIG_SND_HRTIMER=y
CONFIG_SND_ALOOP=y
CONFIG_SND_SOC=y
CONFIG_SND_SOC_ROCKCHIP=y
CONFIG_SND_SOC_ROCKCHIP_I2S=y
CONFIG_SND_SOC_ROCKCHIP_I2S_TDM=y
CONFIG_SND_SOC_ROCKCHIP_MULTI_DAIS=y
CONFIG_SND_SOC_ROCKCHIP_PDM=y
CONFIG_SND_SOC_ROCKCHIP_SPDIF=y
CONFIG_SND_SOC_ROCKCHIP_SPDIFRX=y
CONFIG_SND_SOC_ROCKCHIP_VAD=y
CONFIG_SND_SOC_ROCKCHIP_MULTICODECS=y
CONFIG_SND_SOC_DUMMY_CODEC=y
CONFIG_SND_SOC_RK3308=y
CONFIG_SND_SOC_TAS571X=y
CONFIG_SND_SIMPLE_CARD=y
CONFIG_SND_SOC_CS42XX8_I2C=y
CONFIG_USB_DWC2=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DEBUG_FILES=y
CONFIG_USB_GADGET_VBUS_DRAW=500
CONFIG_USB_CONFIGFS=y
CONFIG_USB_CONFIGFS_UEVENT=y
CONFIG_USB_CONFIGFS_F_FS=y
CONFIG_MMC=y
CONFIG_MMC_BLOCK_MINORS=32
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y
CONFIG_LEDS_GPIO=y
CONFIG_LEDS_IS31FL32XX=y
CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_TIMER=y
CONFIG_LEDS_TRIGGER_ONESHOT=y
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
CONFIG_LEDS_TRIGGER_MULTI_CTRL=y

CONFIG_I2C_GPIO=y
CONFIG_IR_GPIO_CIR=y
CONFIG_POWER_RESET_GPIO=y

CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_RK808=y
CONFIG_RTC_DRV_RK_TIMER=y
CONFIG_DMADEVICES=y
CONFIG_PL330_DMA=y
CONFIG_STAGING=y
CONFIG_COMMON_CLK_RK808=y
CONFIG_RPMSG_ROCKCHIP_SOFTIRQ=y
CONFIG_RPMSG_VIRTIO=y
CONFIG_CPU_RK3308=y
CONFIG_ROCKCHIP_AMP=y
CONFIG_ROCKCHIP_CPUINFO=y
CONFIG_ROCKCHIP_GRF=y
CONFIG_ROCKCHIP_IODOMAIN=y
CONFIG_ROCKCHIP_PM_DOMAINS=y
CONFIG_ROCKCHIP_PVTM=y
CONFIG_ROCKCHIP_SUSPEND_MODE=y
CONFIG_FIQ_DEBUGGER=y
CONFIG_FIQ_DEBUGGER_NO_SLEEP=y
CONFIG_FIQ_DEBUGGER_CONSOLE=y
CONFIG_FIQ_DEBUGGER_CONSOLE_DEFAULT_ENABLE=y
CONFIG_FIQ_DEBUGGER_TRUST_ZONE=y
CONFIG_RK_CONSOLE_THREAD=y
CONFIG_PM_DEVFREQ=y
CONFIG_DEVFREQ_GOV_USERSPACE=y
CONFIG_ARM_ROCKCHIP_DMC_DEVFREQ=y
CONFIG_DEVFREQ_EVENT_ROCKCHIP_NOCP=y
CONFIG_EXTCON=y
CONFIG_IIO=y
CONFIG_ROCKCHIP_SARADC=y
CONFIG_PWM=y
CONFIG_PWM_ROCKCHIP=y
CONFIG_PHY_ROCKCHIP_INNO_USB2=y
CONFIG_NVMEM_ROCKCHIP_OTP=y
CONFIG_EXT2_FS=y
CONFIG_EXT4_FS=y
CONFIG_F2FS_FS=y
CONFIG_F2FS_FS_XATTR=y
CONFIG_F2FS_FS_POSIX_ACL=y
CONFIG_VFAT_FS=y
CONFIG_TMPFS=y
CONFIG_SQUASHFS=y
CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
CONFIG_SQUASHFS_4K_DEVBLK_SIZE=y
CONFIG_PSTORE=y
CONFIG_PSTORE_CONSOLE=y
CONFIG_PSTORE_RAM=y
CONFIG_CRYPTO_CRC32C=y
CONFIG_CRYPTO_GHASH_ARM64_CE=y
CONFIG_CRYPTO_SHA1_ARM64_CE=y
CONFIG_CRYPTO_SHA2_ARM64_CE=y
CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y
CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
CONFIG_PRINTK_TIME=y
CONFIG_PRINTK_TIME_FROM_ARM_ARCH_TIMER=y
CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
CONFIG_DEBUG_INFO_REDUCED=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0
CONFIG_DEBUG_FS=y
CONFIG_PANIC_ON_OOPS=y
CONFIG_PANIC_TIMEOUT=1
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
CONFIG_HARDLOCKUP_DETECTOR=y
CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=y
CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y
CONFIG_RCU_CPU_STALL_TIMEOUT=60

Thanks a lot, that’s the same as mine.

Thanks, I will test and report. Actually, how did you create your defconfig, did you write it manually or is it from somewhere? Thanks!

Default ‘rk3308_linux_defconfig’ tailored for my needs.

Thanks a lot. Now this is THE major difference - your kernel + defconfig have no issues even at 192kHz/8ch loopback:

There must be something seriously broken in the mainline for RK3308. I wonder what that kernel repo is - is it android 14 6.1 kernel + radxa patches?

I think mainline kernel was your troublemaker. With radxa kernel it works with 4.x and 6.x versions for me so I guess some radxa patches do the trick.