diff options
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r-- | sound/soc/soc-dapm.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index d67c637557a7..4a440b52dd7a 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -443,6 +443,11 @@ static int dapm_new_mixer(struct snd_soc_dapm_widget *w) | |||
443 | if (path->name != (char *)w->kcontrol_news[i].name) | 443 | if (path->name != (char *)w->kcontrol_news[i].name) |
444 | continue; | 444 | continue; |
445 | 445 | ||
446 | if (w->kcontrols[i]) { | ||
447 | path->kcontrol = w->kcontrols[i]; | ||
448 | continue; | ||
449 | } | ||
450 | |||
446 | wlistsize = sizeof(struct snd_soc_dapm_widget_list) + | 451 | wlistsize = sizeof(struct snd_soc_dapm_widget_list) + |
447 | sizeof(struct snd_soc_dapm_widget *), | 452 | sizeof(struct snd_soc_dapm_widget *), |
448 | wlist = kzalloc(wlistsize, GFP_KERNEL); | 453 | wlist = kzalloc(wlistsize, GFP_KERNEL); |
@@ -579,8 +584,8 @@ static int dapm_new_mux(struct snd_soc_dapm_widget *w) | |||
579 | name + prefix_len, prefix); | 584 | name + prefix_len, prefix); |
580 | ret = snd_ctl_add(card, kcontrol); | 585 | ret = snd_ctl_add(card, kcontrol); |
581 | if (ret < 0) { | 586 | if (ret < 0) { |
582 | dev_err(dapm->dev, | 587 | dev_err(dapm->dev, "failed to add kcontrol %s: %d\n", |
583 | "asoc: failed to add kcontrol %s\n", w->name); | 588 | w->name, ret); |
584 | kfree(wlist); | 589 | kfree(wlist); |
585 | return ret; | 590 | return ret; |
586 | } | 591 | } |
@@ -1556,7 +1561,6 @@ static int dapm_mixer_update_power(struct snd_soc_dapm_widget *widget, | |||
1556 | /* found, now check type */ | 1561 | /* found, now check type */ |
1557 | found = 1; | 1562 | found = 1; |
1558 | path->connect = connect; | 1563 | path->connect = connect; |
1559 | break; | ||
1560 | } | 1564 | } |
1561 | 1565 | ||
1562 | if (found) | 1566 | if (found) |
@@ -2584,7 +2588,7 @@ static void soc_dapm_stream_event(struct snd_soc_dapm_context *dapm, | |||
2584 | { | 2588 | { |
2585 | if (!w->sname || w->dapm != dapm) | 2589 | if (!w->sname || w->dapm != dapm) |
2586 | continue; | 2590 | continue; |
2587 | dev_dbg(w->dapm->dev, "widget %s\n %s stream %s event %d\n", | 2591 | dev_vdbg(w->dapm->dev, "widget %s\n %s stream %s event %d\n", |
2588 | w->name, w->sname, stream, event); | 2592 | w->name, w->sname, stream, event); |
2589 | if (strstr(w->sname, stream)) { | 2593 | if (strstr(w->sname, stream)) { |
2590 | switch(event) { | 2594 | switch(event) { |
@@ -2604,6 +2608,10 @@ static void soc_dapm_stream_event(struct snd_soc_dapm_context *dapm, | |||
2604 | } | 2608 | } |
2605 | 2609 | ||
2606 | dapm_power_widgets(dapm, event); | 2610 | dapm_power_widgets(dapm, event); |
2611 | |||
2612 | /* do we need to notify any clients that DAPM stream is complete */ | ||
2613 | if (dapm->stream_event) | ||
2614 | dapm->stream_event(dapm, event); | ||
2607 | } | 2615 | } |
2608 | 2616 | ||
2609 | /** | 2617 | /** |