From: Maciej S. Szmigiero Date: Thu, 14 Dec 2017 13:54:29 +0000 (+0100) Subject: pcm: plug: add SND_PCM_FORMAT_{S, U}20 to linear_preferred_formats X-Git-Tag: v1.1.6~27 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=0d8ff0712bdb613662c9a935ad8d2364626d0563;p=alsa-lib.git pcm: plug: add SND_PCM_FORMAT_{S, U}20 to linear_preferred_formats This commit adds the recently added formats SND_PCM_FORMAT_{S,U}20 to the linear_preferred_formats array in pcm_plug. Let's give them lower priority than more standard S24 formats but a higher priority than less typical 3-byte versions. Signed-off-by: Maciej S. Szmigiero Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai --- diff --git a/src/pcm/pcm_plug.c b/src/pcm/pcm_plug.c index f1d7792d..abf6f1ab 100644 --- a/src/pcm/pcm_plug.c +++ b/src/pcm/pcm_plug.c @@ -138,6 +138,17 @@ static const snd_pcm_format_t linear_preferred_formats[] = { SND_PCM_FORMAT_S24_LE, SND_PCM_FORMAT_U24_LE, #endif +#ifdef SND_LITTLE_ENDIAN + SND_PCM_FORMAT_S20_LE, + SND_PCM_FORMAT_U20_LE, + SND_PCM_FORMAT_S20_BE, + SND_PCM_FORMAT_U20_BE, +#else + SND_PCM_FORMAT_S20_BE, + SND_PCM_FORMAT_U20_BE, + SND_PCM_FORMAT_S20_LE, + SND_PCM_FORMAT_U20_LE, +#endif #ifdef SND_LITTLE_ENDIAN SND_PCM_FORMAT_S24_3LE, SND_PCM_FORMAT_U24_3LE,