Skip to content

Kernel 6.6.y and DAC Allo Piano 2.1+Kali fails init #6527

@foonerd

Description

@foonerd

Describe the bug

It seems that sound/soc/bcm/allo-piano-dac-plus.c is not parsing parameters for alsa use. What I can observe is that the dtoverlay partly fails register the card:

[   19.836848] snd-allo-piano-dac-plus soc:sound: snd_soc_register_card() failed: -517
[   19.882239] snd-allo-piano-dac-plus soc:sound: snd_soc_register_card() failed: -517

However module somewhat loads:
ls -la /sys/module/snd_soc_allo_piano_dac_plus/

drwxr-xr-x   6 root root    0 Dec 10 08:08 .
drwxr-xr-x 150 root root    0 Jan  1  1970 ..
-r--r--r--   1 root root 4096 Dec 10 08:08 coresize
drwxr-xr-x   2 root root    0 Dec 10 08:08 drivers
drwxr-xr-x   2 root root    0 Dec 10 08:08 holders
-r--r--r--   1 root root 4096 Dec 10 08:08 initsize
-r--r--r--   1 root root 4096 Dec 10 08:08 initstate
drwxr-xr-x   2 root root    0 Dec 10 08:08 notes
-r--r--r--   1 root root 4096 Dec 10 08:08 refcnt
drwxr-xr-x   2 root root    0 Dec 10 08:08 sections
-r--r--r--   1 root root 4096 Dec 10 08:08 srcversion
-r--r--r--   1 root root 4096 Dec 10 08:08 taint
--w-------   1 root root 4096 Dec 10 08:08 uevent

Simple test with alsa-info shows that the expected DAC's control parameters are missing:

ALSA Information Script v 0.5.1
--------------------------------

This script visits the following commands/files to collect diagnostic
information about your ALSA installation and sound related hardware.

  dmesg
  lspci
  aplay
  amixer
  alsactl
  rpm, dpkg
  /proc/asound/
  /sys/class/sound/
  ~/.asoundrc (etc.)

See '/usr/sbin/alsa-info --help' for command line options.

