Troubleshooting:alsa

From postmarketOS

During alsa upgrades, sometimes the ucm profiles break. Here are some tips and tricks to fix them.

alsaucm reload

Run alsaucm reload and see if it it prints an error message. If it does, run it again with strace and look at what it is doing before the error. Maybe the paths or loading of the ucm files changed again:

$ strace alsaucm reload

As of writing, a recent example was alsa expecting all files in /usr/share/alsa/ucm2/conf.d/simple-card to be a symlink. It would fail with readlinkat otherwise:

faccessat(AT_FDCWD, "/usr/share/alsa/ucm2/conf.d/simple-card/PinePhone.conf", R_OK) = 0
newfstatat(AT_FDCWD, "/usr/share/alsa/ucm2/conf.d/simple-card/PinePhone.conf", {st_mode=S_IFREG|0644, st_size=196, ...}, AT_SYMLINK_NOFOLLOW) = 0
mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xffffbd38b000
readlinkat(AT_FDCWD, "/usr/share/alsa/ucm2/conf.d/simple-card/PinePhone.conf", 0xffffbd38b1b0, 4095) = -1 EINVAL (Invalid argument)
munmap(0xffffbd38b000, 16384)           = 0

See also