diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-04-13 11:23:18 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-04-13 11:23:18 +0300 |
commit | 9a4f35865ffcb2f4603375eadabe0d475fab1a0f (patch) | |
tree | 1465ac717deee029d3a9c1f7235ba85be57feefa /sound/soc/soc-core.c | |
parent | eef0342cf32689f77d78ee3302999e5caaa6a8f3 (diff) | |
parent | c30cf8cbe55413cd643a0bdd3442d75950caa918 (diff) | |
download | linux-9a4f35865ffcb2f4603375eadabe0d475fab1a0f.tar.xz |
Merge branch 'for-next' into for-linus
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 e5c990889dcc..07aa54385ae0 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1578,6 +1578,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); @@ -1633,6 +1637,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], @@ -3242,8 +3250,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; } @@ -3327,8 +3335,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; } |