From: Mark Brown <broonie@kernel.org>
To: Takashi Iwai <tiwai@suse.de>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
Arun Shamanna Lakshmi <aruns@nvidia.com>,
lgirdwood@gmail.com, swarren@wwwdotorg.org, perex@perex.cz,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
Songhee Baek <sbaek@nvidia.com>
Subject: Re: [PATCH] ASoC: dapm: Add support for multi register mux
Date: Thu, 3 Apr 2014 17:02:54 +0100 [thread overview]
Message-ID: <20140403160254.GV14763@sirena.org.uk> (raw)
In-Reply-To: <s5hr45epi4r.wl%tiwai@suse.de>
[-- Attachment #1: Type: text/plain, Size: 1383 bytes --]
On Thu, Apr 03, 2014 at 05:06:28PM +0200, Takashi Iwai wrote:
> Lars-Peter Clausen wrote:
> > It would be nice, but it also requires some slight restructuring. The issue
> > we have right now is that there is strictly speaking a bit of a layering
> > violation. The DAPM widgets should not need to know how the kcontrols that
> > are attached to the widget do their IO. What we essentially do in
> > dapm_connect_mux() (and also dapm_connect_mixer) is an open-coded version of
> > the controls get handler. Replacing that by calling the get handler instead
> > should allow us to use different structs for enums and onehot enums.
Right, that's because DAPM has always just reimplemented everything and
the virtual controls were grafted on the side of the existing register
stuff rather than adding an abstraction layer.
> So, something like below? It's totally untested, just a proof of
> concept.
Yes, that looks sensible to me but I didn't test it yet either.
> If the performance matters, we can optimize it by checking
> kcontrol->get == snd_soc_dapm_get_enum_double or kcontrol->get ==
> snd_soc_dapm_get_volsw and bypass to the current open-code functions
> instead of the generic get/put callers.
Performance isn't that big a deal, probably avoiding the alloc/frees
by just keeping one around somewhere convenient would be useful too.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2014-04-03 16:02 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-03 3:11 [PATCH] ASoC: dapm: Add support for multi register mux Arun Shamanna Lakshmi
2014-04-03 8:27 ` Lars-Peter Clausen
2014-04-03 9:40 ` Mark Brown
2014-04-03 20:11 ` Arun Shamanna Lakshmi
2014-04-04 7:31 ` Lars-Peter Clausen
2014-04-04 7:34 ` Arun Shamanna Lakshmi
2014-04-04 7:40 ` Lars-Peter Clausen
2014-04-03 9:47 ` Takashi Iwai
2014-04-03 9:53 ` Mark Brown
2014-04-03 13:31 ` Lars-Peter Clausen
2014-04-03 15:06 ` Takashi Iwai
2014-04-03 16:02 ` Mark Brown [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-04-05 0:12 Arun Shamanna Lakshmi
2014-04-07 12:54 ` Lars-Peter Clausen
2014-04-07 14:24 ` Takashi Iwai
2014-04-09 15:56 ` Mark Brown
2014-04-01 6:21 [PATCH] ASoC: DAPM: " Arun Shamanna Lakshmi
2014-04-01 7:48 ` Lars-Peter Clausen
[not found] ` <781A12BB53C15A4BB37291FDE08C03F3A05CDCD63B@HQMAIL02.nvidia.com>
2014-04-01 18:26 ` Arun Shamanna Lakshmi
2014-04-02 6:00 ` Lars-Peter Clausen
2014-04-02 6:17 ` Songhee Baek
2014-04-02 6:47 ` Lars-Peter Clausen
2014-04-02 6:56 ` Songhee Baek
2014-04-02 7:01 ` Lars-Peter Clausen
2014-04-02 7:06 ` Songhee Baek
2014-04-02 15:26 ` Songhee Baek
2014-04-02 15:29 ` Lars-Peter Clausen
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=20140403160254.GV14763@sirena.org.uk \
--to=broonie@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=aruns@nvidia.com \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=sbaek@nvidia.com \
--cc=swarren@wwwdotorg.org \
--cc=tiwai@suse.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox