]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
ASoC: davinci-evm: Use card DAPM context to access widgets
authorLars-Peter Clausen <lars@metafoo.de>
Sat, 11 Apr 2015 11:11:28 +0000 (13:11 +0200)
committerMark Brown <broonie@kernel.org>
Sun, 12 Apr 2015 11:44:24 +0000 (12:44 +0100)
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>
sound/soc/davinci/davinci-evm.c

index b6bb5947a8a8435f5219d4d8efb541e842e531f4..1f314a836f2a9ec51fc678e57be26f9e00b13e79 100644 (file)
@@ -117,7 +117,6 @@ static const struct snd_soc_dapm_route audio_map[] = {
 static int evm_aic3x_init(struct snd_soc_pcm_runtime *rtd)
 {
        struct snd_soc_card *card = rtd->card;
-       struct snd_soc_codec *codec = rtd->codec;
        struct device_node *np = card->dev->of_node;
        int ret;
 
@@ -136,9 +135,9 @@ static int evm_aic3x_init(struct snd_soc_pcm_runtime *rtd)
        }
 
        /* not connected */
-       snd_soc_dapm_nc_pin(&codec->dapm, "MONO_LOUT");
-       snd_soc_dapm_nc_pin(&codec->dapm, "HPLCOM");
-       snd_soc_dapm_nc_pin(&codec->dapm, "HPRCOM");
+       snd_soc_dapm_nc_pin(&card->dapm, "MONO_LOUT");
+       snd_soc_dapm_nc_pin(&card->dapm, "HPLCOM");
+       snd_soc_dapm_nc_pin(&card->dapm, "HPRCOM");
 
        return 0;
 }