diff options
author | Mark Brown <broonie@kernel.org> | 2015-04-10 18:09:21 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-04-10 18:09:21 +0300 |
commit | 1ddca24c532247894eb4430e9315e690306cf860 (patch) | |
tree | e0021306bdc42615ba304b0ac4dd3db6b73cae55 /sound/soc/soc-core.c | |
parent | 5f97a4bd2c92aff216581d662a37163881ac3888 (diff) | |
parent | 3185878a70e721644b0e32ebbc0a039616551949 (diff) | |
download | linux-1ddca24c532247894eb4430e9315e690306cf860.tar.xz |
Merge branch 'topic/dapm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-core
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r-- | sound/soc/soc-core.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 492e1976aab7..25fcd80cb108 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1609,6 +1609,10 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card) snd_soc_dapm_new_controls(&card->dapm, card->dapm_widgets, card->num_dapm_widgets); + if (card->of_dapm_widgets) + snd_soc_dapm_new_controls(&card->dapm, card->of_dapm_widgets, + card->num_of_dapm_widgets); + /* initialise the sound card only once */ if (card->probe) { ret = card->probe(card); @@ -1664,6 +1668,10 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card) snd_soc_dapm_add_routes(&card->dapm, card->dapm_routes, card->num_dapm_routes); + if (card->of_dapm_routes) + snd_soc_dapm_add_routes(&card->dapm, card->of_dapm_routes, + card->num_of_dapm_routes); + for (i = 0; i < card->num_links; i++) { if (card->dai_link[i].dai_fmt) snd_soc_runtime_set_dai_fmt(&card->rtd[i], @@ -3272,8 +3280,8 @@ int snd_soc_of_parse_audio_simple_widgets(struct snd_soc_card *card, widgets[i].name = wname; } - card->dapm_widgets = widgets; - card->num_dapm_widgets = num_widgets; + card->of_dapm_widgets = widgets; + card->num_of_dapm_widgets = num_widgets; return 0; } @@ -3357,8 +3365,8 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card, } } - card->num_dapm_routes = num_routes; - card->dapm_routes = routes; + card->num_of_dapm_routes = num_routes; + card->of_dapm_routes = routes; return 0; } |