summaryrefslogtreecommitdiffstats
path: root/include/sound/pcm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sound/pcm.h')
-rw-r--r--include/sound/pcm.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 1b0c6484e71a..5357ecbecc48 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -1133,4 +1133,10 @@ int snd_pcm_add_chmap_ctls(struct snd_pcm *pcm, int stream,
unsigned long private_value,
struct snd_pcm_chmap **info_ret);
+/* Strong-typed conversion of pcm_format to bitwise */
+static inline u64 pcm_format_to_bits(snd_pcm_format_t pcm_format)
+{
+ return 1ULL << (__force int) pcm_format;
+}
+
#endif /* __SOUND_PCM_H */