mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-27 07:35:57 -05:00
[alsa] Some extra logging for debugging
This commit is contained in:
parent
abce1d0eeb
commit
5f3578ec65
@ -86,6 +86,8 @@ laudio_alsa_xrun_recover(int err)
|
||||
/* Buffer underrun */
|
||||
if (err == -EPIPE)
|
||||
{
|
||||
DPRINTF(E_WARN, L_LAUDIO, "PCM buffer underrun\n");
|
||||
|
||||
pcm_last_error = 0;
|
||||
|
||||
ret = snd_pcm_prepare(hdl);
|
||||
@ -343,6 +345,8 @@ laudio_alsa_set_volume(int vol)
|
||||
static int
|
||||
laudio_alsa_start(uint64_t cur_pos, uint64_t next_pkt)
|
||||
{
|
||||
snd_output_t *output;
|
||||
char *debug_pcm_cfg;
|
||||
int ret;
|
||||
|
||||
ret = snd_pcm_prepare(hdl);
|
||||
@ -382,6 +386,19 @@ laudio_alsa_start(uint64_t cur_pos, uint64_t next_pkt)
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Dump PCM config data for E_DBG logging
|
||||
ret = snd_output_buffer_open(&output);
|
||||
if (ret == 0)
|
||||
{
|
||||
if (snd_pcm_dump_setup(hdl, output) == 0)
|
||||
{
|
||||
snd_output_buffer_string(output, &debug_pcm_cfg);
|
||||
DPRINTF(E_DBG, L_LAUDIO, "Dump of sound device config:\n%s\n", debug_pcm_cfg);
|
||||
}
|
||||
|
||||
snd_output_close(output);
|
||||
}
|
||||
|
||||
update_status(LAUDIO_STARTED);
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user