Commit b93673be authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Mark Brown

ASoC: byt-rt5640: Register microphone routes with the card DAPM context

Board level DAPM elements should be registered with the card's DAPM context
rather than the CODEC's DAPM context.
Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Acked-by: default avatarJarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 7a81140b
...@@ -132,7 +132,6 @@ static int byt_rt5640_init(struct snd_soc_pcm_runtime *runtime) ...@@ -132,7 +132,6 @@ static int byt_rt5640_init(struct snd_soc_pcm_runtime *runtime)
{ {
int ret; int ret;
struct snd_soc_codec *codec = runtime->codec; struct snd_soc_codec *codec = runtime->codec;
struct snd_soc_dapm_context *dapm = &codec->dapm;
struct snd_soc_card *card = runtime->card; struct snd_soc_card *card = runtime->card;
const struct snd_soc_dapm_route *custom_map; const struct snd_soc_dapm_route *custom_map;
int num_routes; int num_routes;
...@@ -161,7 +160,7 @@ static int byt_rt5640_init(struct snd_soc_pcm_runtime *runtime) ...@@ -161,7 +160,7 @@ static int byt_rt5640_init(struct snd_soc_pcm_runtime *runtime)
num_routes = ARRAY_SIZE(byt_rt5640_intmic_dmic1_map); num_routes = ARRAY_SIZE(byt_rt5640_intmic_dmic1_map);
} }
ret = snd_soc_dapm_add_routes(dapm, custom_map, num_routes); ret = snd_soc_dapm_add_routes(&card->dapm, custom_map, num_routes);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment