+
+ if (card->profiles) {
+ pa_card_profile *p;
+ void *state = NULL;
+
+ 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);
+ }
+
+ if (card->active_profile)
+ pa_strbuf_printf(
+ 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)));
+ }