All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] Enable using multiple kcontrol types in a widget
@ 2021-01-08 11:23 Jaska Uimonen
  2021-01-08 11:23 ` [RFC PATCH 1/3] ALSA: control: add kcontrol_type to control Jaska Uimonen
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jaska Uimonen @ 2021-01-08 11:23 UTC (permalink / raw)
  To: alsa-devel; +Cc: Jaska Uimonen

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 just adding the type field to kcontrol struct. Second
patch is a refactoring to take into account the different control types
in parsing the topology. So it looks a little bit messy, but is just
actually looping through the types in the kcontrol creation. Third patch
is me using this in sof driver, so not so directly needed here. I've
tested this thing personally up from topology down till the dsp and for
me it seems to work, but as said I can't be sure if I'm breaking something
else here.

Jaska Uimonen (3):
  ALSA: control: add kcontrol_type to control
  ASoC: soc-topology: enable use of multiple control types
  ASoC: SOF: topology: use individual kcontrol types

 include/sound/control.h  |   2 +
 sound/core/control.c     |   2 +
 sound/soc/soc-topology.c | 462 ++++++++++++++++++---------------------
 sound/soc/sof/topology.c |  13 +-
 4 files changed, 230 insertions(+), 249 deletions(-)

-- 
2.24.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-01-13 15:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-08 11:23 [RFC PATCH 0/3] Enable using multiple kcontrol types in a widget Jaska Uimonen
2021-01-08 11:23 ` [RFC PATCH 1/3] ALSA: control: add kcontrol_type to control Jaska Uimonen
2021-01-08 11:40   ` Jaroslav Kysela
2021-01-08 14:06     ` Takashi Sakamoto
2021-01-13 14:53       ` Jaska Uimonen
2021-01-08 11:23 ` [RFC PATCH 2/3] ASoC: soc-topology: enable use of multiple control types Jaska Uimonen
2021-01-08 11:23 ` [RFC PATCH 3/3] ASoC: SOF: topology: use individual kcontrol types Jaska Uimonen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.