Commit 0f64e658 authored by Max Kellermann's avatar Max Kellermann

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.
parent f82793f7
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment