ASoC: snd_soc_dapm_get_pin_status: Match other contexts too
authorStephen Warren <swarren@nvidia.com>
Tue, 19 Apr 2011 21:25:11 +0000 (15:25 -0600)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 20 Apr 2011 12:50:06 +0000 (13:50 +0100)
commita68b38ada57bc9aeeec574d3e76e67ad89fea303
treeebf9e6270beb7bb8f16aae827d3f010ea5a41da1
parenta32955dba2e2629bddacf7c1b9de3bf1b7c56acf
ASoC: snd_soc_dapm_get_pin_status: Match other contexts too

Not all widgets on a card are within the codec's DAPM context. Fix
snd_soc_dapm_get_pin_status to search all contexts when looking for a
widget.

This change is required when modifying tegra_wm8903 to use
snd_soc_card.widgets rather than calling snd_soc_dapm_new_controls; the
former adds the widgets to the card's DAPM context, whereas tegra_wm8903
uses the codec's DAPM context when calling snd_soc_dapm_new_controls.

By code inspection, I suspect this also applies to Samsung Speyside.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/soc-dapm.c