linux/sound/soc/intel
Cezary Rojewski 84b71067ea
ASoC: Intel: Skylake: Make MCPS and CPS params obsolete
As per FW Interface Modules Configuration, init instance IPC request
requires base initial module configuration. This configuration structure
is made of:
- cpc (chunks per cycle)
- ibs (input buffer size)
- obs (output buffer size)
- is_pages (memory pages required)
- audio_fmt (self explanatory)

Skylake topology accepts following tokens: MCPS, CPS and CPC. All of
these are directly connected. Moreover, assigning one of these allows
to calculate the remaining two. In simplest scenario and assuming 1ms
scheduling, following is true:

CPS = CPC times 1000
MCPS = CPS times 1000 000
Note: these calculations vary depending on scenario and scheduling
requirements.

Given the current implementation, userspace is allowed to provide
different values for all three causing informational chaos. On top of
that, struct skl_base_cfg which represents base module configuration,
incorrectly takes CPS param instead of CPC.

This ambiguity may lead to user unintentionally providing improper
values to DSP firmware and thus impacting module scheduling in
unexpected fashion. Fix by making MCPS and CPS topology params obsolete
and relying solely on CPC value.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20190723145854.8527-7-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-07-24 19:43:03 +01:00
..
atom Linux 5.2-rc6 2019-06-26 12:39:34 +01:00
baytrail treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
boards Merge branch 'asoc-5.3' into asoc-next 2019-07-06 12:25:26 +01:00
common ASoC: Intel: Skylake: Merge skl_sst and skl into skl_dev struct 2019-07-24 19:41:33 +01:00
haswell treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
skylake ASoC: Intel: Skylake: Make MCPS and CPS params obsolete 2019-07-24 19:43:03 +01:00
Kconfig Linux 5.2-rc6 2019-06-26 12:39:34 +01:00
Makefile ASoC: Intel: Fix Kconfig with top-level selector 2018-01-08 16:18:48 +00:00