]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: Intel: Skylake: Make MCPS and CPS params obsolete
authorCezary Rojewski <cezary.rojewski@intel.com>
Tue, 23 Jul 2019 14:58:53 +0000 (16:58 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 24 Jul 2019 18:43:03 +0000 (19:43 +0100)
commitf1bb03681725db1eeb1fabe6ead06ca9694207ec
tree5422edab3f5aa840824bd879c6ccb8fd37bf230c
parentfae912dfada1c6432eb82f91f4a7f5dbd5b69471
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>
sound/soc/intel/skylake/skl-debug.c
sound/soc/intel/skylake/skl-messages.c
sound/soc/intel/skylake/skl-topology.c
sound/soc/intel/skylake/skl-topology.h