]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ASoC: Intel: Skylake: Add 16-bit constraint to FE bxt_rt298 machine
authorG Kranthi <gudishax.kranthikumar@intel.com>
Fri, 24 Mar 2017 17:40:27 +0000 (23:10 +0530)
committerMark Brown <broonie@kernel.org>
Wed, 29 Mar 2017 11:53:24 +0000 (12:53 +0100)
Add constraint to FE to restrict sample format to 16-bit for bxt_rt298
machine

Signed-off-by: G Kranthi <gudishax.kranthikumar@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/bxt_rt298.c

index 176c080a98187080c59881147c5c0617089ce936..1a68d043c803331afeb4c8acabacb3844816e02e 100644 (file)
@@ -274,12 +274,15 @@ static int bxt_fe_startup(struct snd_pcm_substream *substream)
         * on this platform for PCM device we support:
         *      48Khz
         *      stereo
+        *      16-bit audio
         */
 
        runtime->hw.channels_max = 2;
        snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
                                &constraints_channels);
 
+       runtime->hw.formats = SNDRV_PCM_FMTBIT_S16_LE;
+       snd_pcm_hw_constraint_msbits(runtime, 0, 16, 16);
        snd_pcm_hw_constraint_list(runtime, 0,
                                SNDRV_PCM_HW_PARAM_RATE, &constraints_rates);