Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: Intel: kbl_rt5663_rt5514_max98927: Add dmic format constraint

On KBL platform, the microphone is attached to external codec(rt5514)
instead of PCH. However, TDM slot between PCH and codec is 16 bits only.
In order to avoid setting wrong format, we should add a constraint to
force to use 16 bits format forever.

Signed-off-by: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190923162940.199580-1-yuhsuan@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Yu-Hsuan Hsu and committed by
Mark Brown
e2db787b 36da6763

+3
+3
sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
··· 465 465 snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, 466 466 dmic_constraints); 467 467 468 + runtime->hw.formats = SNDRV_PCM_FMTBIT_S16_LE; 469 + snd_pcm_hw_constraint_msbits(runtime, 0, 16, 16); 470 + 468 471 return snd_pcm_hw_constraint_list(substream->runtime, 0, 469 472 SNDRV_PCM_HW_PARAM_RATE, &constraints_rates); 470 473 }