Skip to content

RFC Enable using multiple kcontrol types in a widget

Jaska Uimonen alsa-devel 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest2 patches 0 repliesNew
  2. v1 RFC3 patches 3 repliesSuperseded

Changes in v2 from the cover letter

- don't add kcontrol type to core i.e. to kcontrol and kcontrol_news
- extend existing dapm widget kcontrol_type into holding an array of types

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ASoC: soc-dapm: enable use of multiple control typesinclude/sound/soc-topology.h sound/soc/soc-topology.c+224 -2440 replies
2/2ASoC: SOF: topology: use individual kcontrol typessound/soc/sof/topology.c+8 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [RFC PATCH v2 0/2] Enable using multiple kcontrol types in a widget

Hi,

I'm requesting comments to this small series to enable multiple different kcontrol types for a single 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 for example one byte and one enum control. I personally had this kind of use case where I wanted to set filter coefficients with bytes and something else with an enum in one processing widget.

I don't have that good perspective on the asoc history on this part so I don't know is there some reason for the existing logic or is it just ok to change it like in this series. I've been told some drivers use virtual widget for this kind of situation, so they define two widget's (one virtual) with separate controls, but in reality bind the controls into the same component in lower level. Or can we just actually use separate types in one widget?

First patch is changing the kcontrol_type uint in dapm widget to a pointer to hold an array of kcontrol types and then creating these different types in a loop in dapm widget load. Second patch is me utilizing this in sof driver.

Changes since v1:
- don't add kcontrol type to core i.e. to kcontrol and kcontrol_news
- extend existing dapm widget kcontrol_type into holding an array of types

Jaska Uimonen (2):
ASoC: soc-dapm: enable use of multiple control types
ASoC: SOF: topology: use individual kcontrol types

 include/sound/soc-topology.h |   2 +-
 sound/soc/soc-topology.c     | 466 +++++++++++++++++------------------
 sound/soc/sof/topology.c     |  13 +-
 3 files changed, 232 insertions(+), 249 deletions(-)
Signature · 1 line
2.24.1