From d224c8903418d173df9459a9c2b0c4e542db661d Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 8 May 2015 14:24:20 +0200 Subject: ao_alsa: log requested numbers of channels if ALSA rejects them (cherry picked from commit ad9bce2a5ca62f6a64f65fe79ae170edc0e05da4) --- audio/out/ao_alsa.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/audio/out/ao_alsa.c b/audio/out/ao_alsa.c index e31e8012f8..36f0381bf6 100644 --- a/audio/out/ao_alsa.c +++ b/audio/out/ao_alsa.c @@ -506,11 +506,12 @@ static int init_device(struct ao *ao, bool second_try) } if (num_channels != ao->channels.num) { + int req = ao->channels.num; mp_chmap_from_channels_alsa(&ao->channels, num_channels); if (!mp_chmap_is_valid(&ao->channels)) mp_chmap_from_channels(&ao->channels, 2); - MP_ERR(ao, "Couldn't get requested number of channels, fallback to %s.\n", - mp_chmap_to_str(&ao->channels)); + MP_ERR(ao, "Couldn't get requested number of channels (%d), fallback " + "to %s.\n", req, mp_chmap_to_str(&ao->channels)); } // Some ALSA drivers have broken delay reporting, so disable the ALSA -- cgit v1.2.3