2 This file is part of PulseAudio.
4 Copyright 2004-2006 Lennart Poettering
6 PulseAudio is free software; you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as published
8 by the Free Software Foundation; either version 2 of the License,
9 or (at your option) any later version.
11 PulseAudio is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public License
17 along with PulseAudio; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
28 #include <pulse/volume.h>
29 #include <pulse/xmalloc.h>
30 #include <pulse/timeval.h>
32 #include <pulsecore/module.h>
33 #include <pulsecore/client.h>
34 #include <pulsecore/sink.h>
35 #include <pulsecore/source.h>
36 #include <pulsecore/sink-input.h>
37 #include <pulsecore/source-output.h>
38 #include <pulsecore/strbuf.h>
39 #include <pulsecore/sample-util.h>
40 #include <pulsecore/core-scache.h>
41 #include <pulsecore/macro.h>
42 #include <pulsecore/core-util.h>
46 char *pa_module_list_to_string(pa_core
*c
) {
49 uint32_t idx
= PA_IDXSET_INVALID
;
54 pa_strbuf_printf(s
, "%u module(s) loaded.\n", pa_idxset_size(c
->modules
));
56 for (m
= pa_idxset_first(c
->modules
, &idx
); m
; m
= pa_idxset_next(c
->modules
, &idx
)) {
59 pa_strbuf_printf(s
, " index: %u\n"
66 pa_strempty(m
->argument
),
67 pa_module_get_n_used(m
),
68 pa_yes_no(m
->load_once
));
70 t
= pa_proplist_to_string_sep(m
->proplist
, "\n\t\t");
71 pa_strbuf_printf(s
, "\tproperties:\n\t\t%s\n", t
);
75 return pa_strbuf_tostring_free(s
);
78 char *pa_client_list_to_string(pa_core
*c
) {
81 uint32_t idx
= PA_IDXSET_INVALID
;
86 pa_strbuf_printf(s
, "%u client(s) logged in.\n", pa_idxset_size(c
->clients
));
88 for (client
= pa_idxset_first(c
->clients
, &idx
); client
; client
= pa_idxset_next(c
->clients
, &idx
)) {
98 pa_strbuf_printf(s
, "\towner module: %u\n", client
->module
->index
);
100 t
= pa_proplist_to_string_sep(client
->proplist
, "\n\t\t");
101 pa_strbuf_printf(s
, "\tproperties:\n\t\t%s\n", t
);
105 return pa_strbuf_tostring_free(s
);
108 char *pa_card_list_to_string(pa_core
*c
) {
111 uint32_t idx
= PA_IDXSET_INVALID
;
116 pa_strbuf_printf(s
, "%u card(s) available.\n", pa_idxset_size(c
->cards
));
118 for (card
= pa_idxset_first(c
->cards
, &idx
); card
; card
= pa_idxset_next(c
->cards
, &idx
)) {
134 pa_strbuf_printf(s
, "\towner module: %u\n", card
->module
->index
);
136 t
= pa_proplist_to_string_sep(card
->proplist
, "\n\t\t");
137 pa_strbuf_printf(s
, "\tproperties:\n\t\t%s\n", t
);
140 if (card
->profiles
) {
144 pa_strbuf_puts(s
, "\tprofiles:\n");
146 while ((p
= pa_hashmap_iterate(card
->profiles
, &state
, NULL
)))
147 pa_strbuf_printf(s
, "\t\t%s: %s (priority %u)\n", p
->name
, p
->description
, p
->priority
);
150 if (card
->active_profile
)
153 "\tactive profile: <%s>\n",
154 card
->active_profile
->name
);
156 if (!pa_idxset_isempty(card
->sinks
)) {
157 pa_strbuf_puts(s
, "\tsinks:\n");
158 for (sink
= pa_idxset_first(card
->sinks
, &sidx
); sink
; sink
= pa_idxset_next(card
->sinks
, &sidx
))
159 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
)));
162 if (!pa_idxset_isempty(card
->sources
)) {
163 pa_strbuf_puts(s
, "\tsources:\n");
164 for (source
= pa_idxset_first(card
->sources
, &sidx
); source
; source
= pa_idxset_next(card
->sources
, &sidx
))
165 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
)));
169 return pa_strbuf_tostring_free(s
);
172 static const char *sink_state_to_string(pa_sink_state_t state
) {
176 case PA_SINK_RUNNING
:
178 case PA_SINK_SUSPENDED
:
182 case PA_SINK_UNLINKED
:
189 static const char *source_state_to_string(pa_source_state_t state
) {
193 case PA_SOURCE_RUNNING
:
195 case PA_SOURCE_SUSPENDED
:
199 case PA_SOURCE_UNLINKED
:
206 char *pa_sink_list_to_string(pa_core
*c
) {
209 uint32_t idx
= PA_IDXSET_INVALID
;
214 pa_strbuf_printf(s
, "%u sink(s) available.\n", pa_idxset_size(c
->sinks
));
216 for (sink
= pa_idxset_first(c
->sinks
, &idx
); sink
; sink
= pa_idxset_next(c
->sinks
, &idx
)) {
217 char ss
[PA_SAMPLE_SPEC_SNPRINT_MAX
],
218 cv
[PA_CVOLUME_SNPRINT_MAX
],
219 cvdb
[PA_SW_CVOLUME_SNPRINT_DB_MAX
],
220 v
[PA_VOLUME_SNPRINT_MAX
],
221 vdb
[PA_SW_VOLUME_SNPRINT_DB_MAX
],
222 cm
[PA_CHANNEL_MAP_SNPRINT_MAX
], *t
;
223 pa_usec_t min_latency
, max_latency
;
226 cmn
= pa_channel_map_to_pretty_name(&sink
->channel_map
);
228 pa_sink_get_latency_range(sink
, &min_latency
, &max_latency
);
235 "\tflags: %s%s%s%s%s%s\n"
239 "\tbase volume: %s%s%s\n"
241 "\tcurrent latency: %0.2f ms\n"
242 "\tconfigured latency: %0.2f ms; range is %0.2f .. %0.2f ms\n"
243 "\tmax request: %lu KiB\n"
244 "\tmax rewind: %lu KiB\n"
245 "\tmonitor source: %u\n"
246 "\tsample spec: %s\n"
247 "\tchannel map: %s%s%s\n"
250 c
->default_sink_name
&& !strcmp(sink
->name
, c
->default_sink_name
) ? '*' : ' ',
254 sink
->flags
& PA_SINK_HARDWARE
? "HARDWARE " : "",
255 sink
->flags
& PA_SINK_NETWORK
? "NETWORK " : "",
256 sink
->flags
& PA_SINK_HW_MUTE_CTRL
? "HW_MUTE_CTRL " : "",
257 sink
->flags
& PA_SINK_HW_VOLUME_CTRL
? "HW_VOLUME_CTRL " : "",
258 sink
->flags
& PA_SINK_DECIBEL_VOLUME
? "DECIBEL_VOLUME " : "",
259 sink
->flags
& PA_SINK_LATENCY
? "LATENCY " : "",
260 sink_state_to_string(pa_sink_get_state(sink
)),
261 pa_cvolume_snprint(cv
, sizeof(cv
), pa_sink_get_volume(sink
, FALSE
)),
262 sink
->flags
& PA_SINK_DECIBEL_VOLUME
? "\n\t " : "",
263 sink
->flags
& PA_SINK_DECIBEL_VOLUME
? pa_sw_cvolume_snprint_dB(cvdb
, sizeof(cvdb
), pa_sink_get_volume(sink
, FALSE
)) : "",
264 pa_cvolume_get_balance(&sink
->channel_map
, pa_sink_get_volume(sink
, FALSE
)),
265 pa_volume_snprint(v
, sizeof(v
), sink
->base_volume
),
266 sink
->flags
& PA_SINK_DECIBEL_VOLUME
? "\n\t " : "",
267 sink
->flags
& PA_SINK_DECIBEL_VOLUME
? pa_sw_volume_snprint_dB(vdb
, sizeof(vdb
), sink
->base_volume
) : "",
268 pa_yes_no(pa_sink_get_mute(sink
, FALSE
)),
269 (double) pa_sink_get_latency(sink
) / (double) PA_USEC_PER_MSEC
,
270 (double) pa_sink_get_requested_latency(sink
) / (double) PA_USEC_PER_MSEC
,
271 (double) min_latency
/ PA_USEC_PER_MSEC
,
272 (double) max_latency
/ PA_USEC_PER_MSEC
,
273 (unsigned long) pa_sink_get_max_request(sink
) / 1024,
274 (unsigned long) pa_sink_get_max_rewind(sink
) / 1024,
275 sink
->monitor_source
? sink
->monitor_source
->index
: PA_INVALID_INDEX
,
276 pa_sample_spec_snprint(ss
, sizeof(ss
), &sink
->sample_spec
),
277 pa_channel_map_snprint(cm
, sizeof(cm
), &sink
->channel_map
),
280 pa_sink_used_by(sink
),
281 pa_sink_linked_by(sink
));
284 pa_strbuf_printf(s
, "\tcard: %u <%s>\n", sink
->card
->index
, sink
->card
->name
);
286 pa_strbuf_printf(s
, "\tmodule: %u\n", sink
->module
->index
);
288 t
= pa_proplist_to_string_sep(sink
->proplist
, "\n\t\t");
289 pa_strbuf_printf(s
, "\tproperties:\n\t\t%s\n", t
);
293 return pa_strbuf_tostring_free(s
);
296 char *pa_source_list_to_string(pa_core
*c
) {
299 uint32_t idx
= PA_IDXSET_INVALID
;
304 pa_strbuf_printf(s
, "%u source(s) available.\n", pa_idxset_size(c
->sources
));
306 for (source
= pa_idxset_first(c
->sources
, &idx
); source
; source
= pa_idxset_next(c
->sources
, &idx
)) {
307 char ss
[PA_SAMPLE_SPEC_SNPRINT_MAX
],
308 cv
[PA_CVOLUME_SNPRINT_MAX
],
309 cvdb
[PA_SW_CVOLUME_SNPRINT_DB_MAX
],
310 v
[PA_VOLUME_SNPRINT_MAX
],
311 vdb
[PA_SW_VOLUME_SNPRINT_DB_MAX
],
312 cm
[PA_CHANNEL_MAP_SNPRINT_MAX
], *t
;
313 pa_usec_t min_latency
, max_latency
;
316 cmn
= pa_channel_map_to_pretty_name(&source
->channel_map
);
318 pa_source_get_latency_range(source
, &min_latency
, &max_latency
);
325 "\tflags: %s%s%s%s%s%s\n"
329 "\tbase volume: %s%s%s\n"
331 "\tcurrent latency: %0.2f ms\n"
332 "\tconfigured latency: %0.2f ms; range is %0.2f .. %0.2f ms\n"
333 "\tmax rewind: %lu KiB\n"
334 "\tsample spec: %s\n"
335 "\tchannel map: %s%s%s\n"
338 c
->default_source_name
&& !strcmp(source
->name
, c
->default_source_name
) ? '*' : ' ',
342 source
->flags
& PA_SOURCE_HARDWARE
? "HARDWARE " : "",
343 source
->flags
& PA_SOURCE_NETWORK
? "NETWORK " : "",
344 source
->flags
& PA_SOURCE_HW_MUTE_CTRL
? "HW_MUTE_CTRL " : "",
345 source
->flags
& PA_SOURCE_HW_VOLUME_CTRL
? "HW_VOLUME_CTRL " : "",
346 source
->flags
& PA_SOURCE_DECIBEL_VOLUME
? "DECIBEL_VOLUME " : "",
347 source
->flags
& PA_SOURCE_LATENCY
? "LATENCY " : "",
348 source_state_to_string(pa_source_get_state(source
)),
349 pa_cvolume_snprint(cv
, sizeof(cv
), pa_source_get_volume(source
, FALSE
)),
350 source
->flags
& PA_SOURCE_DECIBEL_VOLUME
? "\n\t " : "",
351 source
->flags
& PA_SOURCE_DECIBEL_VOLUME
? pa_sw_cvolume_snprint_dB(cvdb
, sizeof(cvdb
), pa_source_get_volume(source
, FALSE
)) : "",
352 pa_cvolume_get_balance(&source
->channel_map
, pa_source_get_volume(source
, FALSE
)),
353 pa_volume_snprint(v
, sizeof(v
), source
->base_volume
),
354 source
->flags
& PA_SOURCE_DECIBEL_VOLUME
? "\n\t " : "",
355 source
->flags
& PA_SOURCE_DECIBEL_VOLUME
? pa_sw_volume_snprint_dB(vdb
, sizeof(vdb
), source
->base_volume
) : "",
356 pa_yes_no(pa_source_get_mute(source
, FALSE
)),
357 (double) pa_source_get_latency(source
) / PA_USEC_PER_MSEC
,
358 (double) pa_source_get_requested_latency(source
) / PA_USEC_PER_MSEC
,
359 (double) min_latency
/ PA_USEC_PER_MSEC
,
360 (double) max_latency
/ PA_USEC_PER_MSEC
,
361 (unsigned long) pa_source_get_max_rewind(source
) / 1024,
362 pa_sample_spec_snprint(ss
, sizeof(ss
), &source
->sample_spec
),
363 pa_channel_map_snprint(cm
, sizeof(cm
), &source
->channel_map
),
366 pa_source_used_by(source
),
367 pa_source_linked_by(source
));
369 if (source
->monitor_of
)
370 pa_strbuf_printf(s
, "\tmonitor_of: %u\n", source
->monitor_of
->index
);
372 pa_strbuf_printf(s
, "\tcard: %u <%s>\n", source
->card
->index
, source
->card
->name
);
374 pa_strbuf_printf(s
, "\tmodule: %u\n", source
->module
->index
);
376 t
= pa_proplist_to_string_sep(source
->proplist
, "\n\t\t");
377 pa_strbuf_printf(s
, "\tproperties:\n\t\t%s\n", t
);
381 return pa_strbuf_tostring_free(s
);
385 char *pa_source_output_list_to_string(pa_core
*c
) {
388 uint32_t idx
= PA_IDXSET_INVALID
;
389 static const char* const state_table
[] = {
390 [PA_SOURCE_OUTPUT_INIT
] = "INIT",
391 [PA_SOURCE_OUTPUT_RUNNING
] = "RUNNING",
392 [PA_SOURCE_OUTPUT_CORKED
] = "CORKED",
393 [PA_SOURCE_OUTPUT_UNLINKED
] = "UNLINKED"
399 pa_strbuf_printf(s
, "%u source outputs(s) available.\n", pa_idxset_size(c
->source_outputs
));
401 for (o
= pa_idxset_first(c
->source_outputs
, &idx
); o
; o
= pa_idxset_next(c
->source_outputs
, &idx
)) {
402 char ss
[PA_SAMPLE_SPEC_SNPRINT_MAX
], cm
[PA_CHANNEL_MAP_SNPRINT_MAX
], *t
, clt
[28];
406 cmn
= pa_channel_map_to_pretty_name(&o
->channel_map
);
408 if ((cl
= pa_source_output_get_requested_latency(o
)) == (pa_usec_t
) -1)
409 pa_snprintf(clt
, sizeof(clt
), "n/a");
411 pa_snprintf(clt
, sizeof(clt
), "%0.2f ms", (double) cl
/ PA_USEC_PER_MSEC
);
413 pa_assert(o
->source
);
419 "\tflags: %s%s%s%s%s%s%s%s\n"
421 "\tsource: %u <%s>\n"
422 "\tcurrent latency: %0.2f ms\n"
423 "\trequested latency: %s\n"
424 "\tsample spec: %s\n"
425 "\tchannel map: %s%s%s\n"
426 "\tresample method: %s\n",
429 o
->flags
& PA_SOURCE_OUTPUT_VARIABLE_RATE
? "VARIABLE_RATE " : "",
430 o
->flags
& PA_SOURCE_OUTPUT_DONT_MOVE
? "DONT_MOVE " : "",
431 o
->flags
& PA_SOURCE_OUTPUT_START_CORKED
? "START_CORKED " : "",
432 o
->flags
& PA_SOURCE_OUTPUT_NO_REMAP
? "NO_REMAP " : "",
433 o
->flags
& PA_SOURCE_OUTPUT_NO_REMIX
? "NO_REMIX " : "",
434 o
->flags
& PA_SOURCE_OUTPUT_FIX_FORMAT
? "FIX_FORMAT " : "",
435 o
->flags
& PA_SOURCE_OUTPUT_FIX_RATE
? "FIX_RATE " : "",
436 o
->flags
& PA_SOURCE_OUTPUT_FIX_CHANNELS
? "FIX_CHANNELS " : "",
437 state_table
[pa_source_output_get_state(o
)],
438 o
->source
->index
, o
->source
->name
,
439 (double) pa_source_output_get_latency(o
, NULL
) / PA_USEC_PER_MSEC
,
441 pa_sample_spec_snprint(ss
, sizeof(ss
), &o
->sample_spec
),
442 pa_channel_map_snprint(cm
, sizeof(cm
), &o
->channel_map
),
445 pa_resample_method_to_string(pa_source_output_get_resample_method(o
)));
447 pa_strbuf_printf(s
, "\towner module: %u\n", o
->module
->index
);
449 pa_strbuf_printf(s
, "\tclient: %u <%s>\n", o
->client
->index
, pa_strnull(pa_proplist_gets(o
->client
->proplist
, PA_PROP_APPLICATION_NAME
)));
450 if (o
->direct_on_input
)
451 pa_strbuf_printf(s
, "\tdirect on input: %u\n", o
->direct_on_input
->index
);
453 t
= pa_proplist_to_string_sep(o
->proplist
, "\n\t\t");
454 pa_strbuf_printf(s
, "\tproperties:\n\t\t%s\n", t
);
458 return pa_strbuf_tostring_free(s
);
461 char *pa_sink_input_list_to_string(pa_core
*c
) {
464 uint32_t idx
= PA_IDXSET_INVALID
;
465 static const char* const state_table
[] = {
466 [PA_SINK_INPUT_INIT
] = "INIT",
467 [PA_SINK_INPUT_RUNNING
] = "RUNNING",
468 [PA_SINK_INPUT_DRAINED
] = "DRAINED",
469 [PA_SINK_INPUT_CORKED
] = "CORKED",
470 [PA_SINK_INPUT_UNLINKED
] = "UNLINKED"
476 pa_strbuf_printf(s
, "%u sink input(s) available.\n", pa_idxset_size(c
->sink_inputs
));
478 for (i
= pa_idxset_first(c
->sink_inputs
, &idx
); i
; i
= pa_idxset_next(c
->sink_inputs
, &idx
)) {
479 char ss
[PA_SAMPLE_SPEC_SNPRINT_MAX
], cvdb
[PA_SW_CVOLUME_SNPRINT_DB_MAX
], cv
[PA_CVOLUME_SNPRINT_MAX
], cm
[PA_CHANNEL_MAP_SNPRINT_MAX
], *t
, clt
[28];
483 cmn
= pa_channel_map_to_pretty_name(&i
->channel_map
);
485 if ((cl
= pa_sink_input_get_requested_latency(i
)) == (pa_usec_t
) -1)
486 pa_snprintf(clt
, sizeof(clt
), "n/a");
488 pa_snprintf(clt
, sizeof(clt
), "%0.2f ms", (double) cl
/ PA_USEC_PER_MSEC
);
496 "\tflags: %s%s%s%s%s%s%s%s\n"
503 "\tcurrent latency: %0.2f ms\n"
504 "\trequested latency: %s\n"
505 "\tsample spec: %s\n"
506 "\tchannel map: %s%s%s\n"
507 "\tresample method: %s\n",
510 i
->flags
& PA_SINK_INPUT_VARIABLE_RATE
? "VARIABLE_RATE " : "",
511 i
->flags
& PA_SINK_INPUT_DONT_MOVE
? "DONT_MOVE " : "",
512 i
->flags
& PA_SINK_INPUT_START_CORKED
? "START_CORKED " : "",
513 i
->flags
& PA_SINK_INPUT_NO_REMAP
? "NO_REMAP " : "",
514 i
->flags
& PA_SINK_INPUT_NO_REMIX
? "NO_REMIX " : "",
515 i
->flags
& PA_SINK_INPUT_FIX_FORMAT
? "FIX_FORMAT " : "",
516 i
->flags
& PA_SINK_INPUT_FIX_RATE
? "FIX_RATE " : "",
517 i
->flags
& PA_SINK_INPUT_FIX_CHANNELS
? "FIX_CHANNELS " : "",
518 state_table
[pa_sink_input_get_state(i
)],
519 i
->sink
->index
, i
->sink
->name
,
520 pa_cvolume_snprint(cv
, sizeof(cv
), pa_sink_input_get_volume(i
)),
521 pa_sw_cvolume_snprint_dB(cvdb
, sizeof(cvdb
), pa_sink_input_get_volume(i
)),
522 pa_cvolume_get_balance(&i
->channel_map
, pa_sink_input_get_volume(i
)),
523 pa_yes_no(pa_sink_input_get_mute(i
)),
524 (double) pa_sink_input_get_latency(i
, NULL
) / PA_USEC_PER_MSEC
,
526 pa_sample_spec_snprint(ss
, sizeof(ss
), &i
->sample_spec
),
527 pa_channel_map_snprint(cm
, sizeof(cm
), &i
->channel_map
),
530 pa_resample_method_to_string(pa_sink_input_get_resample_method(i
)));
533 pa_strbuf_printf(s
, "\tmodule: %u\n", i
->module
->index
);
535 pa_strbuf_printf(s
, "\tclient: %u <%s>\n", i
->client
->index
, pa_strnull(pa_proplist_gets(i
->client
->proplist
, PA_PROP_APPLICATION_NAME
)));
537 t
= pa_proplist_to_string_sep(i
->proplist
, "\n\t\t");
538 pa_strbuf_printf(s
, "\tproperties:\n\t\t%s\n", t
);
542 return pa_strbuf_tostring_free(s
);
545 char *pa_scache_list_to_string(pa_core
*c
) {
551 pa_strbuf_printf(s
, "%u cache entrie(s) available.\n", c
->scache
? pa_idxset_size(c
->scache
) : 0);
555 uint32_t idx
= PA_IDXSET_INVALID
;
557 for (e
= pa_idxset_first(c
->scache
, &idx
); e
; e
= pa_idxset_next(c
->scache
, &idx
)) {
559 char ss
[PA_SAMPLE_SPEC_SNPRINT_MAX
] = "n/a", cv
[PA_CVOLUME_SNPRINT_MAX
], cvdb
[PA_SW_CVOLUME_SNPRINT_DB_MAX
], cm
[PA_CHANNEL_MAP_SNPRINT_MAX
] = "n/a", *t
;
562 cmn
= pa_channel_map_to_pretty_name(&e
->channel_map
);
564 if (e
->memchunk
.memblock
) {
565 pa_sample_spec_snprint(ss
, sizeof(ss
), &e
->sample_spec
);
566 pa_channel_map_snprint(cm
, sizeof(cm
), &e
->channel_map
);
567 l
= (double) e
->memchunk
.length
/ (double) pa_bytes_per_second(&e
->sample_spec
);
574 "\tsample spec: %s\n"
575 "\tchannel map: %s%s%s\n"
577 "\tduration: %0.1f s\n"
582 "\tfilename: <%s>\n",
589 (long unsigned)(e
->memchunk
.memblock
? e
->memchunk
.length
: 0),
591 pa_cvolume_snprint(cv
, sizeof(cv
), &e
->volume
),
592 pa_sw_cvolume_snprint_dB(cvdb
, sizeof(cvdb
), &e
->volume
),
593 e
->memchunk
.memblock
? pa_cvolume_get_balance(&e
->channel_map
, &e
->volume
) : 0.0f
,
595 e
->filename
? e
->filename
: "n/a");
597 t
= pa_proplist_to_string_sep(e
->proplist
, "\n\t\t");
598 pa_strbuf_printf(s
, "\tproperties:\n\t\t%s\n", t
);
603 return pa_strbuf_tostring_free(s
);
606 char *pa_full_status_string(pa_core
*c
) {
612 for (i
= 0; i
< 8; i
++) {
617 t
= pa_sink_list_to_string(c
);
620 t
= pa_source_list_to_string(c
);
623 t
= pa_sink_input_list_to_string(c
);
626 t
= pa_source_output_list_to_string(c
);
629 t
= pa_client_list_to_string(c
);
632 t
= pa_card_list_to_string(c
);
635 t
= pa_module_list_to_string(c
);
638 t
= pa_scache_list_to_string(c
);
642 pa_strbuf_puts(s
, t
);
646 return pa_strbuf_tostring_free(s
);