Setting I2S sample size to 24-bit does not output a 24-bit clock

Setting the sample_size in the board-xx.c file in the /arch/arm/mach-tegra/ folder does not propagate to the upper layers. In the sound/soc/tegra/tegra30_i2s.c; function tegra30_i2s_hw_params has a switch statement that has cases for SNDRV_PCM_FORMAT_S16_LE and SNDRV_PCM_FORMAT_S24_LE.

496 switch (params_format(params)) {
498 i2s->reg_ctrl |= TEGRA30_I2S_CTRL_BIT_SIZE_16;
499 sample_size = 16;
500 break;
502 i2s->reg_ctrl |= TEGRA30_I2S_CTRL_BIT_SIZE_24;
503 sample_size = 24;
504 break;
505 default:
506 return -EINVAL;
507 }

If I force the port I want to select SNDRV_PCM_FORMAT_S24_LE the bit clock almost gets to 2.304MHz but is closer to 2.2MHz and the fame clock is about 46kHz not 48kHz. Using the “crowbar” approach is not the proper way to change the bit count as the clocks do not get setup properly. I can’t seem to find where params, used in the switch statement, is set in the configuration files. I’m new to ALSA and can see there are several ways to setup certain features.

I can’t answer the question, but you’ll definitely want to give information on which software release you’re using (such as L4T R16), and mention which hardware (even if the chip is known Tegra3, board support package changes things).