linux/sound/soc
Lars-Peter Clausen ce6cfaf1de ASoC: dapm: Run widget updates for shared controls at the same time
Currently when updating a control that is shared between multiple widgets the
whole power-up/power-down sequence is being run once for each widget. The
control register is updated during the first run, which means the CODEC internal
routing is also updated for all widgets during this first run. The input and
output paths for each widgets are only updated though during the respective run
for that widget. This leads to a slight inconsistency between the CODEC's
internal state and ASoC's state, which causes non optimal behavior in regard to
click and pop avoidance.

E.g. consider the following setup where two MUXs share the same control.

          +------+
 A1 ------|      |
          | MUX1 |----- C1
 B1 ------|      |
          +------+
             |
  control ---+
             |
          +------+
 A2 ------|      |
          | MUX2 |----- C2
 B2 ------|      |
          +------+

If the control is updated to switch the MUXs from input A to input B with the
current code the power-up/power-down sequence will look like this:

Run soc_dapm_mux_update_power for MUX1
  Power-down A1
  Update MUXing
  Power-up B1

Run soc_dapm_mux_update_power for MUX2
  Power-down A2
  (Update MUXing)
  Power-up B2

Note that the second 'Update Muxing' is a no-op, since the register was already
updated.

While the preferred order for avoiding pops and clicks should be:

Run soc_dapm_mux_update_power for control
  Power-down A1
  Power-down A2
  Update MUXing
  Power-up B1
  Power-up B2

This patch changes the behavior to the later by running the updates for all
widgets that the control is attached to at the same time.

The new code is also a bit simpler since callers of
soc_dapm_{mux,muxer}_update_power don't have to loop over each widget anymore
and neither do we need to keep track for which of the kcontrol's widgets the
current update is.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-24 14:56:19 +01:00
..
atmel ASoC: atmel: Fix unlocked snd_pcm_stop() call 2013-07-15 21:25:13 +02:00
au1x ASoC: ac97: Support multi-platform AC'97 2013-06-27 09:48:42 +01:00
blackfin ASoC: More updates for v3.11 2013-06-28 13:36:22 +02:00
cirrus ASoC: More updates for v3.11 2013-06-28 13:36:22 +02:00
codecs Merge remote-tracking branch 'asoc/fix/wm8994' into asoc-linus 2013-07-15 11:13:58 +01:00
davinci sound updates for 3.11 2013-07-03 19:52:22 -07:00
dwc ASoC: dwc: Folder path correction in file header. 2013-06-12 16:19:01 +01:00
fsl ASoC: Updates for v3.11 2013-07-05 11:54:27 +02:00
generic ASoC: simple-card: add asoc_simple_dai for initializing 2013-01-14 06:55:43 +09:00
jz4740 ASoC: jz4740-i2s: Use clk_prepare_enable/clk_disable_unprepare 2013-05-12 22:09:03 +04:00
kirkwood Merge remote-tracking branch 'asoc/topic/kirkwood' into asoc-next 2013-06-17 17:20:22 +01:00
mid-x86 ASoC: mfld: Remove unused variable 2013-06-28 10:59:14 +01:00
mxs Merge remote-tracking branch 'asoc/fix/mxs' into asoc-linus 2013-07-04 18:30:02 +01:00
nuc900 ASoC: ac97: Support multi-platform AC'97 2013-06-27 09:48:42 +01:00
omap Merge remote-tracking branch 'asoc/fix/omap' into asoc-linus 2013-07-15 11:13:53 +01:00
pxa ASoC: Final updates for v3.11 2013-07-01 11:23:13 +02:00
s6000 ASoC: s6000: Fix unlocked snd_pcm_stop() call 2013-07-15 21:25:14 +02:00
samsung Merge remote-tracking branch 'asoc/fix/samsung' into asoc-linus 2013-07-15 11:13:54 +01:00
sh ASoC: More updates for v3.11 2013-06-28 13:36:22 +02:00
spear ASoC: spear: Convert to use devm_ioremap_resource 2013-06-17 17:19:58 +01:00
tegra ASoC: Final updates for v3.11 2013-07-01 11:23:13 +02:00
txx9 ASoC: ac97: Support multi-platform AC'97 2013-06-27 09:48:42 +01:00
ux500 sound updates for 3.11 2013-07-03 19:52:22 -07:00
Kconfig ASoC: Add Kconfig and Makefile to support SPEAr audio driver 2013-06-12 16:25:22 +01:00
Makefile ASoC: Add Kconfig and Makefile to support SPEAr audio driver 2013-06-12 16:25:22 +01:00
soc-cache.c ASoC: cache: Standardise ASoC cache messages 2012-11-21 11:39:51 +09:00
soc-compress.c ASoC: soc-compress: Send correct stream event for capture start 2013-05-20 08:01:48 -05:00
soc-core.c ASoC: Final updates for v3.11 2013-07-01 11:23:13 +02:00
soc-dapm.c ASoC: dapm: Run widget updates for shared controls at the same time 2013-07-24 14:56:19 +01:00
soc-dmaengine-pcm.c ASoC: dmaengine_pcm: Add support for compat platforms 2013-04-17 14:21:36 +01:00
soc-generic-dmaengine-pcm.c ASoC: generic-dmaengine-pcm: call dma_request_slave_channel() 2013-04-23 11:34:29 +01:00
soc-io.c ASoC: core: Use PTR_RET function 2013-03-26 14:12:01 +00:00
soc-jack.c Merge remote-tracking branch 'asoc/topic/log' into asoc-next 2012-12-10 00:22:14 +09:00
soc-pcm.c ASoC: dapm: Pass snd_soc_card directly to soc_dpcm_runtime_update() 2013-07-24 14:56:19 +01:00
soc-utils.c ASoC: simplify registration of snd-soc-dummy device 2013-05-17 12:07:49 +01:00