- char *buf;
- PARA_INFO_LOG("dumping alsa configuration\n");
- snd_pcm_dump(pad->handle, log);
- snd_output_buffer_string(log, &buf);
- for (;;) {
- char *p = strchr(buf, '\n');
- if (!p) /* omit last output line, it's empty */
+ char *buf, *p;
+ size_t sz;
+ PARA_DEBUG_LOG("dumping alsa configuration\n");
+ snd_pcm_dump(pad->handle, output_log);
+ snd_pcm_hw_params_dump(hwparams, output_log);
+ sz = snd_output_buffer_string(output_log, &buf);
+ for (p = buf; p < buf + sz;) {
+ char *q = memchr(p, '\n', buf + sz - p);
+ if (!q)