MODULE_DESCRIPTION("Routines for control of 16-bit SoundBlaster cards and clones");
 MODULE_LICENSE("GPL");
 
+#define runtime_format_bits(runtime) \
+       ((unsigned int)pcm_format_to_bits((runtime)->format))
+
 #ifdef CONFIG_SND_SB16_CSP
 static void snd_sb16_csp_playback_prepare(struct snd_sb *chip, struct snd_pcm_runtime *runtime)
 {
                if (csp->running & SNDRV_SB_CSP_ST_LOADED) {
                        /* manually loaded codec */
                        if ((csp->mode & SNDRV_SB_CSP_MODE_DSP_WRITE) &&
-                           ((1U << runtime->format) == csp->acc_format)) {
+                           (runtime_format_bits(runtime) == csp->acc_format)) {
                                /* Supported runtime PCM format for playback */
                                if (csp->ops.csp_use(csp) == 0) {
                                        /* If CSP was successfully acquired */
                                }
                        } else if ((csp->mode & SNDRV_SB_CSP_MODE_QSOUND) && (csp->q_enabled)) {
                                /* QSound decoder is loaded and enabled */
-                               if ((1 << runtime->format) & (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_U8 |
+                               if (runtime_format_bits(runtime) & (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_U8 |
                                                              SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_U16_LE)) {
                                        /* Only for simple PCM formats */
                                        if (csp->ops.csp_use(csp) == 0) {
                if (csp->running & SNDRV_SB_CSP_ST_LOADED) {
                        /* manually loaded codec */
                        if ((csp->mode & SNDRV_SB_CSP_MODE_DSP_READ) &&
-                           ((1U << runtime->format) == csp->acc_format)) {
+                           (runtime_format_bits(runtime) == csp->acc_format)) {
                                /* Supported runtime PCM format for capture */
                                if (csp->ops.csp_use(csp) == 0) {
                                        /* If CSP was successfully acquired */