mbox series

[v4,0/1] Enable using multiple different type kcontrols for widgets

Message ID 20210506113238.162260-1-jaska.uimonen@linux.intel.com (mailing list archive)
Headers show
Series Enable using multiple different type kcontrols for widgets | expand

Message

Jaska Uimonen May 6, 2021, 11:32 a.m. UTC
Hi,

This is a patch v4 for enabling multiple different types of kcontrols
for a dapm widget.

Currently asoc allows to define and parse multiple same type kcontrols
for single widget. So you can have for example two volume controls in
a widget but not one byte and one enum control. Lately we've seen
couple of cases where different types of controls would be useful and
alsa topology actually allows you to create these.

This patch refactors the dapm kcontrol parsing by lifting the creation
loop and memory allocation up one level and making the type variable
to hold multiple type values. Sof driver is modified to use this type
information in the same patch as it is quite cumbersome to split the
changes nicely.

changes since v3:
- fix sparse warnings for not using le32_to_cpu

Jaska Uimonen (1):
  ASoC: dapm: Add support for multiple kcontrol types to a widget

 include/sound/soc-topology.h |   2 +-
 sound/soc/soc-topology.c     | 467 +++++++++++++++++------------------
 sound/soc/sof/topology.c     |  15 +-
 3 files changed, 234 insertions(+), 250 deletions(-)