diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-06-17 23:40:46 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-06-17 23:40:46 +0200 |
commit | 75256fb671b6ae8d784e0d6415d292fdbc6482c2 (patch) | |
tree | 8565ea63591aa3b1b6f242c6883c5505e072166b /src/utils | |
parent | 46b8ca21d1ef56df298cfa9412e73fdf17cbea49 (diff) |
pactl: show list of supported ports
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/pactl.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/utils/pactl.c b/src/utils/pactl.c index 1ae15c75..c8c3a437 100644 --- a/src/utils/pactl.c +++ b/src/utils/pactl.c @@ -254,6 +254,18 @@ static void get_sink_info_callback(pa_context *c, const pa_sink_info *i, int is_ pl = pa_proplist_to_string_sep(i->proplist, "\n\t\t")); pa_xfree(pl); + + if (i->ports) { + pa_sink_port_info **p; + + printf(_("\tPorts:\n")); + for (p = i->ports; *p; p++) + printf("\t\t%s: %s (priority. %u)\n", (*p)->name, (*p)->description, (*p)->priority); + } + + if (i->active_port) + printf(_("\tActive Port: %s\n"), + i->active_port->name); } static void get_source_info_callback(pa_context *c, const pa_source_info *i, int is_last, void *userdata) { @@ -334,6 +346,18 @@ static void get_source_info_callback(pa_context *c, const pa_source_info *i, int pl = pa_proplist_to_string_sep(i->proplist, "\n\t\t")); pa_xfree(pl); + + if (i->ports) { + pa_source_port_info **p; + + printf(_("\tPorts:\n")); + for (p = i->ports; *p; p++) + printf("\t\t%s: %s (priority. %u)\n", (*p)->name, (*p)->description, (*p)->priority); + } + + if (i->active_port) + printf(_("\tActive Port: %s\n"), + i->active_port->name); } static void get_module_info_callback(pa_context *c, const pa_module_info *i, int is_last, void *userdata) { |