aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/core/pcm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index cbe815dfbdc8..204af48c5cc1 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -203,10 +203,16 @@ static char *snd_pcm_format_names[] = {
203 FORMAT(S18_3BE), 203 FORMAT(S18_3BE),
204 FORMAT(U18_3LE), 204 FORMAT(U18_3LE),
205 FORMAT(U18_3BE), 205 FORMAT(U18_3BE),
206 FORMAT(G723_24),
207 FORMAT(G723_24_1B),
208 FORMAT(G723_40),
209 FORMAT(G723_40_1B),
206}; 210};
207 211
208const char *snd_pcm_format_name(snd_pcm_format_t format) 212const char *snd_pcm_format_name(snd_pcm_format_t format)
209{ 213{
214 if (format >= ARRAY_SIZE(snd_pcm_format_names))
215 return "Unknown";
210 return snd_pcm_format_names[format]; 216 return snd_pcm_format_names[format];
211} 217}
212EXPORT_SYMBOL_GPL(snd_pcm_format_name); 218EXPORT_SYMBOL_GPL(snd_pcm_format_name);