cat: /tmp/alsa-info.2lPuin51C4/acpidevicestatus.tmp: No such file or directory
pgrep: pattern that searches for process name longer than 15 characters will result in zero matches
Try `pgrep -f' option to match against the complete command line.
cat: '/sys/module/snd_soc_allo_piano_dac_plus/parameters/*': No such file or directory

In addition, there seems to be a deadlock after module load preventing init level change.

Steps to reproduce the behaviour

Load overlay with config.txt:

# Enable audio (loads snd_bcm2835)
dtparam=audio=off
[all]
dtoverlay=allo-piano-dac-plus-pcm512x-audio

Load manually:

sudo dtoveraly allo-piano-dac-plus-pcm512x-audio

Device (s)

Raspberry Pi 3 Mod. B+, Raspberry Pi 4 Mod. B, Raspberry Pi 400, Raspberry Pi 5, Raspberry Pi CM4, Raspberry Pi CM4 Lite, Other

System

cat /etc/rpi-issue

Raspberry Pi reference 2024-07-04
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 48efb5fc5485fafdc9de8ad481eb5c09e1182656, stage5

vcgencmd version

Nov 26 2024 12:54:19 
Copyright (c) 2012 Broadcom
version 2ae30f53898ae2f1ba77ff570a92991bedfb0398 (clean) (release) (start)

uname -a

Linux bookworm 6.6.62+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.62-1+rpt1 (2024-11-25) aarch64 GNU/Linux

Logs

dmesg shows continuously:

[  242.652712] INFO: task alsactl:514 blocked for more than 120 seconds.
[  242.652754]       Tainted: G         C         6.6.62+rpt-rpi-v8 #1 Debian 1:6.6.62-1+rpt1
[  242.652766] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  242.652773] task:alsactl         state:D stack:0     pid:514   ppid:1      flags:0x00000805
[  242.652800] Call trace:
[  242.652810]  __switch_to+0xe0/0x148
[  242.652841]  __schedule+0x37c/0xd60
[  242.652856]  schedule+0x64/0x108
[  242.652871]  schedule_preempt_disabled+0x2c/0x50
[  242.652893]  rwsem_down_read_slowpath+0x214/0x528
[  242.652915]  down_read+0xac/0xc0
[  242.652931]  snd_soc_card_get_kcontrol+0x34/0xc0 [snd_soc_core]
[  242.653171]  snd_soc_limit_volume+0x2c/0x80 [snd_soc_core]
[  242.653360]  pcm512x_set_reg_master+0x110/0x138 [snd_soc_allo_piano_dac_plus]
[  242.653401]  snd_ctl_elem_write+0xfc/0x208 [snd]
[  242.653508]  snd_ctl_ioctl+0x14c/0x920 [snd]
[  242.653598]  __arm64_sys_ioctl+0xb4/0x100
[  242.653619]  invoke_syscall+0x50/0x128
[  242.653642]  el0_svc_common.constprop.0+0xc8/0xf0
[  242.653662]  do_el0_svc+0x24/0x38
[  242.653681]  el0_svc+0x38/0xd0
[  242.653702]  el0t_64_sync_handler+0x100/0x130
[  242.653723]  el0t_64_sync+0x190/0x198
[  242.653745] INFO: task alsactl:532 blocked for more than 120 seconds.
[  242.653758]       Tainted: G         C         6.6.62+rpt-rpi-v8 #1 Debian 1:6.6.62-1+rpt1
[  242.653768] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  242.653775] task:alsactl         state:D stack:0     pid:532   ppid:1      flags:0x00000004
[  242.653796] Call trace:
[  242.653803]  __switch_to+0xe0/0x148
[  242.653820]  __schedule+0x37c/0xd60
[  242.653834]  schedule+0x64/0x108
[  242.653849]  schedule_preempt_disabled+0x2c/0x50
[  242.653865]  rwsem_down_write_slowpath+0x32c/0x6d8
[  242.653888]  down_write+0x98/0xa8
[  242.653906]  snd_ctl_release+0x74/0x130 [snd]
[  242.653996]  __fput+0xc4/0x290
[  242.654017]  __fput_sync+0x58/0x70
[  242.654037]  __arm64_sys_close+0x40/0x90
[  242.654056]  invoke_syscall+0x50/0x128
[  242.654076]  el0_svc_common.constprop.0+0x48/0xf0
[  242.654095]  do_el0_svc+0x24/0x38
[  242.654113]  el0_svc+0x38/0xd0
[  242.654133]  el0t_64_sync_handler+0x100/0x130
[  242.654154]  el0t_64_sync+0x190/0x198
[  242.654221] INFO: task wireplumber:989 blocked for more than 120 seconds.
[  242.654233]       Tainted: G         C         6.6.62+rpt-rpi-v8 #1 Debian 1:6.6.62-1+rpt1
[  242.654243] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  242.654251] task:wireplumber     state:D stack:0     pid:989   ppid:961    flags:0x00000804
[  242.654271] Call trace:
[  242.654277]  __switch_to+0xe0/0x148
[  242.654293]  __schedule+0x37c/0xd60
[  242.654308]  schedule+0x64/0x108
[  242.654322]  schedule_preempt_disabled+0x2c/0x50
[  242.654338]  rwsem_down_write_slowpath+0x32c/0x6d8
[  242.654356]  down_write+0x98/0xa8
[  242.654372]  snd_ctl_release+0x74/0x130 [snd]
[  242.654467]  __fput+0xc4/0x290
[  242.654488]  __fput_sync+0x58/0x70
[  242.654507]  __arm64_sys_close+0x40/0x90
[  242.654525]  invoke_syscall+0x50/0x128
[  242.654544]  el0_svc_common.constprop.0+0xc8/0xf0
[  242.654563]  do_el0_svc+0x24/0x38
[  242.654583]  el0_svc+0x38/0xd0
[  242.654603]  el0t_64_sync_handler+0x100/0x130
[  242.654623]  el0t_64_sync+0x190/0x198
[  363.484702] INFO: task alsactl:514 blocked for more than 241 seconds.
[  363.484745]       Tainted: G         C         6.6.62+rpt-rpi-v8 #1 Debian 1:6.6.62-1+rpt1
[  363.484758] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions