ASoC: SOF: Intel: add hw specific PCM constraints
authorKai Vehmanen <kai.vehmanen@linux.intel.com>
Wed, 18 Nov 2020 14:05:45 +0000 (16:05 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 19 Nov 2020 13:00:04 +0000 (13:00 +0000)
commitcaebea04b9125c677e6e747793fbc7fab077727b
treeebc7b8f65bbbc784df3aee16e3ad26e57a34c92d
parent9983ac49b7db34258facf47439463e96522e1d5a
ASoC: SOF: Intel: add hw specific PCM constraints

Part of PCM constraints are set based on DSP topology, but rest
should be set based on hardware capabilities. Add PCM constraints
for Intel platforms:

- Add constraint for the period count to be integer. This avoids
  wrap-arounds of the DMA circular buffer in middle of a period.

- Align period size to dword/32bit as per HDA spec.

Both constraints are aligned with current implementation in snd-hda-intel
driver.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20201118140545.2138895-2-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/hda-pcm.c
sound/soc/sof/intel/intel-ipc.c