Skip to content

Commit d29d41e

Browse files
Jaska Uimonenbroonie
authored andcommitted
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>
1 parent a75e5cd commit d29d41e

File tree

3 files changed

+233
-250
lines changed

3 files changed

+233
-250
lines changed

include/sound/soc-topology.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ struct snd_soc_dobj_control {
5454

5555
/* dynamic widget object */
5656
struct snd_soc_dobj_widget {
57-
unsigned int kcontrol_type; /* kcontrol type: mixer, enum, bytes */
57+
unsigned int *kcontrol_type; /* kcontrol type: mixer, enum, bytes */
5858
};
5959

6060
/* generic dynamic object - all dynamic objects belong to this struct */

0 commit comments

Comments
 (0)