Open dagargo opened 5 years ago
Nice to see someone playing around with this half-baked code ;) (Seriously, that is the first time I came close to any of the ALSA kernel stuff, so there will be probably lots of issues ...) And yes, it needs to be built in-tree. Some insights on my debugging setup:
I have set up QEMU guest with usb passthrough (minimal new Debian buster installation without pulseaudio and kernel 4.19.37).
$ qemu-system-x86_64 -m 4096 -boot d -enable-kvm -smp 8 -net nic -net user,hostfwd=tcp::22222-:22 -hda development.img -device qemu-xhci -device usb-host,hostbus=1,hostaddr=5
And in the guest I have run JACK this way.
user@debian:~$ /usr/bin/jackd -t 200 -p 2048 -R -T -d alsa -n 2 -r 48000 -p 168 -d hw:Digitakt,0 -X raw
But it has led to the same problem.
[ 242.672333] INFO: task jackd:445 blocked for more than 120 seconds.
[ 242.713231] Tainted: G E 4.19.37 #1
[ 242.750053] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 242.787709] jackd D 0 445 441 0x00000004
[ 242.787712] Call Trace:
[ 242.787727] ? __schedule+0x2a2/0x870
[ 242.787728] schedule+0x28/0x80
[ 242.787733] pcm_prepare+0x108/0x150 [snd_digitakt]
[ 242.787735] ? finish_wait+0x80/0x80
[ 242.787739] snd_pcm_do_prepare+0x19/0x30 [snd_pcm]
[ 242.787743] snd_pcm_action_single+0x36/0x80 [snd_pcm]
[ 242.787747] snd_pcm_action_nonatomic+0x61/0x70 [snd_pcm]
[ 242.787754] snd_pcm_common_ioctl+0x561/0xb80 [snd_pcm]
[ 242.787760] snd_pcm_ioctl+0x23/0x30 [snd_pcm]
[ 242.787773] do_vfs_ioctl+0xa4/0x630
[ 242.787775] ksys_ioctl+0x60/0x90
[ 242.787777] __x64_sys_ioctl+0x16/0x20
[ 242.787779] do_syscall_64+0x53/0x110
[ 242.787781] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 242.787783] RIP: 0033:0x7fb3b4e2f427
[ 242.787788] Code: Bad RIP value.
[ 242.787788] RSP: 002b:00007ffe9ea90808 EFLAGS: 00000202 ORIG_RAX: 0000000000000010
[ 242.787790] RAX: ffffffffffffffda RBX: 000055a181098bc0 RCX: 00007fb3b4e2f427
[ 242.787791] RDX: 0000000000000000 RSI: 0000000000004140 RDI: 000000000000000d
[ 242.787791] RBP: 000055a181098c40 R08: 000000000000000b R09: 000055a1810994d0
[ 242.787792] R10: 0000000000000001 R11: 0000000000000202 R12: 000055a1810991d0
[ 242.787792] R13: 00007fb3b41b6920 R14: 000055a181097a50 R15: 0000000000000002
The module seems to be properly inserted (1935:000c but no USB ID).
user@debian:~$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 1935:000c
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
user@debian:~$ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=Digitakt
Digitakt, Digitakt
Default Audio Device
sysdefault:CARD=Digitakt
Digitakt, Digitakt
Default Audio Device
dmix:CARD=Digitakt,DEV=0
Digitakt, Digitakt
Direct sample mixing device
dsnoop:CARD=Digitakt,DEV=0
Digitakt, Digitakt
Direct sample snooping device
hw:CARD=Digitakt,DEV=0
Digitakt, Digitakt
Direct hardware device without any conversions
plughw:CARD=Digitakt,DEV=0
Digitakt, Digitakt
Hardware device with all software conversions
Regarding the wrong includes issue, and considering you would need to change those lines too, could you confirm that there are no other changes in your code?
By the way, the Digitakt is running firmware version 1.11.
I checked my setup and it is definitively the same code I am using. Apart from the include which I just reverted and pushed (the idea was to have a local copy of these header in case somebody wants to build the module out of tree which isn't working anyways). My qemu start script:
KERNEL="/home/stefan/git/alsadrv/linux/arch/x86_64/boot/bzImage"
RAM=2G
DISK="/home/stefan/git/alsadrv/image/kernel-dev-archlinux.img"
qemu-system-x86_64 \
-enable-kvm \
-hda $DISK \
-m $RAM \
-net nic -net user,hostfwd=tcp::2222-:22 \
-serial stdio \
-curses \
-kernel $KERNEL \
-append "root=/dev/sda1 console=ttyS0 rw log_buf_len=10M" \
-display none \
-device usb-ehci,id=ehci \
-device usb-host,bus=ehci.0,vendorid=0x1935,productid=0x000c
I have sshd running on the guest to transfer the module after building (with an additional script).
I then start jackd (V1) with a plain
jackd -v -d alsa -p 256 -n 3
My DT is still running firmware 1.11_BETA6, maybe they changed something with the protocol?
Is dtdump running with your setup (because it essentially does the same, on the USB side).
I want to second this issue. My first functionality check with dtdump
succeeded with my Digitone(!) running firmware 1.21 on my Linux laptop. After that I added the Digitone descriptor to the driver like this
static const struct usb_device_id digitakt_ids[] = {
{ USB_DEVICE(0x1935, 0x000c) },
{ USB_DEVICE(0x1935, 0x0014) },
{ }
};
and compiled it directly on a Raspberry Pi 4. The RasPi is running patchbox OS which is based on Raspbian.
$ uname -a
Linux patchbox 4.19.71-rt24-v7l+ #1 SMP PREEMPT RT Wed Mar 11 17:15:58 EET 2020 armv7l GNU/Linux
The first test I did was trying to record to file:
# arecord -r 48000 -D hw:0,0 -f S32_BE -c12 dito_test.wav
Recording WAVE 'dito_test.wav' : Signed 32 bit Big Endian, Rate 48000 Hz, Channels 12
^C^C
As you can see, the recording hangs and in the journals I can find (Please note that the order is reversed):
Jun 05 00:35:56 patchbox kernel: 9fe0: b6f3c818 be8aef94 b6eb3e34 b6d1f51c
Jun 05 00:35:56 patchbox kernel: 9fc0: 01037760 000885d0 be8aefc0 00000036 0002f160 0002f048 0000bb80 be8af3dc
Jun 05 00:35:56 patchbox kernel: 9fa0: 01037760 000885d0 00000004 00004140 32356f00 b6eb3e18
Jun 05 00:35:56 patchbox kernel: Exception stack(0xdba89fa8 to 0xdba89ff0)
Jun 05 00:35:56 patchbox kernel: [<c03c167c>] (sys_ioctl) from [<c0201000>] (ret_fast_syscall+0x0/0x28)
Jun 05 00:35:56 patchbox kernel: [<c03c163c>] (ksys_ioctl) from [<c03c167c>] (sys_ioctl+0x18/0x1c)
Jun 05 00:35:56 patchbox kernel: [<c03c0ec8>] (do_vfs_ioctl) from [<c03c163c>] (ksys_ioctl+0x44/0x6c)
Jun 05 00:35:56 patchbox kernel: [<bf0d4e00>] (snd_pcm_ioctl [snd_pcm]) from [<c03c0ec8>] (do_vfs_ioctl+0x9c/0x7cc)
Jun 05 00:35:56 patchbox kernel: [<bf0d2ca4>] (snd_pcm_prepare [snd_pcm]) from [<bf0d4e00>] (snd_pcm_ioctl+0x5e8/0xfc4 [snd_pcm])
Jun 05 00:35:56 patchbox kernel: [<bf0d2120>] (snd_pcm_action_nonatomic [snd_pcm]) from [<bf0d2ca4>] (snd_pcm_prepare+0x78/0xac [snd_pcm])
Jun 05 00:35:56 patchbox kernel: [<bf0d207c>] (snd_pcm_action_single [snd_pcm]) from [<bf0d2120>] (snd_pcm_action_nonatomic+0x64/0x70 [snd_pcm])
Jun 05 00:35:56 patchbox kernel: [<bf0d25fc>] (snd_pcm_do_prepare [snd_pcm]) from [<bf0d207c>] (snd_pcm_action_single+0x48/0x88 [snd_pcm])
Jun 05 00:35:56 patchbox kernel: [<bf1162e0>] (pcm_prepare [snd_digitakt]) from [<bf0d25fc>] (snd_pcm_do_prepare+0x24/0x3c [snd_pcm])
Jun 05 00:35:56 patchbox kernel: [<c096a144>] (schedule) from [<bf1162e0>] (pcm_prepare+0x100/0x140 [snd_digitakt])
Jun 05 00:35:56 patchbox kernel: [<c0969d3c>] (__schedule) from [<c096a144>] (schedule+0x64/0x108)
Jun 05 00:35:56 patchbox kernel: arecord D 0 976 775 0x00000001
Jun 05 00:35:56 patchbox kernel: "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
Jun 05 00:35:56 patchbox kernel: Tainted: G C O 4.19.71-rt24-v7l+ #1
Jun 05 00:35:56 patchbox kernel: INFO: task arecord:976 blocked for more than 120 seconds.
I don't know how to recover from this lock. After turning the Digitone off, the journal says (again, reversed order):
Jun 05 00:42:23 patchbox kernel: genirq: exiting task "irq/56-xhci_hcd" (80) is an active IRQ thread (irq 56)
Jun 05 00:42:23 patchbox kernel: ---[ end trace 0000000000000002 ]---
Jun 05 00:42:23 patchbox kernel: Code: e5952190 e3083000 e34b3f11 e1a00007 (e59210a8)
Jun 05 00:42:23 patchbox kernel: ffe0: 00000000 00000000 00000000 00000000 00000013 00000000
Jun 05 00:42:23 patchbox kernel: ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Jun 05 00:42:23 patchbox kernel: ffa0: 00000000 00000000 00000000 00000000
Jun 05 00:42:23 patchbox kernel: Exception stack(0xef10ffb0 to 0xef10fff8)
Jun 05 00:42:23 patchbox kernel: [<c0242a8c>] (kthread) from [<c02010b4>] (ret_from_fork+0x14/0x20)
Jun 05 00:42:23 patchbox kernel: [<c02820c0>] (irq_thread) from [<c0242a8c>] (kthread+0x12c/0x168)
Jun 05 00:42:23 patchbox kernel: [<c0281df0>] (irq_forced_thread_fn) from [<c02820c0>] (irq_thread+0x100/0x1e0)
Jun 05 00:42:23 patchbox kernel: [<c0766b94>] (xhci_msi_irq) from [<c0281df0>] (irq_forced_thread_fn+0x30/0x8c)
Jun 05 00:42:23 patchbox kernel: [<c0765d3c>] (xhci_irq) from [<c0766b94>] (xhci_msi_irq+0x1c/0x20)
Jun 05 00:42:23 patchbox kernel: [<c076539c>] (finish_td) from [<c0765d3c>] (xhci_irq+0x998/0x17d4)
Jun 05 00:42:23 patchbox kernel: [<c0761040>] (xhci_td_cleanup) from [<c076539c>] (finish_td+0xf8/0x100)
Jun 05 00:42:23 patchbox kernel: [<c0760db4>] (xhci_giveback_urb_in_irq) from [<c0761040>] (xhci_td_cleanup+0xc4/0xf0)
Jun 05 00:42:23 patchbox kernel: [<c073ed24>] (usb_hcd_giveback_urb) from [<c0760db4>] (xhci_giveback_urb_in_irq+0x98/0x184)
Jun 05 00:42:23 patchbox kernel: [<c073ec3c>] (__usb_hcd_giveback_urb) from [<c073ed24>] (usb_hcd_giveback_urb+0x50/0x118)
Jun 05 00:42:23 patchbox kernel: [<bf1165d4>] (first_playback_urb_complete [snd_digitakt]) from [<c073ec3c>] (__usb_hcd_giveback_urb+0x74/0x10c)
Jun 05 00:42:23 patchbox kernel: [<bf116548>] (playback_urb_complete [snd_digitakt]) from [<bf1165d4>] (first_playback_urb_complete+0x28/0x4c [snd_digitakt])
Jun 05 00:42:23 patchbox kernel: ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
Jun 05 00:42:23 patchbox kernel: ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Jun 05 00:42:23 patchbox kernel: ffa0: 00000000 ef10ffb0 c02010b4 c024296c 00000000 00000000 00000000 00000000
Jun 05 00:42:23 patchbox kernel: ff80: ffffffff efabe380 c0242960 00000000 00000000 00000000 00000000 00000000
Jun 05 00:42:23 patchbox kernel: ff60: efabe340 c0281fc0 ef8ebb5c 00000000 ef10ffac ef10ff80 c0242a8c c0281fcc
Jun 05 00:42:23 patchbox kernel: ff40: c096e0ac c024b6cc 00000000 c0281f00 ef10ff7c ef103bc0 efabe380 ef103bdc
Jun 05 00:42:23 patchbox kernel: ff20: 00000004 efabe364 ef10e000 00000000 ef10ff7c ef10ff40 c02820c0 c0281dcc
Jun 05 00:42:23 patchbox kernel: ff00: ef10ff1c ef10ff10 c0766b94 c07653b0 ef10ff3c ef10ff20 c0281df0 c0766b84
Jun 05 00:42:23 patchbox kernel: fee0: ef10ff0c efabe340 ef330800 00000000 00000001 ef330800 efabe340 c0281dc0
Jun 05 00:42:23 patchbox kernel: fec0: 00000002 ded08c30 00000004 00000005 dc0ce200 ef10e000 ef10e000 ffffffb9
Jun 05 00:42:23 patchbox kernel: fea0: ef330800 ded4d100 00000840 00000240 dec020c0 dabce308 1ed4d100 00000000
Jun 05 00:42:23 patchbox kernel: fe80: c0765d3c c07652b0 ef10fedc 00000000 00000000 c096e0e8 c109bb54 ef8f41a8
Jun 05 00:42:23 patchbox kernel: fe60: 00000000 dbcef080 ef8f4178 000002c0 00000840 ef8f4000 ef10ff0c ef10fe88
Jun 05 00:42:23 patchbox kernel: fe40: ef10fe84 ef10fe50 c076539c c0760f88 dabce308 00000000 00000000 ded08cd0
Jun 05 00:42:23 patchbox kernel: fe20: ef10fe4c ef10fe30 c0761040 c0760d28 dbcef080 ef8f4178 dabce308 ded08cd0
Jun 05 00:42:23 patchbox kernel: fe00: dc0ce200 00000005 dabce308 dbce4480 ef8f4178 ef10fedc 00000005 00000002
Jun 05 00:42:23 patchbox kernel: fde0: c109e91c dabce308 dbce4480 ef8f4000 ef10fe2c ef10fe00 c0760db4 c073ece0
Jun 05 00:42:23 patchbox kernel: fdc0: dbce4480 ef8f4000 ef8f4000 ffffffb9 ef10fdfc ef10fde0 c073ed24 c073ebd4
Jun 05 00:42:23 patchbox kernel: fda0: bf1165d4 bf1164bc dbce4480 ef8f4000 ef10fddc ef10fdc0 c073ec3c bf1165b8
Jun 05 00:42:23 patchbox kernel: fd80: dc2f05f8 ef8f4000 00000000 ffffffb9 ef10fdbc ef10fda8
Jun 05 00:42:23 patchbox kernel: Stack: (0xef10fd88 to 0xef110000)
Jun 05 00:42:23 patchbox kernel: Process irq/56-xhci_hcd (pid: 80, stack limit = 0xdfda6002)
Jun 05 00:42:23 patchbox kernel: Control: 30c5383d Table: 1b83a100 DAC: fffffffd
Jun 05 00:42:23 patchbox kernel: Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
Jun 05 00:42:23 patchbox kernel: r3 : bf118000 r2 : 00000000 r1 : 2f08d000 r0 : dc2f0638
Jun 05 00:42:23 patchbox kernel: r7 : dc2f0638 r6 : dbce4480 r5 : dc2f05f8 r4 : 00000000
Jun 05 00:42:23 patchbox kernel: r10: dc0ce000 r9 : ef8f41a8 r8 : dbce4480
Jun 05 00:42:23 patchbox kernel: sp : ef10fd88 ip : c1007a24 fp : ef10fda4
Jun 05 00:42:23 patchbox kernel: pc : [<bf116548>] lr : [<c03064ec>] psr: 60000013
Jun 05 00:42:23 patchbox kernel: LR is at trace_hardirqs_on+0x94/0x20c
Jun 05 00:42:23 patchbox kernel: PC is at playback_urb_complete+0x98/0xfc [snd_digitakt]
Jun 05 00:42:23 patchbox kernel: Hardware name: BCM2835
Jun 05 00:42:23 patchbox kernel: CPU: 0 PID: 80 Comm: irq/56-xhci_hcd Tainted: G C O 4.19.71-rt24-v7l+ #1
Jun 05 00:42:23 patchbox kernel: Modules linked in: tcp_diag inet_diag bnep hci_uart btbcm serdev bluetooth ecdh_generic snd_hrtimer snd_seq_midi snd_seq_dummy snd_seq_midi_event snd_seq 8021q garp stp llc snd_usb_audio snd_hwdep bcm2835
Jun 05 00:42:23 patchbox kernel: Internal error: Oops: 207 [#1] PREEMPT SMP ARM
Jun 05 00:42:23 patchbox kernel: [000000a8] *pgd=80000000004003, *pmd=00000000
Jun 05 00:42:23 patchbox kernel: pgd = 94cd3985
Jun 05 00:42:23 patchbox kernel: Unable to handle kernel NULL pointer dereference at virtual address 000000a8
I did my test again but with the debug messages enabled (except for the spammy one in capture_urb_complete). Here's the log from powering on the Digitone until it crashed with arecord. Now with dmesg:
[ 218.095766] usbcore: deregistering interface driver snd-digitakt
[ 312.815410] usbcore: registered new interface driver snd-digitakt
[ 329.236433] usb 1-1.4: new high-speed USB device number 4 using xhci_hcd
[ 329.367298] usb 1-1.4: New USB device found, idVendor=1935, idProduct=0014, bcdDevice= 0.01
[ 329.367309] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 329.367316] usb 1-1.4: Product: Elektron Digitone
[ 329.367323] usb 1-1.4: Manufacturer: Elektron Music Machines
[ 329.367329] usb 1-1.4: SerialNumber: 000000000001
[ 329.371892] hallotest
[ 329.371932] sclaim
[ 329.371941] claim 1 is 0
[ 329.371948] claim 2 is 0
[ 329.371957] claim 3 is 0
[ 329.371964] claim 4 is 0
[ 329.371970] eclaim
[ 329.373997] alt settings ok!
[ 329.374912] alloc_stream_buffers(8832) OK!
[ 329.374960] alloc_stream_buffers(8832) OK!
[ 329.375004] alloc_stream_buffers(8832) OK!
[ 329.375048] alloc_stream_buffers(8832) OK!
[ 329.375053] alloc_stream_buffers ok!
[ 329.375097] alloc_stream_buffers(2112) OK!
[ 329.375128] alloc_stream_buffers(2112) OK!
[ 329.375162] alloc_stream_buffers(2112) OK!
[ 329.375193] alloc_stream_buffers(2112) OK!
[ 329.375198] alloc_stream_buffers ok!
[ 329.375203] alloc_stream_buffers ok!
[ 329.375209] stream->max_packet_bytes = 8832
[ 329.375215] addr = FFFFFFFFE0E80000
[ 329.375220] b = 0
[ 329.375225] size = 8832
[ 329.375231] dma_addr = 20E80000
[ 329.375237] kmalloc ok!
[ 329.375242] init_urb ok!
[ 329.375247] addr = FFFFFFFFE0E84000
[ 329.375253] b = 1
[ 329.375258] size = 8832
[ 329.375263] dma_addr = 20E84000
[ 329.375269] kmalloc ok!
[ 329.375274] init_urb ok!
[ 329.375279] addr = FFFFFFFFE0E88000
[ 329.375285] b = 2
[ 329.375290] size = 8832
[ 329.375295] dma_addr = 20E88000
[ 329.375300] kmalloc ok!
[ 329.375306] init_urb ok!
[ 329.375311] addr = FFFFFFFFE0E8C000
[ 329.375316] b = 3
[ 329.375322] size = 8832
[ 329.375327] dma_addr = 20E8C000
[ 329.375332] kmalloc ok!
[ 329.375337] init_urb ok!
[ 329.375343] alloc_stream_urbs ok!
[ 329.375348] alloc_stream_urb capture ok!
[ 329.375354] stream->max_packet_bytes = 2112
[ 329.375359] addr = FFFFFFFFDEDDF000
[ 329.375364] b = 0
[ 329.375370] size = 2112
[ 329.375375] dma_addr = 1EDDF000
[ 329.375380] kmalloc ok!
[ 329.375386] init_urb ok!
[ 329.375391] addr = FFFFFFFFE0E83000
[ 329.375396] b = 1
[ 329.375401] size = 2112
[ 329.375407] dma_addr = 20E83000
[ 329.375412] kmalloc ok!
[ 329.375417] init_urb ok!
[ 329.375423] addr = FFFFFFFFE0E87000
[ 329.375428] b = 2
[ 329.375433] size = 2112
[ 329.375439] dma_addr = 20E87000
[ 329.375444] kmalloc ok!
[ 329.375449] init_urb ok!
[ 329.375455] addr = FFFFFFFFE0E8B000
[ 329.375460] b = 3
[ 329.375465] size = 2112
[ 329.375471] dma_addr = 20E8B000
[ 329.375476] kmalloc ok!
[ 329.375482] init_urb ok!
[ 329.375487] alloc_stream_urbs ok!
[ 329.375492] alloc_stream_urb playback ok!
[ 433.785295] pcm_open
[ 433.785303] set_stream_hw
[ 433.785311] period_bytes_min: 64
[ 433.785319] chans: 12 err: 1
[ 433.785325] chans: 12 err: 0
[ 433.785330] set_stream_hw OK
[ 433.785336] start usb capture
[ 433.785341] kill_stream_urbs
[ 433.785347] submit_stream_urbs
[ 433.785359] i: 0
[ 433.785369] i: 1
[ 433.785378] i: 2
[ 433.785387] i: 3
[ 433.785392] submit_stream_urbs OK
[ 433.785398] start usb capture OK
[ 433.785403] kill_stream_urbs
[ 433.785411] playback wof
[ 433.785417] fill_in_meta_playback
[ 433.785424] fill_in_meta_playback
[ 433.785431] fill_in_meta_playback
[ 433.785438] fill_in_meta_playback
[ 433.785443] submit_stream_urbs
[ 433.785453] i: 0
[ 433.785462] i: 1
[ 433.785471] i: 2
[ 433.785480] i: 3
[ 433.785485] submit_stream_urbs OK
[ 433.785490] start usb playback OK
[ 433.785495] pcm_open OK
[ 433.786046] start usb capture
[ 433.786053] pcm_hw_params
[ 433.789343] first_capture_urb_complete
[ 433.789358] first_playback_urb_complete
[ 433.789363] playback_urb_complete
[ 433.789376] Unable to handle kernel NULL pointer dereference at virtual address 000000a8
[ 433.790319] pgd = 3667176c
[ 433.791224] [000000a8] *pgd=80000000004003, *pmd=00000000
[ 433.792218] pcm_prepare(..)
[ 433.792225] start usb capture
[ 433.792229] started capture
[ 433.792233] started playback
[ 433.792248] Internal error: Oops: 207 [#1] PREEMPT SMP ARM
[ 433.792252] Modules linked in: snd_digitakt(O) bnep hci_uart btbcm serdev bluetooth ecdh_generic snd_hrtimer snd_seq_dummy snd_seq_midi snd_seq_midi_event snd_seq 8021q garp stp llc snd_usb_audio snd_hwdep brcmfmac brcmutil sha256_generic cfg80211 vc4 rfkill drm_kms_helper bcm2835_codec(C) bcm2835_v4l2(C) v4l2_mem2mem bcm2835_mmal_vchiq(C) v4l2_common snd_soc_core videobuf2_dma_contig videobuf2_vmalloc snd_compress v3d raspberrypi_hwmon snd_pcm_dmaengine videobuf2_memops gpu_sched hwmon syscopyarea videobuf2_v4l2 sysfillrect videobuf2_common drm sysimgblt drm_panel_orientation_quirks fb_sys_fops videodev vc_sm_cma(C) media snd_bcm2835(C) rpivid_mem uio_pdrv_genirq fixed uio snd_usbmidi_lib snd_rawmidi snd_seq_device snd_pcm snd_timer snd ip_tables x_tables ipv6 [last unloaded: snd_digitakt]
[ 433.792356] CPU: 1 PID: 80 Comm: irq/56-xhci_hcd Tainted: G C O 4.19.71-rt24-v7l+ #1
[ 433.792358] Hardware name: BCM2835
[ 433.792375] PC is at playback_urb_complete+0xd8/0xf8 [snd_digitakt]
[ 433.792387] LR is at trace_hardirqs_on+0x94/0x20c
[ 433.792389] pc : [<bfaa6218>] lr : [<c03064ec>] psr: 60000013
[ 433.792391] sp : ef359d88 ip : c1007a24 fp : ef359da4
[ 433.792393] r10: daffc000 r9 : ef13a1a8 r8 : db341cc0
[ 433.792395] r7 : daffb638 r6 : 00000000 r5 : db341cc0 r4 : daffb5f8
[ 433.792397] r3 : bfaa9000 r2 : 00000000 r1 : 2f09f000 r0 : daffb638
[ 433.792400] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[ 433.792403] Control: 30c5383d Table: 1b94cec0 DAC: 55555555
[ 433.792406] Process irq/56-xhci_hcd (pid: 80, stack limit = 0x98fb3fac)
[ 433.792408] Stack: (0xef359d88 to 0xef35a000)
[ 433.792412] 9d80: db341cc0 daffb5f8 00000000 00000000 ef359dbc ef359da8
[ 433.792415] 9da0: bfaa6274 bfaa614c db341cc0 ef13a000 ef359ddc ef359dc0 c073ec3c bfaa6244
[ 433.792418] 9dc0: db341cc0 ef13a000 ef13a000 00000000 ef359dfc ef359de0 c073ed24 c073ebd4
[ 433.792421] 9de0: c109e91c dbd47888 db341cc0 ef13a000 ef359e2c ef359e00 c0760db4 c073ece0
[ 433.792425] 9e00: 2f09f000 0000dddc dbd47888 db341cc0 ef13a178 ef359edc 00000005 00000003
[ 433.792428] 9e20: ef359e4c ef359e30 c0761040 c0760d28 da23c680 ef13a178 dbd47888 ded06430
[ 433.792431] 9e40: ef359e84 ef359e50 c076539c c0760f88 1eddbff0 00000000 00000000 ded06430
[ 433.792434] 9e60: 00000000 da23c680 ef13a178 00000000 00000840 ef13a000 ef359f0c ef359e88
[ 433.792437] 9e80: c0765d3c c07652b0 ef359edc 00000000 00000000 c096e0e8 c109bb54 ef13a1a8
[ 433.792441] 9ea0: ef372400 deddb000 00000840 00000240 dec020c0 dbd47888 1eddb000 00000000
[ 433.792444] 9ec0: 00000003 ded063a0 00000001 00000005 daffc200 ef358000 ef358000 00000000
[ 433.792447] 9ee0: ef359f0c ef0c8c40 ef372400 00000000 00000001 ef372400 ef0c8c40 c0281dc0
[ 433.792450] 9f00: ef359f1c ef359f10 c0766b94 c07653b0 ef359f3c ef359f20 c0281df0 c0766b84
[ 433.792453] 9f20: 00000004 ef0c8c64 ef358000 00000000 ef359f7c ef359f40 c02820c0 c0281dcc
[ 433.792456] 9f40: c096e0ac c024b6cc 00000000 c0281f00 ef359f7c efab4140 ef0c8c80 efab415c
[ 433.792459] 9f60: ef0c8c40 c0281fc0 ef8ebb5c 00000000 ef359fac ef359f80 c0242a8c c0281fcc
[ 433.792463] 9f80: ffffffff ef0c8c80 c0242960 00000000 00000000 00000000 00000000 00000000
[ 433.792466] 9fa0: 00000000 ef359fb0 c02010b4 c024296c 00000000 00000000 00000000 00000000
[ 433.792468] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 433.792471] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[ 433.792508] [<bfaa6218>] (playback_urb_complete [snd_digitakt]) from [<bfaa6274>] (first_playback_urb_complete+0x3c/0x60 [snd_digitakt])
[ 433.792519] [<bfaa6274>] (first_playback_urb_complete [snd_digitakt]) from [<c073ec3c>] (__usb_hcd_giveback_urb+0x74/0x10c)
[ 433.792526] [<c073ec3c>] (__usb_hcd_giveback_urb) from [<c073ed24>] (usb_hcd_giveback_urb+0x50/0x118)
[ 433.792533] [<c073ed24>] (usb_hcd_giveback_urb) from [<c0760db4>] (xhci_giveback_urb_in_irq+0x98/0x184)
[ 433.792538] [<c0760db4>] (xhci_giveback_urb_in_irq) from [<c0761040>] (xhci_td_cleanup+0xc4/0xf0)
[ 433.792543] [<c0761040>] (xhci_td_cleanup) from [<c076539c>] (finish_td+0xf8/0x100)
[ 433.792548] [<c076539c>] (finish_td) from [<c0765d3c>] (xhci_irq+0x998/0x17d4)
[ 433.792552] [<c0765d3c>] (xhci_irq) from [<c0766b94>] (xhci_msi_irq+0x1c/0x20)
[ 433.792559] [<c0766b94>] (xhci_msi_irq) from [<c0281df0>] (irq_forced_thread_fn+0x30/0x8c)
[ 433.792566] [<c0281df0>] (irq_forced_thread_fn) from [<c02820c0>] (irq_thread+0x100/0x1e0)
[ 433.792570] [<c02820c0>] (irq_thread) from [<c0242a8c>] (kthread+0x12c/0x168)
[ 433.792576] [<c0242a8c>] (kthread) from [<c02010b4>] (ret_from_fork+0x14/0x20)
[ 433.792579] Exception stack(0xef359fb0 to 0xef359ff8)
[ 433.792581] 9fa0: 00000000 00000000 00000000 00000000
[ 433.792584] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 433.792587] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 433.792591] Code: e5942190 e3093000 e34b3faa e1a00007 (e59210a8)
[ 433.873393] ---[ end trace 0000000000000002 ]---
[ 433.874749] genirq: exiting task "irq/56-xhci_hcd" (80) is an active IRQ thread (irq 56)
[ 433.876258] playback tasklet
Hello,
I've tried to get the module compiled and running properly on my PC but haven't succeeded.
Firstly, as there is no documentation provided, I assume that the module needs to be built from inside the kernel tree. So I copied it into the 5.2.9 version and it failed.
I used the commit 44481bc82265ba8c9d5c46e28732b340df3ed68b (which only differs at the wrong includes) and it worked. But perhaps, there's another way to compile it.
Secondly, once inserted via modprobe, audio doesn't work but MIDI does. While inserted, the system becomes unstable; but if removed it becomes stable again. So it seems to be a lock somewhere.
If I try to run jackd (with pasuspender) I get the following.
It seems that the
pcm_prepare
function is the one causing the lock.Besides, I activated
CONFIG_SND_DEBUG
andCONFIG_SND_DEBUG_VERBOSE
to see if I could throw some light on this issue and I observed the following:playback_urb_complete
, every call returns becauseurb->urb.status == -ENOENT
.But not sure if these mean anything.
However, thank you for this amazing project!
Cheers