All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Implement control sharing
@ 2011-04-28 23:37 Stephen Warren
  2011-04-28 23:37 ` [PATCH 1/4] ASoC: s/w->kcontrols/w->kcontrol_news/g Stephen Warren
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Stephen Warren @ 2011-04-28 23:37 UTC (permalink / raw)
  To: broonie, lrg; +Cc: alsa-devel, Stephen Warren

Control sharing is enabled when two widgets include pointers to the
same kcontrol_new in their definition. Specifically:

static const struct snd_kcontrol_new adcinput_mux =
        SOC_DAPM_ENUM("ADC Input", adcinput_enum);

static const struct snd_soc_dapm_widget wm8903_dapm_widgets[] = {
  SND_SOC_DAPM_MUX("Left ADC Input", SND_SOC_NOPM, 0, 0, &adcinput_mux),
  SND_SOC_DAPM_MUX("Right ADC Input", SND_SOC_NOPM, 0, 0, &adcinput_mux),
};

This is useful when a single register bit or field affects multiple
muxes at once. The common case is to have separate control bits or
fields for each mux (channel). An alternative way of looking at this
is that the mux is a stereo (or even n-channel) mux, rather than
independant mono muxes.

I have tested this on NVIDIA Tegra Seaboard, specifically with the WM8903
"ADC Input" control, and a locally-enabled digital mic setup.

I have not compiled nor tested any other platforms.

This patchset does not implement control sharing for dapm_new_mixer() yet.
I can do so after discussion/review of this patch series, although note that
I don't have anything to test the actual sharing on for such controls.

Stephen Warren (4):
  ASoC: s/w->kcontrols/w->kcontrol_news/g
  ASoC: Add w->kcontrols, and populate it
  ASoC: Store a list of widgets in a DAPM mux/mixer kcontrol
  ASoC: Implement mux control sharing

 include/sound/soc-dapm.h          |   75 +++++----
 sound/soc/codecs/88pm860x-codec.c |    2 +-
 sound/soc/soc-dapm.c              |  315 ++++++++++++++++++++++++++-----------
 3 files changed, 266 insertions(+), 126 deletions(-)

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

end of thread, other threads:[~2011-05-03 18:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-28 23:37 [PATCH 0/4] Implement control sharing Stephen Warren
2011-04-28 23:37 ` [PATCH 1/4] ASoC: s/w->kcontrols/w->kcontrol_news/g Stephen Warren
2011-04-28 23:37 ` [PATCH 2/4] ASoC: Add w->kcontrols, and populate it Stephen Warren
2011-04-28 23:38 ` [PATCH 3/4] ASoC: Store a list of widgets in a DAPM mux/mixer kcontrol Stephen Warren
2011-04-28 23:38 ` [PATCH 4/4] ASoC: Implement mux control sharing Stephen Warren
2011-04-29 15:28 ` [PATCH 0/4] Implement " Liam Girdwood
2011-05-03 18:30 ` Mark Brown

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.