aboutsummaryrefslogtreecommitdiffhomepage
path: root/audio
diff options
context:
space:
mode:
authorGravatar Jan Ekström <jeebjp@gmail.com>2018-09-27 21:40:06 +0300
committerGravatar sfan5 <sfan5@live.de>2018-09-29 20:02:46 +0200
commitcea4ff3e5fb5766d34f068742d00b127fa66013f (patch)
treede7e93c7b8b786553f455d9cef542b4b62fba05b /audio
parentfdc952486a8c0d6446783e424953fdb6097ed987 (diff)
ao_alsa: log the ALSA state if we get a non-XRUN error
The ALSA state generally can tell us more information in case we get an unexpected error.
Diffstat (limited to 'audio')
-rw-r--r--audio/out/ao_alsa.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/audio/out/ao_alsa.c b/audio/out/ao_alsa.c
index 5894a1bcaa..df78a67178 100644
--- a/audio/out/ao_alsa.c
+++ b/audio/out/ao_alsa.c
@@ -954,8 +954,10 @@ static int get_space(struct ao *ao)
return p->buffersize;
}
- MP_ERR(ao, "Error received from snd_pcm_avail (%ld, %s)!\n",
- space, snd_strerror(space));
+ MP_ERR(ao, "Error received from snd_pcm_avail "
+ "(%ld, %s with ALSA state %s)!\n",
+ space, snd_strerror(space),
+ snd_pcm_state_name(snd_pcm_state(p->alsa)));
// request a reload of the AO if device is not present,
// then error out.