Opened 3 months ago

Closed 3 months ago

#15455 closed enhancement (fixed)

bootscripts: ALSA - unable to restore volumes on startup

Reported by: Douglas R. Reno Owned by: Bruce Dubbs
Priority: normal Milestone: 11.0
Component: BOOK Version: git
Severity: normal Keywords:
Cc:

Description

I discovered this when I rebooted my SysV system this morning. Note that this is a GIT system prior to when we froze for 11.1. I get the following error when ALSA attempts to start:

Starting ALSA... Restoring volumes...alsa-lib parser.c:2372:(load_toplevel_config) Unable to find the top-level configuration file '/usr/share/alsa/ucm2/ucm.conf'.

alsa-lib main.c:1405:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2

  • [ OK ]

We might just need to add alsa-usm-conf (http://www.alsa-project.org/files/pub/lib/alsa-ucm-conf-1.2.5.1.tar.bz2) to the book, but if that's the case, we can wait until 11.1 if needed.

Change History (7)

comment:1 by Bruce Dubbs, 3 months ago

I checked out building with --disable-ucm, but it failed:

/usr/bin/ld: control/.libs/libcontrol.a(control.o): in function `snd_ctl_open':
/build/alsa-lib/alsa-lib-1.2.5.1/src/control/control.c:1524: undefined reference to `uc_mgr_alibcfg_by_device'
/usr/bin/ld: pcm/.libs/libpcm.a(pcm.o): in function `snd_pcm_open':
/build/alsa-lib/alsa-lib-1.2.5.1/src/pcm/pcm.c:2690: undefined reference to `uc_mgr_alibcfg_by_device'
/usr/bin/ld: timer/.libs/libtimer.a(timer.o): in function `snd_timer_open':
/build/alsa-lib/alsa-lib-1.2.5.1/src/timer/timer.c:209: undefined reference to `uc_mgr_alibcfg_by_device'
/usr/bin/ld: rawmidi/.libs/librawmidi.a(rawmidi.o): in function `snd_rawmidi_open':
/build/alsa-lib/alsa-lib-1.2.5.1/src/rawmidi/rawmidi.c:308: undefined reference to `uc_mgr_alibcfg_by_device'
/usr/bin/ld: seq/.libs/libseq.a(seq.o): in function `snd_seq_open':
/build/alsa-lib/alsa-lib-1.2.5.1/src/seq/seq.c:982: undefined reference to `uc_mgr_alibcfg_by_device

So my alternative was to:

sudo mkdir -p /usr/share/alsa/ucm2
sudo touch /usr/share/alsa/ucm2/ucm.conf

I then rebooted and it I did not see any error messages.

comment:2 by ken@…, 3 months ago

Some reports on gurgle over the last year or two, https://github.com/alsa-project/alsa-utils/issues/101 looks relevant, final comment "UCM is used all time now even if the configuration is not present or partial (second case / error). The error is harmless for the legacy hardware. It's a dup of https://github.com/alsa-project/alsa-lib/issues/159 "

However, I've just rebooted one of my sysv machines after listening to audio, did not get any error messages. It appears that not everyone is affected (I'm using the analogue audio).

comment:3 by Douglas R. Reno, 3 months ago

renodr [ /sources ]$ sudo /etc/init.d/alsa start                                                      
      Starting ALSA...    Restoring volumes...alsa-lib parser.c:2311:(parse_toplevel_config) Syntax fi
eld not found in /usr/share/alsa/ucm2/ucm.conf                                                        
alsa-lib main.c:1405:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -22
  *                                                                                          [  OK  ]

I'm using analog audio as well on this machine. It's AMD based, and uses the IDT HD Audio codec

comment:4 by thomas, 3 months ago

In the referred ticket 159, there is a comment

If you don't like those messages, add -U or --no-ucm parameter to the alsactl call in your systemd service.

With this i get

root@lfs-x86_64:~$ alsactl restore
alsa-lib parser.c:2372:(load_toplevel_config) Unable to find the top-level configuration file '/usr/share/alsa/ucm2/ucm.conf'.
alsa-lib main.c:1405:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2
root@lfs-x86_64:~$ alsactl -U restore
root@lfs-x86_64:~$ 

Looks like the -U/--no-ucm hides the error message. If i interpret this right, the -U (added to the bootscript) will make the alsa-ucm-conf-1.2.5.1.tar.bz2 optional.

in reply to:  4 comment:5 by Douglas R. Reno, 3 months ago

Replying to thomas:

In the referred ticket 159, there is a comment

If you don't like those messages, add -U or --no-ucm parameter to the alsactl call in your systemd service.

With this i get

root@lfs-x86_64:~$ alsactl restore
alsa-lib parser.c:2372:(load_toplevel_config) Unable to find the top-level configuration file '/usr/share/alsa/ucm2/ucm.conf'.
alsa-lib main.c:1405:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2
root@lfs-x86_64:~$ alsactl -U restore
root@lfs-x86_64:~$ 

Looks like the -U/--no-ucm hides the error message. If i interpret this right, the -U (added to the bootscript) will make the alsa-ucm-conf-1.2.5.1.tar.bz2 optional.

I'll definitely take a look at using that instead

comment:6 by Bruce Dubbs, 3 months ago

Owner: changed from blfs-book to Bruce Dubbs
Status: newassigned

Will add --no-ucm to the alsa bootscript.

comment:7 by Bruce Dubbs, 3 months ago

Resolution: fixed
Status: assignedclosed

Fixed at blfs-bootscripts commit 184bf92b62a56b2200819a3c90d7fab5d342996b

Note: See TracTickets for help on using tickets.