mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
card-restore: don't restore unavailable profiles
This commit is contained in:
parent
33e31b5b70
commit
d65974d850
1 changed files with 6 additions and 2 deletions
|
|
@ -561,8 +561,12 @@ static pa_hook_result_t card_choose_initial_profile_callback(pa_core *core, pa_c
|
||||||
|
|
||||||
profile = pa_hashmap_get(card->profiles, e->profile);
|
profile = pa_hashmap_get(card->profiles, e->profile);
|
||||||
if (profile) {
|
if (profile) {
|
||||||
|
if (profile->available != PA_AVAILABLE_NO) {
|
||||||
pa_log_info("Restoring profile '%s' for card %s.", profile->name, card->name);
|
pa_log_info("Restoring profile '%s' for card %s.", profile->name, card->name);
|
||||||
pa_card_set_profile(card, profile, true);
|
pa_card_set_profile(card, profile, true);
|
||||||
|
} else
|
||||||
|
pa_log_debug("Not restoring profile %s for card %s, because the profile is currently unavailable.",
|
||||||
|
profile->name, card->name);
|
||||||
} else {
|
} else {
|
||||||
pa_log_debug("Tried to restore profile %s for card %s, but the card doesn't have such profile.",
|
pa_log_debug("Tried to restore profile %s for card %s, but the card doesn't have such profile.",
|
||||||
e->profile, card->name);
|
e->profile, card->name);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue