diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-07-24 13:27:36 (GMT) |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-07-24 13:56:19 (GMT) |
commit | c3f48ae6fd5a1ebdcaff5efe35f88f31daaee225 (patch) | |
tree | 6c4b3a672a50f214b6a4ab19ba77307398a3c39d /sound/soc/soc-pcm.c | |
parent | 63c69a6e4134a2085d40e40c02a395dd1bd8c023 (diff) | |
download | linux-c3f48ae6fd5a1ebdcaff5efe35f88f31daaee225.tar.xz |
ASoC: dapm: Pass snd_soc_card directly to soc_dpcm_runtime_update()
soc_dpcm_runtime_update() operates on a ASoC card as a whole. Currently it takes
a snd_soc_dapm_widget as its only parameter though. The widget is then used to
look up the card and is otherwise unused. This patch changes the function to
take a pointer to the card directly. This makes it possible to to call
soc_dpcm_runtime_update() for updates which are not related to one specific
widget.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/soc-pcm.c')
-rw-r--r-- | sound/soc/soc-pcm.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index b6c6403..5c2c662 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -1832,18 +1832,10 @@ static int dpcm_run_old_update(struct snd_soc_pcm_runtime *fe, int stream) /* Called by DAPM mixer/mux changes to update audio routing between PCMs and * any DAI links. */ -int soc_dpcm_runtime_update(struct snd_soc_dapm_widget *widget) +int soc_dpcm_runtime_update(struct snd_soc_card *card) { - struct snd_soc_card *card; int i, old, new, paths; - if (widget->codec) - card = widget->codec->card; - else if (widget->platform) - card = widget->platform->card; - else - return -EINVAL; - mutex_lock_nested(&card->mutex, SND_SOC_CARD_CLASS_RUNTIME); for (i = 0; i < card->num_rtd; i++) { struct snd_soc_dapm_widget_list *list; |