[PATCH 1/3] ALSA: pcm: Add missing formats to formats list

From: Ivan Orlov
Date: Thu Jan 25 2024 - 17:36:19 EST


Add 4 missing formats to 'snd_pcm_format_names' array in order to be
able to get their names with 'snd_pcm_format_name' function.

Signed-off-by: Ivan Orlov <ivan.orlov0322@xxxxxxxxx>
---
sound/core/pcm.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index a09f0154e6a7..d0788126cbab 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -211,6 +211,10 @@ static const char * const snd_pcm_format_names[] = {
FORMAT(DSD_U32_LE),
FORMAT(DSD_U16_BE),
FORMAT(DSD_U32_BE),
+ FORMAT(S20_LE),
+ FORMAT(S20_BE),
+ FORMAT(U20_LE),
+ FORMAT(U20_BE),
};

/**
--
2.34.1