[alsa-devel] [alsa-lib][PATCH v3 4/4] pcm: plug: add SND_PCM_FORMAT_{S, U}20 to linear_preferred_formats
Maciej S. Szmigiero
mail at maciej.szmigiero.name
Thu Dec 14 14:54:29 CET 2017
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 <mail at maciej.szmigiero.name>
---
src/pcm/pcm_plug.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/pcm/pcm_plug.c b/src/pcm/pcm_plug.c
index f1d7792db709..abf6f1ab9751 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,
More information about the Alsa-devel
mailing list