All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaska Uimonen <jaska.uimonen@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: Jaska Uimonen <jaska.uimonen@linux.intel.com>
Subject: [RFC PATCH v2 0/2] Enable using multiple kcontrol types in a widget
Date: Wed, 13 Jan 2021 17:25:38 +0200	[thread overview]
Message-ID: <20210113152540.2116439-1-jaska.uimonen@linux.intel.com> (raw)

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(-)

-- 
2.24.1


             reply	other threads:[~2021-01-13 15:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-13 15:25 Jaska Uimonen [this message]
2021-01-13 15:25 ` [RFC PATCH v2 1/2] ASoC: soc-dapm: enable use of multiple control types Jaska Uimonen
2021-01-13 15:25 ` [RFC PATCH v2 2/2] ASoC: SOF: topology: use individual kcontrol types Jaska Uimonen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210113152540.2116439-1-jaska.uimonen@linux.intel.com \
    --to=jaska.uimonen@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.