diff options
author | Max Kellermann <max@duempel.org> | 2009-03-03 07:58:18 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-03-03 09:38:20 +0100 |
commit | 0f64e658fd34923a3be815582be500b8248019a0 (patch) | |
tree | a7a029bfddf1732653cd9bf6930cd9b5e65c31db /src/output | |
parent | f82793f741a5cf02a7a3766de7e5c5268fc1854a (diff) | |
download | mpd-0f64e658fd34923a3be815582be500b8248019a0.tar.gz mpd-0f64e658fd34923a3be815582be500b8248019a0.tar.xz mpd-0f64e658fd34923a3be815582be500b8248019a0.zip |
alsa: fall back to 32 bit samples if 16 is not supported
There are a few high-end devices (e.g. ICE1724) which cannot even play
16 bit audio. Try the 32 bit fallback, which we already implemented
for 24 bit.
Diffstat (limited to 'src/output')
-rw-r--r-- | src/output/alsa_plugin.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/output/alsa_plugin.c b/src/output/alsa_plugin.c index 510f3761b..83df3279f 100644 --- a/src/output/alsa_plugin.c +++ b/src/output/alsa_plugin.c @@ -255,7 +255,8 @@ configure_hw: } err = snd_pcm_hw_params_set_format(ad->pcm, hwparams, bitformat); - if (err == -EINVAL && audio_format->bits == 24) { + if (err == -EINVAL && (audio_format->bits == 24 || + audio_format->bits == 16)) { /* fall back to 32 bit, let pcm_convert.c do the conversion */ err = snd_pcm_hw_params_set_format(ad->pcm, hwparams, SND_PCM_FORMAT_S32); |