Sound card unusable due to using profile off
I have a computer with three sound cards:
> cat /proc/asound/cards
0 [HDMI ]: HDA-Intel - HDA ATI HDMI
HDA ATI HDMI at 0xfe860000 irq 92
1 [Generic ]: HDA-Intel - HD-Audio Generic
HD-Audio Generic at 0xfe700000 irq 94
2 [USB ]: USB-Audio - Scarlett 2i2 USB
Focusrite Scarlett 2i2 USB at usb-0000:27:00.3-4, high speed
I can't use the Scarlett card with releases 0.3.11 and 0.3.12. It doesn't appear in Carla or pulsemixer. I've bisected and found the first bad commit:
commit 6e339200afbec038278516a5a01f4865af6172d7 (HEAD, refs/bisect/bad)
Author: Wim Taymans <wtaymans@redhat.com>
Date: Wed Sep 9 14:08:15 2020 +0200
acp: improve port and profile index select
Keep 3 options, the available ports, unknown and highest priority
other ports.
Looking at the log, the issue is caused by the card having the off (0)
profile:
[I][000123541.151798][acp.c:1071 acp_card_set_profile()] active_profile: off (0)
Debugging a bit in acp_card_find_best_profile_index
, it seems that this card gets 4 candidate profiles:
-
off (0)
which isACP_AVAILABLE_YES
-
output:analog-stereo+input:analog-stereo (1)
which isACP_AVAILABLE_UNKNOWN
-
output:analog-stereo (2)
which isACP_AVAILABLE_UNKNOWN
-
input:analog-stereo (3)
which isACP_AVAILABLE_UNKNOWN
Before the offending commit, profile off (0)
would go in best
and then profile output:analog-stereo+input:analog-stereo (1)
would overwrite it in the next loop iteration because (I guess) it has higher priority, and be returned.
After the offending commit, profile off (0)
goes in best
and then profile output:analog-stereo+input:analog-stereo (1)
goes in best3
. Two iterations later the loop ends and as best
isn't ACP_INVALID_INDEX
, profile off (0)
is returned.
Note that I don't know why those profiles have ACP_AVAILABLE_UNKNOWN
. If the change in behavior was intended, is there a way to make these profiles have ACP_AVAILABLE_YES
?
Attached, the logs, with debug level 5, at the offending commit and the previous one.
pipewire_0.3.10+5f38562d38e72fa76f8dfe7e1bd1ead853f82ce8.log.5
pipewire_0.3.10+6e339200afbec038278516a5a01f4865af6172d7.log.5