aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-04-11 07:01:02 -0400
committerMark Brown <broonie@kernel.org>2015-04-12 07:43:58 -0400
commit5cf57f0f6b25d046e6ea219d99681077edca5d7c (patch)
tree3ce2111157a18ce0c39b07bc1176fa320df495aa
parentc517d838eb7d07bbe9507871fab3931deccff539 (diff)
ASoC: mop500_ab8500: Use card DAPM context to access widgets
The dapm field of the snd_soc_codec struct will eventually be removed (replaced with the DAPM context from the component embedded inside the CODEC). Replace its usage with the card's DAPM context. The idea is that DAPM is hierarchical and with the card at the root it is possible to access widgets from other contexts through the card context. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/ux500/mop500_ab8500.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/sound/soc/ux500/mop500_ab8500.c b/sound/soc/ux500/mop500_ab8500.c
index aa65370db82a..b81a7a4c938b 100644
--- a/sound/soc/ux500/mop500_ab8500.c
+++ b/sound/soc/ux500/mop500_ab8500.c
@@ -362,7 +362,7 @@ struct snd_soc_ops mop500_ab8500_ops[] = {
362 362
363int mop500_ab8500_machine_init(struct snd_soc_pcm_runtime *rtd) 363int mop500_ab8500_machine_init(struct snd_soc_pcm_runtime *rtd)
364{ 364{
365 struct snd_soc_codec *codec = rtd->codec; 365 struct snd_soc_dapm_context *dapm = &rtd->card->dapm;
366 struct device *dev = rtd->card->dev; 366 struct device *dev = rtd->card->dev;
367 struct mop500_ab8500_drvdata *drvdata; 367 struct mop500_ab8500_drvdata *drvdata;
368 int ret; 368 int ret;
@@ -407,23 +407,23 @@ int mop500_ab8500_machine_init(struct snd_soc_pcm_runtime *rtd)
407 return ret; 407 return ret;
408 } 408 }
409 409
410 ret = snd_soc_dapm_disable_pin(&codec->dapm, "Earpiece"); 410 ret = snd_soc_dapm_disable_pin(dapm, "Earpiece");
411 ret |= snd_soc_dapm_disable_pin(&codec->dapm, "Speaker Left"); 411 ret |= snd_soc_dapm_disable_pin(dapm, "Speaker Left");
412 ret |= snd_soc_dapm_disable_pin(&codec->dapm, "Speaker Right"); 412 ret |= snd_soc_dapm_disable_pin(dapm, "Speaker Right");
413 ret |= snd_soc_dapm_disable_pin(&codec->dapm, "LineOut Left"); 413 ret |= snd_soc_dapm_disable_pin(dapm, "LineOut Left");
414 ret |= snd_soc_dapm_disable_pin(&codec->dapm, "LineOut Right"); 414 ret |= snd_soc_dapm_disable_pin(dapm, "LineOut Right");
415 ret |= snd_soc_dapm_disable_pin(&codec->dapm, "Vibra 1"); 415 ret |= snd_soc_dapm_disable_pin(dapm, "Vibra 1");
416 ret |= snd_soc_dapm_disable_pin(&codec->dapm, "Vibra 2"); 416 ret |= snd_soc_dapm_disable_pin(dapm, "Vibra 2");
417 ret |= snd_soc_dapm_disable_pin(&codec->dapm, "Mic 1"); 417 ret |= snd_soc_dapm_disable_pin(dapm, "Mic 1");
418 ret |= snd_soc_dapm_disable_pin(&codec->dapm, "Mic 2"); 418 ret |= snd_soc_dapm_disable_pin(dapm, "Mic 2");
419 ret |= snd_soc_dapm_disable_pin(&codec->dapm, "LineIn Left"); 419 ret |= snd_soc_dapm_disable_pin(dapm, "LineIn Left");
420 ret |= snd_soc_dapm_disable_pin(&codec->dapm, "LineIn Right"); 420 ret |= snd_soc_dapm_disable_pin(dapm, "LineIn Right");
421 ret |= snd_soc_dapm_disable_pin(&codec->dapm, "DMic 1"); 421 ret |= snd_soc_dapm_disable_pin(dapm, "DMic 1");
422 ret |= snd_soc_dapm_disable_pin(&codec->dapm, "DMic 2"); 422 ret |= snd_soc_dapm_disable_pin(dapm, "DMic 2");
423 ret |= snd_soc_dapm_disable_pin(&codec->dapm, "DMic 3"); 423 ret |= snd_soc_dapm_disable_pin(dapm, "DMic 3");
424 ret |= snd_soc_dapm_disable_pin(&codec->dapm, "DMic 4"); 424 ret |= snd_soc_dapm_disable_pin(dapm, "DMic 4");
425 ret |= snd_soc_dapm_disable_pin(&codec->dapm, "DMic 5"); 425 ret |= snd_soc_dapm_disable_pin(dapm, "DMic 5");
426 ret |= snd_soc_dapm_disable_pin(&codec->dapm, "DMic 6"); 426 ret |= snd_soc_dapm_disable_pin(dapm, "DMic 6");
427 427
428 return ret; 428 return ret;
429} 429}