我正在尝试让我的 TAS2505 音频芯片与我的 arm64 Linux 系统(IMX8MM)一起工作。
它被检测为音频设备,但是当我尝试播放任何类型的音频时,我会遇到内核恐慌。
消息:
[ 0.594275] of_get_named_gpiod_flags: parsed 'reset-gpios' property of node '/soc@0/bus@30800000/i2c@30a50000/tlv320aic32x4-hifi@18[0]' - status (0)
[ 0.594333] tlv320aic32x4 2-0018: Looking up ldoin-supply from device tree
[ 0.594343] tlv320aic32x4 2-0018: Looking up ldoin-supply property in node /soc@0/bus@30800000/i2c@30a50000/tlv320aic32x4-hifi@18 failed
[ 0.594380] tlv320aic32x4 2-0018: Looking up iov-supply from device tree
[ 0.594501] tlv320aic32x4 2-0018: Looking up dv-supply from device tree
[ 0.594613] tlv320aic32x4 2-0018: Looking up av-supply from device tree
[ 1.163560] ALSA device list:
[ 1.163567] #0: tas2505-hifi
aplay -vv /home/test.wav
Playing WAVE '/home/test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
Plug PCM: Hardware PCM card 0 'tas2505-hifi' device 0 subdevice 0
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 24000
period_size : 6000
period_time : 125000
tstamp_mode : NONE
tstamp_type : MONOTONIC
period_step : 1
avail_min : 6000
period_event : 0
start_threshold : 24000
stop_threshold : 24000
silence_threshold: 0
silence_size : 0
boundary : 6755399441055744000
appl_ptr : 0
hw_ptr : 0
#################################### + | 75%
调试控制台给出了这个:
[ 122.210201] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
[ 122.218990] Mem abort info:
[ 122.221782] ESR = 0x96000044
[ 122.224835] EC = 0x25: DABT (current EL), IL = 32 bits
[ 122.230147] SET = 0, FnV = 0
[ 122.233200] EA = 0, S1PTW = 0
[ 122.236340] FSC = 0x04: level 0 translation fault
[ 122.241216] Data abort info:
[ 122.244094] ISV = 0, ISS = 0x00000044
[ 122.247928] CM = 0, WnR = 1
[ 122.250894] user pgtable: 4k pages, 48-bit VAs, pgdp=00000000465c8000
[ 122.257336] [0000000000000000] pgd=0000000000000000, p4d=0000000000000000
[ 122.264130] Internal error: Oops: 96000044 [#1] PREEMPT SMP
[ 122.269703] Modules linked in:
[ 122.272759] CPU: 0 PID: 2065 Comm: aplay Not tainted 5.15.32-karo+gc01cf92b4155 #1
[ 122.280331] Hardware name: Ka-Ro TX8M-1610 module on GOcontroll Moduline Screen for av123z7m-n17 screen (DT)
[ 122.290157] pstate: 800000c5 (Nzcv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 122.297121] pc : sdma_transfer_init+0x1e8/0x330
[ 122.301661] lr : sdma_transfer_init+0x19c/0x330
[ 122.306194] sp : ffff8000097b39c0
[ 122.309507] x29: ffff8000097b39c0 x28: ffff000002e68298 x27: ffff000002e6c6b0
[ 122.316649] x26: 00000000000000c0 x25: 0000000000000000 x24: 00000000000003c2
[ 122.323791] x23: 0000000000000020 x22: ffff800009355200 x21: ffff000002e68080
[ 122.330933] x20: ffff000006243500 x19: ffff000002e68298 x18: ffffffffffffffff
[ 122.338075] x17: 203a6c656e6e6168 x16: 632063696c637963 x15: ffff8000092a12ec
[ 122.345218] x14: 0000000000000000 x13: 000000000000068c x12: ffff8000097b35e0
[ 122.352359] x11: ffff8000091c19e0 x10: 00000000fffff000 x9 : 0000000000000000
[ 122.359501] x8 : ffff800009355280 x7 : 0000000000000000 x6 : 000000000000003f
[ 122.366642] x5 : 0000000000000040 x4 : 0000000000000000 x3 : 0000000000000004
[ 122.373783] x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000001830020
[ 122.380926] Call trace:
[ 122.383371] sdma_transfer_init+0x1e8/0x330
[ 122.387557] sdma_prep_dma_cyclic+0xc4/0x3f0
[ 122.391830] snd_dmaengine_pcm_trigger+0xec/0x1c0
[ 122.396540] dmaengine_pcm_trigger+0x18/0x24
[ 122.400814] snd_soc_pcm_component_trigger+0x164/0x230
[ 122.405957] soc_pcm_trigger+0xbc/0x1c0
[ 122.409796] snd_pcm_do_start+0x38/0x44
[ 122.413637] snd_pcm_action_single+0x48/0xa4
[ 122.417910] snd_pcm_action+0x7c/0x9c
[ 122.421573] snd_pcm_start+0x24/0x30
[ 122.425150] __snd_pcm_lib_xfer+0x718/0x800
[ 122.429335] snd_pcm_common_ioctl+0x1508/0x1a7c
[ 122.433867] snd_pcm_ioctl+0x34/0x50
[ 122.437444] __arm64_sys_ioctl+0xb8/0xe0
[ 122.441369] invoke_syscall+0x48/0x114
[ 122.445123] el0_svc_common.constprop.0+0x44/0xfc
[ 122.449829] do_el0_svc+0x28/0x90
[ 122.453146] el0_svc+0x28/0x80
[ 122.456205] el0t_64_sync_handler+0xa4/0x130
[ 122.460478] el0t_64_sync+0x1a0/0x1a4
[ 122.464147] Code: b90026c0 52800400 531b6af7 72a03060 (b9000320)
[ 122.470241] ---[ end trace 34c93087276a38a7 ]---
[ 122.474858] Kernel panic - not syncing: Oops: Fatal exception
[ 122.480603] SMP: stopping secondary CPUs
[ 122.484527] Kernel Offset: disabled
[ 122.488013] CPU features: 0x00002001,20000842
[ 122.492369] Memory Limit: none
我有点迷失了我应该如何继续这件事。
答案1
事实证明,存在多个问题,但只有一个问题引起了恐慌。
我缺少需要包含在 rootfs 中的 IMX SDMA 驱动程序。因此,我必须对参考 yocto 构建进行 bitbake,安装 rootfs,从 /lib/firmware/imx/sdma 中取出驱动程序,并将其放入我的自定义 rootfs 中。
将其放入内核恐慌消失后,音频仍然无法工作。但这是由于我的设备树中存在故障,无法在内核不断恐慌的情况下进行故障排除。