From: Luiz Augusto von Dentz <[email protected]>

If the profile available flag is set to PA_AVAILABLE_NO it means the
profile shall not be use.
---
 src/pulsecore/card.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/pulsecore/card.c b/src/pulsecore/card.c
index e6e0836..ba2222e 100644
--- a/src/pulsecore/card.c
+++ b/src/pulsecore/card.c
@@ -195,9 +195,13 @@ pa_card *pa_card_new(pa_core *core, pa_card_new_data 
*data) {
             c->save_profile = data->save_profile;
 
     if (!c->active_profile) {
-        PA_HASHMAP_FOREACH(profile, c->profiles, state)
+        PA_HASHMAP_FOREACH(profile, c->profiles, state) {
+            if (profile->available == PA_AVAILABLE_NO)
+                continue;
+
             if (!c->active_profile || profile->priority > 
c->active_profile->priority)
                 c->active_profile = profile;
+        }
     }
 
     c->userdata = NULL;
-- 
1.8.3.1

_______________________________________________
pulseaudio-discuss mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

Reply via email to