summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-01-23 22:30:31 +0100
committerLennart Poettering <lennart@poettering.net>2009-01-23 22:30:31 +0100
commitd5e088ded7a6d9cf19b3dbc88ff2b73601896202 (patch)
tree1877260abcf621019668adf8cbcf10f5d3de9e5f
parent967c17a1900b7547e471c9f1399107fc8287fcdc (diff)
include list of sinks/source in card dump
-rw-r--r--src/pulsecore/cli-text.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/pulsecore/cli-text.c b/src/pulsecore/cli-text.c
index 947598b5..1a3778a0 100644
--- a/src/pulsecore/cli-text.c
+++ b/src/pulsecore/cli-text.c
@@ -117,6 +117,10 @@ char *pa_card_list_to_string(pa_core *c) {
for (card = pa_idxset_first(c->cards, &idx); card; card = pa_idxset_next(c->cards, &idx)) {
char *t;
+ pa_sink *sink;
+ pa_source *source;
+ uint32_t sidx;
+
pa_strbuf_printf(
s,
" index: %u\n"
@@ -137,9 +141,7 @@ char *pa_card_list_to_string(pa_core *c) {
pa_card_profile *p;
void *state = NULL;
- pa_strbuf_puts(
- s,
- "\tprofiles:\n");
+ pa_strbuf_puts(s, "\tprofiles:\n");
while ((p = pa_hashmap_iterate(card->profiles, &state, NULL)))
pa_strbuf_printf(s, "\t\t%s: %s (priority %u)\n", p->name, p->description, p->priority);
@@ -150,6 +152,18 @@ char *pa_card_list_to_string(pa_core *c) {
s,
"\tactive profile: <%s>\n",
card->active_profile->name);
+
+ if (!pa_idxset_isempty(card->sinks)) {
+ pa_strbuf_puts(s, "\tsinks:\n");
+ for (sink = pa_idxset_first(card->sinks, &sidx); sink; sink = pa_idxset_next(card->sinks, &sidx))
+ pa_strbuf_printf(s, "\t\t%s/#%u: %s\n", sink->name, sink->index, pa_strna(pa_proplist_gets(sink->proplist, PA_PROP_DEVICE_DESCRIPTION)));
+ }
+
+ if (!pa_idxset_isempty(card->sources)) {
+ pa_strbuf_puts(s, "\tsources:\n");
+ for (source = pa_idxset_first(card->sources, &sidx); source; source = pa_idxset_next(card->sources, &sidx))
+ pa_strbuf_printf(s, "\t\t%s/#%u: %s\n", source->name, source->index, pa_strna(pa_proplist_gets(source->proplist, PA_PROP_DEVICE_DESCRIPTION)));
+ }
}
return pa_strbuf_tostring_free(s);