@eragefe I had some time today and decided to test my original goal of i2s with the 5.x kernel
Would you have some pointers for me w.t.r simple-card
.
I’ll port of the dummy-codec
over soon, but is there anything else that might also need porting?
# This is with the new Armbian build
# Armbian_20.11_Rockpi-s_buster_current_5.9.10_minimal.img
root@rockpi-s:~# uname -a
Linux rockpi-s 5.9.10-rockchip64 #20.11 SMP PREEMPT Mon Nov 23 13:36:07 CET 2020 aarch64 GNU/Linux
# dmesg
[ 8.818446] rk3308-acodec ff560000.acodec: Don't need hp-ctl gpio
[ 8.818488] rk3308-acodec ff560000.acodec: Don't need spk-ctl gpio
[ 8.818522] rk3308-acodec ff560000.acodec: Don't need pa-drv gpio
[ 8.818529] rk3308-acodec ff560000.acodec: De-pop as much as possible
[ 8.818658] rk3308-acodec ff560000.acodec: Don't need micbias-en gpio
[ 8.818704] rk3308-acodec ff560000.acodec: no vmicbias regulator found
[ 8.818715] rk3308-acodec ff560000.acodec: Check ext_micbias: 0
[ 8.818751] The acodec version is: a
[ 8.888772] asoc-simple-card acodec-sound: ASoC: no DMI vendor name!
[ 8.901359] asoc-simple-card sound_i2s: ASoC: no DMI vendor name!
[ 8.907407] rockchip-i2s-tdm ff300000.i2s: Trying to bind component to card "i2s_8ch_0" but is already bound to card "SimpleDAC"
[ 8.907426] asoc-simple-card sound: ASoC: failed to instantiate card -19
And here is the overlay file.
root@rockpi-s:~# cat /boot/overlay-user/simple_card.dts
// Definitions for DummyDAC
/dts-v1/;
/plugin/;
/ {
compatible = "radxa,rockpis", "rockchip,rk3308";
fragment@0 {
target = <&i2s_8ch_0>;
__overlay__ {
#sound-dai-cells = <0>;
status = "okay";
};
};
fragment@1 {
target-path = "/";
__overlay__ {
i2s0_out: i2s0-out {
#sound-dai-cells = <0>;
compatible = "ti,pcm5102a";
status = "okay";
};
sound_i2s {
simple-audio-card,name = "SimpleDAC";
compatible = "simple-audio-card";
simple-audio-card,format = "i2s";
simple-audio-card,bitclock-master = <&cpu_dai>;
simple-audio-card,frame-master = <&cpu_dai>;
simple-audio-card,mclk-fs = <256>;
status = "okay";
cpu_dai: simple-audio-card,cpu {
sound-dai = <&i2s_8ch_0>;
};
codec_dai: simple-audio-card,codec {
sound-dai = <&i2s0_out>;
};
};
};
};
};
The cards register, even though dmesg
show signs of impending trouble…
root@rockpi-s:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: rockchiprk3308a [rockchip,rk3308-acodec], device 0: ff320000.i2s-rk3308-hifi rk3308-hifi-0 [ff320000.i2s-rk3308-hifi rk3308-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: SimpleDAC [SimpleDAC], device 0: ff300000.i2s-pcm5102a-hifi pcm5102a-hifi-0 [ff300000.i2s-pcm5102a-hifi pcm5102a-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
# speaker-test leads to a nice kernel panic
[ 475.652740] Internal error: Oops: 96000004 [#1] PREEMPT SMP
[ 475.653255] Modules linked in: 8723ds cfg80211 rfkill zstd snd_soc_pcm5102a snd_soc_rk3308 snd_soc_simple_card snd_soc_rockchip_i2s_tdm snd_soc_simple_card_utils snd_soc_core snd_pcm_dmaengine snd_pcm snd_timer snd soundcore cpufreq_dt zram ip_tables x_tables autofs4 realtek dwmac_rk stmmac_platform stmmac mdio_xpcs
[ 475.655832] CPU: 2 PID: 1935 Comm: speaker-test Not tainted 5.9.10-rockchip64 #20.11
[ 475.656522] Hardware name: Radxa ROCK Pi S (DT)
[ 475.656943] pstate: a0000005 (NzCv daif -PAN -UAO BTYPE=--)
[ 475.657614] pc : dapm_update_dai_unlocked.isra.0+0x40/0x108 [snd_soc_core]
[ 475.658369] lr : snd_soc_dapm_update_dai+0x40/0x68 [snd_soc_core]
[ 475.658917] sp : ffff8000130bba10
[ 475.659225] x29: ffff8000130bba10 x28: ffff0000161b0000
[ 475.659717] x27: ffff0000133e4d1c x26: 0000000000000000
[ 475.660206] x25: ffff0000133e4c24 x24: ffff0000161b0000
[ 475.660695] x23: ffff0000133e4c00 x22: ffff0000128c8cd8
[ 475.661184] x21: ffff0000128c8c00 x20: 0000000000000002
[ 475.661673] x19: ffffffffffffffd8 x18: 0000000000000000
[ 475.662160] x17: 0000000000000000 x16: 0000000000000000
[ 475.662647] x15: 0000000000000000 x14: 0000000000000000
[ 475.663137] x13: 0000000000000000 x12: 0000000000000001
[ 475.663625] x11: 0000000000000004 x10: 0101010101010101
[ 475.664114] x9 : 0000000000000001 x8 : 7f7f7f7f7f7f7f7f
[ 475.664603] x7 : 0000000000000000 x6 : 0000000000000000
[ 475.665091] x5 : 0000000000000000 x4 : 0000000000000000
[ 475.665579] x3 : ffff0000163d7148 x2 : ffff000014046480
[ 475.666067] x1 : ffff0000133e4c00 x0 : 0000000000000000
[ 475.666557] Call trace:
[ 475.666930] dapm_update_dai_unlocked.isra.0+0x40/0x108 [snd_soc_core]
[ 475.667647] snd_soc_dapm_update_dai+0x40/0x68 [snd_soc_core]
[ 475.668300] soc_pcm_hw_params+0x32c/0x5a8 [snd_soc_core]
[ 475.668864] snd_pcm_hw_params+0xf0/0x400 [snd_pcm]
[ 475.669371] snd_pcm_common_ioctl+0x2d8/0x1078 [snd_pcm]
[ 475.669914] snd_pcm_ioctl+0x30/0x48 [snd_pcm]
[ 475.670337] __arm64_sys_ioctl+0xa8/0xf0
[ 475.670710] el0_svc_common.constprop.0+0x70/0x188
[ 475.671154] do_el0_svc+0x24/0x90
[ 475.671471] el0_sync_handler+0x90/0x198
[ 475.671835] el0_sync+0x158/0x180
[ 475.672168] Code: f84d8ed3 eb1302df d100a273 540001a0 (f9400a61)
[ 475.672726] ---[ end trace a07ab07415ed41c6 ]---
Is it not possible to have both the Audio jack and the I2S output active at the same time? If I read your 8ch_simple_card
seems to disable the i2s_8ch_2
node that the audio codec maps to?
EDIT: The 8ch_simple_card also has a similar kernel panic when trying speaker-test -c2
…