summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Ekström <jeebjp@gmail.com>2018-09-27 21:40:06 +0300
committerJan Ekström <jeebjp@gmail.com>2018-09-29 23:07:19 +0300
commite0682490d73d38945ceefd570d29ab66950dfb13 (patch)
tree62382dfcb672fdcf4a95a5fe877621e9a29c5826
parent03e3abcb0c4cc9032f2843e469a76f67d4d33b43 (diff)
downloadmpv-e0682490d73d38945ceefd570d29ab66950dfb13.tar.bz2
mpv-e0682490d73d38945ceefd570d29ab66950dfb13.tar.xz
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. (cherry picked from commit cea4ff3e5fb5766d34f068742d00b127fa66013f)
-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.