struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
        struct device *dev = rsnd_priv_to_dev(priv);
 
-       switch (runtime->sample_bits) {
+       switch (snd_pcm_format_width(runtime->format)) {
        case 16:
                return 8 << 16;
-       case 32:
+       case 24:
                return 0 << 16;
        }
 
        }
 
        /* Non target mod or 24bit data needs normal DALIGN */
-       if ((runtime->sample_bits != 16) ||
+       if ((snd_pcm_format_width(runtime->format) != 16) ||
            (mod != target))
                return 0x76543210;
        /* Target mod needs inverted DALIGN when 16bit */
         * HW    24bit data is located as 0x******00
         *
         */
-       switch (runtime->sample_bits) {
-       case 16:
+       if (snd_pcm_format_width(runtime->format) == 16)
                return 0;
-       case 32:
-               break;
-       }
 
        for (i = 0; i < ARRAY_SIZE(playback_mods); i++) {
                tmod = rsnd_io_to_mod(io, mods[i]);
 
        if (rsnd_io_is_play(io))
                cr_own |= TRMD;
 
-       switch (runtime->sample_bits) {
+       switch (snd_pcm_format_width(runtime->format)) {
        case 16:
                cr_own |= DWL_16;
                break;
-       case 32:
+       case 24:
                cr_own |= DWL_24;
                break;
        }
                                   rsnd_ssi_pointer_offset(mod, io, 0));
                int shift = 0;
 
-               switch (runtime->sample_bits) {
-               case 32:
+               if (snd_pcm_format_width(runtime->format) == 24)
                        shift = 8;
-                       break;
-               }
 
                /*
                 * 8/16/32 data can be assesse to TDR/RDR register