Skip to content

Commit

Permalink
ASoC: davinci-evm: Use card DAPM context to access widgets
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lars-Peter Clausen authored and Mark Brown committed Apr 12, 2015
1 parent 4cd9db0 commit b213b44
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions sound/soc/davinci/davinci-evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
}
Expand Down

0 comments on commit b213b44

Please sign in to comment.