오디오를 재생하려고 할 때 커널 패닉이 발생함

오디오를 재생하려고 할 때 커널 패닉이 발생함

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 빌드를 비트베이크하고, rootfs를 설치하고, /lib/firmware/imx/sdma에서 드라이버를 가져와서 사용자 정의 rootfs에 넣어야 했습니다.

커널에 넣은 후 패닉은 사라졌지만 오디오는 여전히 작동하지 않았습니다. 그러나 이는 커널이 지속적으로 패닉 상태에 빠져 문제를 해결할 수 없는 장치 트리의 결함 때문입니다.

관련 정보