OSDN Git Service

ASoC: topology: Add support for multiple kcontrol types to a widget
authorJaska Uimonen <jaska.uimonen@linux.intel.com>
Fri, 7 May 2021 07:02:46 +0000 (10:02 +0300)
committerMark Brown <broonie@kernel.org>
Fri, 14 May 2021 15:31:15 +0000 (16:31 +0100)
commitd29d41e28eea65493395dda0b6d1fff23ca374f4
treecba9c720813894d5dae2c11cd3c46d36c8fcf0ad
parenta75e5cdf4dd1307bb1541edbb0c008f40896644c
ASoC: topology: Add support for multiple kcontrol types to a widget

Current dapm widget has a single variable to describe its kcontrol's
type. As there can be many kcontrols in one widget it is inherently
presumed that the types are the same.

Lately there has been use cases where different types of kcontrols would
be needed for a single widget. Thus add pointer to dapm widget to hold
an array for different kcontrol types and modify the kcontrol creation
to operate in a loop based on individual kcontrol type.

Change control creation and deletion to use individual kcontrol types in
SOF driver. This is done in the same patch for not breaking bisect. SOF
driver is also currently the only one using the dapm widget
kcontrol_type.

Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210507070246.404446-1-jaska.uimonen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc-topology.h
sound/soc/soc-topology.c
sound/soc/sof/topology.c