[pulseaudio-discuss] [PATCH v5 6/6] pactl: Print card port properties with the "list" command.

Tanu Kaskinen tanu.kaskinen at digia.com
Fri Apr 13 04:48:30 PDT 2012


---
 src/utils/pactl.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/utils/pactl.c b/src/utils/pactl.c
index 05a1519..9eaf5ed 100644
--- a/src/utils/pactl.c
+++ b/src/utils/pactl.c
@@ -570,6 +570,8 @@ static void get_card_info_callback(pa_context *c, const pa_card_info *i, int is_
            i->owner_module != PA_INVALID_INDEX ? t : _("n/a"),
            pl = pa_proplist_to_string_sep(i->proplist, "\n\t\t"));
 
+    pa_xfree(pl);
+
     if (i->profiles) {
         pa_card_profile_info *p;
 
@@ -591,6 +593,11 @@ static void get_card_info_callback(pa_context *c, const pa_card_info *i, int is_
             printf(_("\t\t%s: %s (priority: %u%s)\n"), (*p)->name, (*p)->description, (*p)->priority,
                 get_available_str_ynonly((*p)->available));
 
+            if (!pa_proplist_isempty((*p)->proplist)) {
+                printf(_("\t\t\tProperties:\n\t\t\t\t%s\n"), pl = pa_proplist_to_string_sep((*p)->proplist, "\n\t\t\t\t"));
+                pa_xfree(pl);
+            }
+
             if (pr) {
                 printf(_("\t\t\tPart of profile(s): %s"), pa_strnull((*pr)->name));
                 pr++;
@@ -602,8 +609,6 @@ static void get_card_info_callback(pa_context *c, const pa_card_info *i, int is_
             }
         }
     }
-
-    pa_xfree(pl);
 }
 
 static void get_sink_input_info_callback(pa_context *c, const pa_sink_input_info *i, int is_last, void *userdata) {
-- 
1.7.10



More information about the pulseaudio-discuss mailing list