[pulseaudio-discuss] [PATCH 1/7] card: Log availability status when choosing initial profile

João Paulo Rechi Vita jprvita at gmail.com
Wed Aug 8 03:39:18 UTC 2018


---
 src/pulsecore/card.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/pulsecore/card.c b/src/pulsecore/card.c
index bc5b75b04..c785f00a7 100644
--- a/src/pulsecore/card.c
+++ b/src/pulsecore/card.c
@@ -186,7 +186,10 @@ void pa_card_choose_initial_profile(pa_card *card) {
      * or if all profiles are unavailable, pick the profile with the highest
      * priority regardless of its availability. */
 
+    pa_log_debug("Looking for initial profile for card %s", card->name);
     PA_HASHMAP_FOREACH(profile, card->profiles, state) {
+        pa_log_debug("profile %s availability %s", profile->name, profile->available == PA_AVAILABLE_YES ? "yes" :
+                                                                  profile->available == PA_AVAILABLE_NO ? "no" : "unknown");
         if (profile->available == PA_AVAILABLE_NO)
             continue;
 
@@ -195,6 +198,7 @@ void pa_card_choose_initial_profile(pa_card *card) {
     }
 
     if (!best) {
+        pa_log_info("No profile with availability status 'yes' or 'unknown' found for card %s", card->name);
         PA_HASHMAP_FOREACH(profile, card->profiles, state) {
             if (!best || profile->priority > best->priority)
                 best = profile;
@@ -202,6 +206,7 @@ void pa_card_choose_initial_profile(pa_card *card) {
     }
     pa_assert(best);
 
+    pa_log_debug("Initial profile %s chosen for card %s", best->name, card->name);
     card->active_profile = best;
     card->save_profile = false;
 
-- 
2.18.0



More information about the pulseaudio-discuss mailing list