From cea4ff3e5fb5766d34f068742d00b127fa66013f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Ekstr=C3=B6m?= Date: Thu, 27 Sep 2018 21:40:06 +0300 Subject: 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. --- audio/out/ao_alsa.c | 6 ++++-- 1 file 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. -- cgit v1.2.3