Skip to content

Commit

Permalink
ASoC: topology: Add support for multiple kcontrol types to a widget
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jaska Uimonen authored and Mark Brown committed May 14, 2021
1 parent a75e5cd commit d29d41e
Show file tree
Hide file tree
Showing 3 changed files with 233 additions and 250 deletions.
2 changes: 1 addition & 1 deletion include/sound/soc-topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ struct snd_soc_dobj_control {

/* dynamic widget object */
struct snd_soc_dobj_widget {
unsigned int kcontrol_type; /* kcontrol type: mixer, enum, bytes */
unsigned int *kcontrol_type; /* kcontrol type: mixer, enum, bytes */
};

/* generic dynamic object - all dynamic objects belong to this struct */
Expand Down
Loading

0 comments on commit d29d41e

Please sign in to comment.