Opened 20 months ago
Closed 20 months ago
#18530 closed defect (fixed)
alsactl init exits with non zero error code
Reported by: | pierre | Owned by: | pierre |
---|---|---|---|
Priority: | normal | Milestone: | 12.1 |
Component: | BOOK | Version: | git |
Severity: | normal | Keywords: | |
Cc: |
Description ¶
Commit a0da9419fd has added the alsactl init
instruction for setting up sound cards, but now I get:
pierre [ ~ ]$ sudo alsactl init alsa-lib parser.c:2783:(load_toplevel_config) Unable to find the top-level configuration file '/usr/share/alsa/ucm2/ucm.conf'. alsa-lib main.c:1560:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2 Found hardware: "HDA-Intel" "Intel Haswell HDMI" "HDA:80862807,80860101,00100000" "0x1043" "0x8534" Hardware is initialized using a generic method alsa-lib parser.c:2783:(load_toplevel_config) Unable to find the top-level configuration file '/usr/share/alsa/ucm2/ucm.conf'. alsa-lib main.c:1560:(snd_use_case_mgr_open) error: failed to import hw:1 use case configuration -2 Found hardware: "HDA-Intel" "Realtek ALC887-VD" "HDA:10ec0887,10438616,00100302" "0x1043" "0x8616" Hardware is initialized using a generic method pierre [ ~ ]$ echo $? 99
Note that it is not a problem with ucm2 configuration not found: if I run alsactl --no‐ucm init
, I get:
pierre [ ~/downloads/blfs ]$ sudo alsactl --no-ucm init Found hardware: "HDA-Intel" "Intel Haswell HDMI" "HDA:80862807,80860101,00100000" "0x1043" "0x8534" Hardware is initialized using a generic method Found hardware: "HDA-Intel" "Realtek ALC887-VD" "HDA:10ec0887,10438616,00100302" "0x1043" "0x8616" Hardware is initialized using a generic method pierre [ ~/downloads/blfs ]$ echo $? 99
I think a lot of cards can use a "generic method", and don't need to be recognized, so that a 99 error code is normal for them. But it breaks scripts running with set -e
Change History (11)
follow-up: 3 comment:1 by , 20 months ago
comment:2 by , 20 months ago
Summary: | alsactl init exits with non sero error code → alsactl init exits with non zero error code |
---|
follow-up: 4 comment:3 by , 20 months ago
Replying to pierre:
Not sure what the best approach is. Maybe just add
|| true
, but somebody may come with a better idea...
|| [ $? = 99 ]
?
comment:4 by , 20 months ago
follow-up: 6 comment:5 by , 20 months ago
Just add a note to explain the issue. It only comes up in a script so it really is not a big deal for the book.
follow-up: 7 comment:6 by , 20 months ago
Replying to Bruce Dubbs:
Just add a note to explain the issue. It only comes up in a script so it really is not a big deal for the book.
But it breaks jhalfs...
follow-up: 9 comment:7 by , 20 months ago
Replying to pierre:
Replying to Bruce Dubbs:
Just add a note to explain the issue. It only comes up in a script so it really is not a big deal for the book.
But it breaks jhalfs...
Could we make it nodump?
follow-up: 10 comment:8 by , 20 months ago
Can jhalfs handle multiple roles: 'role="root alfs"' and add what is needed for that role?
comment:9 by , 20 months ago
Replying to Xi Ruoyao:
Replying to pierre:
Replying to Bruce Dubbs:
Just add a note to explain the issue. It only comes up in a script so it really is not a big deal for the book.
But it breaks jhalfs...
Could we make it nodump?
I suppose this is the simplest.
comment:10 by , 20 months ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Replying to Bruce Dubbs:
Can jhalfs handle multiple roles: 'role="root alfs"' and add what is needed for that role?
It could, but it's not yet written :) Not sure what you are thinking of for this case.
Anyway, I'll make the instruction "nodump", and add a sentence explaining that the command may return error code 99, although the cards a re correctly initialized.
Not sure what the best approach is. Maybe just add
|| true
, but somebody may come with a better idea...