diff options
author | Jiri Kosina <jkosina@suse.cz> | 2013-01-29 04:48:30 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2013-01-29 04:48:30 -0500 |
commit | 617677295b53a40d0e54aac4cbbc216ffbc755dd (patch) | |
tree | 51b9e87213243ed5efff252c8e8d8fec4eebc588 /sound/soc/soc-dapm.c | |
parent | 5c8d1b68e01a144813e38795fe6dbe7ebb506131 (diff) | |
parent | 6abb7c25775b7fb2225ad0508236d63ca710e65f (diff) |
Merge branch 'master' into for-next
Conflicts:
drivers/devfreq/exynos4_bus.c
Sync with Linus' tree to be able to apply patches that are
against newer code (mvneta).
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r-- | sound/soc/soc-dapm.c | 136 |
1 files changed, 75 insertions, 61 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index d0a4be38dc0f..1e36bc81e5af 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -220,7 +220,7 @@ static int soc_widget_read(struct snd_soc_dapm_widget *w, int reg) | |||
220 | else if (w->platform) | 220 | else if (w->platform) |
221 | return snd_soc_platform_read(w->platform, reg); | 221 | return snd_soc_platform_read(w->platform, reg); |
222 | 222 | ||
223 | dev_err(w->dapm->dev, "no valid widget read method\n"); | 223 | dev_err(w->dapm->dev, "ASoC: no valid widget read method\n"); |
224 | return -1; | 224 | return -1; |
225 | } | 225 | } |
226 | 226 | ||
@@ -231,7 +231,7 @@ static int soc_widget_write(struct snd_soc_dapm_widget *w, int reg, int val) | |||
231 | else if (w->platform) | 231 | else if (w->platform) |
232 | return snd_soc_platform_write(w->platform, reg, val); | 232 | return snd_soc_platform_write(w->platform, reg, val); |
233 | 233 | ||
234 | dev_err(w->dapm->dev, "no valid widget write method\n"); | 234 | dev_err(w->dapm->dev, "ASoC: no valid widget write method\n"); |
235 | return -1; | 235 | return -1; |
236 | } | 236 | } |
237 | 237 | ||
@@ -546,7 +546,7 @@ static int dapm_new_mixer(struct snd_soc_dapm_widget *w) | |||
546 | wlist = kzalloc(wlistsize, GFP_KERNEL); | 546 | wlist = kzalloc(wlistsize, GFP_KERNEL); |
547 | if (wlist == NULL) { | 547 | if (wlist == NULL) { |
548 | dev_err(dapm->dev, | 548 | dev_err(dapm->dev, |
549 | "asoc: can't allocate widget list for %s\n", | 549 | "ASoC: can't allocate widget list for %s\n", |
550 | w->name); | 550 | w->name); |
551 | return -ENOMEM; | 551 | return -ENOMEM; |
552 | } | 552 | } |
@@ -595,9 +595,9 @@ static int dapm_new_mixer(struct snd_soc_dapm_widget *w) | |||
595 | prefix); | 595 | prefix); |
596 | ret = snd_ctl_add(card, path->kcontrol); | 596 | ret = snd_ctl_add(card, path->kcontrol); |
597 | if (ret < 0) { | 597 | if (ret < 0) { |
598 | dev_err(dapm->dev, | 598 | dev_err(dapm->dev, "ASoC: failed to add widget" |
599 | "asoc: failed to add dapm kcontrol %s: %d\n", | 599 | " %s dapm kcontrol %s: %d\n", |
600 | path->long_name, ret); | 600 | w->name, path->long_name, ret); |
601 | kfree(wlist); | 601 | kfree(wlist); |
602 | kfree(path->long_name); | 602 | kfree(path->long_name); |
603 | path->long_name = NULL; | 603 | path->long_name = NULL; |
@@ -626,7 +626,7 @@ static int dapm_new_mux(struct snd_soc_dapm_widget *w) | |||
626 | 626 | ||
627 | if (w->num_kcontrols != 1) { | 627 | if (w->num_kcontrols != 1) { |
628 | dev_err(dapm->dev, | 628 | dev_err(dapm->dev, |
629 | "asoc: mux %s has incorrect number of controls\n", | 629 | "ASoC: mux %s has incorrect number of controls\n", |
630 | w->name); | 630 | w->name); |
631 | return -EINVAL; | 631 | return -EINVAL; |
632 | } | 632 | } |
@@ -645,7 +645,7 @@ static int dapm_new_mux(struct snd_soc_dapm_widget *w) | |||
645 | wlist = krealloc(wlist, wlistsize, GFP_KERNEL); | 645 | wlist = krealloc(wlist, wlistsize, GFP_KERNEL); |
646 | if (wlist == NULL) { | 646 | if (wlist == NULL) { |
647 | dev_err(dapm->dev, | 647 | dev_err(dapm->dev, |
648 | "asoc: can't allocate widget list for %s\n", w->name); | 648 | "ASoC: can't allocate widget list for %s\n", w->name); |
649 | return -ENOMEM; | 649 | return -ENOMEM; |
650 | } | 650 | } |
651 | wlist->num_widgets = wlistentries; | 651 | wlist->num_widgets = wlistentries; |
@@ -677,7 +677,7 @@ static int dapm_new_mux(struct snd_soc_dapm_widget *w) | |||
677 | name + prefix_len, prefix); | 677 | name + prefix_len, prefix); |
678 | ret = snd_ctl_add(card, kcontrol); | 678 | ret = snd_ctl_add(card, kcontrol); |
679 | if (ret < 0) { | 679 | if (ret < 0) { |
680 | dev_err(dapm->dev, "failed to add kcontrol %s: %d\n", | 680 | dev_err(dapm->dev, "ASoC: failed to add kcontrol %s: %d\n", |
681 | w->name, ret); | 681 | w->name, ret); |
682 | kfree(wlist); | 682 | kfree(wlist); |
683 | return ret; | 683 | return ret; |
@@ -699,7 +699,7 @@ static int dapm_new_pga(struct snd_soc_dapm_widget *w) | |||
699 | { | 699 | { |
700 | if (w->num_kcontrols) | 700 | if (w->num_kcontrols) |
701 | dev_err(w->dapm->dev, | 701 | dev_err(w->dapm->dev, |
702 | "asoc: PGA controls not supported: '%s'\n", w->name); | 702 | "ASoC: PGA controls not supported: '%s'\n", w->name); |
703 | 703 | ||
704 | return 0; | 704 | return 0; |
705 | } | 705 | } |
@@ -725,7 +725,7 @@ static int snd_soc_dapm_suspend_check(struct snd_soc_dapm_widget *widget) | |||
725 | case SNDRV_CTL_POWER_D3hot: | 725 | case SNDRV_CTL_POWER_D3hot: |
726 | case SNDRV_CTL_POWER_D3cold: | 726 | case SNDRV_CTL_POWER_D3cold: |
727 | if (widget->ignore_suspend) | 727 | if (widget->ignore_suspend) |
728 | dev_dbg(widget->dapm->dev, "%s ignoring suspend\n", | 728 | dev_dbg(widget->dapm->dev, "ASoC: %s ignoring suspend\n", |
729 | widget->name); | 729 | widget->name); |
730 | return widget->ignore_suspend; | 730 | return widget->ignore_suspend; |
731 | default: | 731 | default: |
@@ -757,14 +757,14 @@ static int dapm_list_add_widget(struct snd_soc_dapm_widget_list **list, | |||
757 | wlistentries * sizeof(struct snd_soc_dapm_widget *); | 757 | wlistentries * sizeof(struct snd_soc_dapm_widget *); |
758 | *list = krealloc(wlist, wlistsize, GFP_KERNEL); | 758 | *list = krealloc(wlist, wlistsize, GFP_KERNEL); |
759 | if (*list == NULL) { | 759 | if (*list == NULL) { |
760 | dev_err(w->dapm->dev, "can't allocate widget list for %s\n", | 760 | dev_err(w->dapm->dev, "ASoC: can't allocate widget list for %s\n", |
761 | w->name); | 761 | w->name); |
762 | return -ENOMEM; | 762 | return -ENOMEM; |
763 | } | 763 | } |
764 | wlist = *list; | 764 | wlist = *list; |
765 | 765 | ||
766 | /* insert the widget */ | 766 | /* insert the widget */ |
767 | dev_dbg(w->dapm->dev, "added %s in widget list pos %d\n", | 767 | dev_dbg(w->dapm->dev, "ASoC: added %s in widget list pos %d\n", |
768 | w->name, wlist->num_widgets); | 768 | w->name, wlist->num_widgets); |
769 | 769 | ||
770 | wlist->widgets[wlist->num_widgets] = w; | 770 | wlist->widgets[wlist->num_widgets] = w; |
@@ -844,7 +844,8 @@ static int is_connected_output_ep(struct snd_soc_dapm_widget *widget, | |||
844 | int err; | 844 | int err; |
845 | err = dapm_list_add_widget(list, path->sink); | 845 | err = dapm_list_add_widget(list, path->sink); |
846 | if (err < 0) { | 846 | if (err < 0) { |
847 | dev_err(widget->dapm->dev, "could not add widget %s\n", | 847 | dev_err(widget->dapm->dev, |
848 | "ASoC: could not add widget %s\n", | ||
848 | widget->name); | 849 | widget->name); |
849 | return con; | 850 | return con; |
850 | } | 851 | } |
@@ -943,7 +944,8 @@ static int is_connected_input_ep(struct snd_soc_dapm_widget *widget, | |||
943 | int err; | 944 | int err; |
944 | err = dapm_list_add_widget(list, path->source); | 945 | err = dapm_list_add_widget(list, path->source); |
945 | if (err < 0) { | 946 | if (err < 0) { |
946 | dev_err(widget->dapm->dev, "could not add widget %s\n", | 947 | dev_err(widget->dapm->dev, |
948 | "ASoC: could not add widget %s\n", | ||
947 | widget->name); | 949 | widget->name); |
948 | return con; | 950 | return con; |
949 | } | 951 | } |
@@ -1024,7 +1026,7 @@ int dapm_regulator_event(struct snd_soc_dapm_widget *w, | |||
1024 | ret = regulator_allow_bypass(w->regulator, true); | 1026 | ret = regulator_allow_bypass(w->regulator, true); |
1025 | if (ret != 0) | 1027 | if (ret != 0) |
1026 | dev_warn(w->dapm->dev, | 1028 | dev_warn(w->dapm->dev, |
1027 | "Failed to bypass %s: %d\n", | 1029 | "ASoC: Failed to bypass %s: %d\n", |
1028 | w->name, ret); | 1030 | w->name, ret); |
1029 | } | 1031 | } |
1030 | 1032 | ||
@@ -1034,7 +1036,7 @@ int dapm_regulator_event(struct snd_soc_dapm_widget *w, | |||
1034 | ret = regulator_allow_bypass(w->regulator, false); | 1036 | ret = regulator_allow_bypass(w->regulator, false); |
1035 | if (ret != 0) | 1037 | if (ret != 0) |
1036 | dev_warn(w->dapm->dev, | 1038 | dev_warn(w->dapm->dev, |
1037 | "Failed to unbypass %s: %d\n", | 1039 | "ASoC: Failed to unbypass %s: %d\n", |
1038 | w->name, ret); | 1040 | w->name, ret); |
1039 | } | 1041 | } |
1040 | 1042 | ||
@@ -1253,7 +1255,7 @@ static void dapm_seq_check_event(struct snd_soc_dapm_context *dapm, | |||
1253 | ret = w->event(w, NULL, event); | 1255 | ret = w->event(w, NULL, event); |
1254 | trace_snd_soc_dapm_widget_event_done(w, event); | 1256 | trace_snd_soc_dapm_widget_event_done(w, event); |
1255 | if (ret < 0) | 1257 | if (ret < 0) |
1256 | pr_err("%s: %s event failed: %d\n", | 1258 | dev_err(dapm->dev, "ASoC: %s: %s event failed: %d\n", |
1257 | ev_name, w->name, ret); | 1259 | ev_name, w->name, ret); |
1258 | } | 1260 | } |
1259 | } | 1261 | } |
@@ -1402,7 +1404,7 @@ static void dapm_seq_run(struct snd_soc_dapm_context *dapm, | |||
1402 | 1404 | ||
1403 | if (ret < 0) | 1405 | if (ret < 0) |
1404 | dev_err(w->dapm->dev, | 1406 | dev_err(w->dapm->dev, |
1405 | "Failed to apply widget power: %d\n", ret); | 1407 | "ASoC: Failed to apply widget power: %d\n", ret); |
1406 | } | 1408 | } |
1407 | 1409 | ||
1408 | if (!list_empty(&pending)) | 1410 | if (!list_empty(&pending)) |
@@ -1431,20 +1433,21 @@ static void dapm_widget_update(struct snd_soc_dapm_context *dapm) | |||
1431 | (w->event_flags & SND_SOC_DAPM_PRE_REG)) { | 1433 | (w->event_flags & SND_SOC_DAPM_PRE_REG)) { |
1432 | ret = w->event(w, update->kcontrol, SND_SOC_DAPM_PRE_REG); | 1434 | ret = w->event(w, update->kcontrol, SND_SOC_DAPM_PRE_REG); |
1433 | if (ret != 0) | 1435 | if (ret != 0) |
1434 | pr_err("%s DAPM pre-event failed: %d\n", | 1436 | dev_err(dapm->dev, "ASoC: %s DAPM pre-event failed: %d\n", |
1435 | w->name, ret); | 1437 | w->name, ret); |
1436 | } | 1438 | } |
1437 | 1439 | ||
1438 | ret = soc_widget_update_bits_locked(w, update->reg, update->mask, | 1440 | ret = soc_widget_update_bits_locked(w, update->reg, update->mask, |
1439 | update->val); | 1441 | update->val); |
1440 | if (ret < 0) | 1442 | if (ret < 0) |
1441 | pr_err("%s DAPM update failed: %d\n", w->name, ret); | 1443 | dev_err(dapm->dev, "ASoC: %s DAPM update failed: %d\n", |
1444 | w->name, ret); | ||
1442 | 1445 | ||
1443 | if (w->event && | 1446 | if (w->event && |
1444 | (w->event_flags & SND_SOC_DAPM_POST_REG)) { | 1447 | (w->event_flags & SND_SOC_DAPM_POST_REG)) { |
1445 | ret = w->event(w, update->kcontrol, SND_SOC_DAPM_POST_REG); | 1448 | ret = w->event(w, update->kcontrol, SND_SOC_DAPM_POST_REG); |
1446 | if (ret != 0) | 1449 | if (ret != 0) |
1447 | pr_err("%s DAPM post-event failed: %d\n", | 1450 | dev_err(dapm->dev, "ASoC: %s DAPM post-event failed: %d\n", |
1448 | w->name, ret); | 1451 | w->name, ret); |
1449 | } | 1452 | } |
1450 | } | 1453 | } |
@@ -1466,7 +1469,7 @@ static void dapm_pre_sequence_async(void *data, async_cookie_t cookie) | |||
1466 | ret = snd_soc_dapm_set_bias_level(d, SND_SOC_BIAS_STANDBY); | 1469 | ret = snd_soc_dapm_set_bias_level(d, SND_SOC_BIAS_STANDBY); |
1467 | if (ret != 0) | 1470 | if (ret != 0) |
1468 | dev_err(d->dev, | 1471 | dev_err(d->dev, |
1469 | "Failed to turn on bias: %d\n", ret); | 1472 | "ASoC: Failed to turn on bias: %d\n", ret); |
1470 | } | 1473 | } |
1471 | 1474 | ||
1472 | /* Prepare for a STADDBY->ON or ON->STANDBY transition */ | 1475 | /* Prepare for a STADDBY->ON or ON->STANDBY transition */ |
@@ -1474,7 +1477,7 @@ static void dapm_pre_sequence_async(void *data, async_cookie_t cookie) | |||
1474 | ret = snd_soc_dapm_set_bias_level(d, SND_SOC_BIAS_PREPARE); | 1477 | ret = snd_soc_dapm_set_bias_level(d, SND_SOC_BIAS_PREPARE); |
1475 | if (ret != 0) | 1478 | if (ret != 0) |
1476 | dev_err(d->dev, | 1479 | dev_err(d->dev, |
1477 | "Failed to prepare bias: %d\n", ret); | 1480 | "ASoC: Failed to prepare bias: %d\n", ret); |
1478 | } | 1481 | } |
1479 | } | 1482 | } |
1480 | 1483 | ||
@@ -1492,7 +1495,7 @@ static void dapm_post_sequence_async(void *data, async_cookie_t cookie) | |||
1492 | d->target_bias_level == SND_SOC_BIAS_OFF)) { | 1495 | d->target_bias_level == SND_SOC_BIAS_OFF)) { |
1493 | ret = snd_soc_dapm_set_bias_level(d, SND_SOC_BIAS_STANDBY); | 1496 | ret = snd_soc_dapm_set_bias_level(d, SND_SOC_BIAS_STANDBY); |
1494 | if (ret != 0) | 1497 | if (ret != 0) |
1495 | dev_err(d->dev, "Failed to apply standby bias: %d\n", | 1498 | dev_err(d->dev, "ASoC: Failed to apply standby bias: %d\n", |
1496 | ret); | 1499 | ret); |
1497 | } | 1500 | } |
1498 | 1501 | ||
@@ -1501,7 +1504,8 @@ static void dapm_post_sequence_async(void *data, async_cookie_t cookie) | |||
1501 | d->target_bias_level == SND_SOC_BIAS_OFF) { | 1504 | d->target_bias_level == SND_SOC_BIAS_OFF) { |
1502 | ret = snd_soc_dapm_set_bias_level(d, SND_SOC_BIAS_OFF); | 1505 | ret = snd_soc_dapm_set_bias_level(d, SND_SOC_BIAS_OFF); |
1503 | if (ret != 0) | 1506 | if (ret != 0) |
1504 | dev_err(d->dev, "Failed to turn off bias: %d\n", ret); | 1507 | dev_err(d->dev, "ASoC: Failed to turn off bias: %d\n", |
1508 | ret); | ||
1505 | 1509 | ||
1506 | if (d->dev) | 1510 | if (d->dev) |
1507 | pm_runtime_put(d->dev); | 1511 | pm_runtime_put(d->dev); |
@@ -1512,7 +1516,7 @@ static void dapm_post_sequence_async(void *data, async_cookie_t cookie) | |||
1512 | d->target_bias_level == SND_SOC_BIAS_ON) { | 1516 | d->target_bias_level == SND_SOC_BIAS_ON) { |
1513 | ret = snd_soc_dapm_set_bias_level(d, SND_SOC_BIAS_ON); | 1517 | ret = snd_soc_dapm_set_bias_level(d, SND_SOC_BIAS_ON); |
1514 | if (ret != 0) | 1518 | if (ret != 0) |
1515 | dev_err(d->dev, "Failed to apply active bias: %d\n", | 1519 | dev_err(d->dev, "ASoC: Failed to apply active bias: %d\n", |
1516 | ret); | 1520 | ret); |
1517 | } | 1521 | } |
1518 | } | 1522 | } |
@@ -1838,7 +1842,7 @@ void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm, | |||
1838 | 1842 | ||
1839 | if (!dapm->debugfs_dapm) { | 1843 | if (!dapm->debugfs_dapm) { |
1840 | dev_warn(dapm->dev, | 1844 | dev_warn(dapm->dev, |
1841 | "Failed to create DAPM debugfs directory\n"); | 1845 | "ASoC: Failed to create DAPM debugfs directory\n"); |
1842 | return; | 1846 | return; |
1843 | } | 1847 | } |
1844 | 1848 | ||
@@ -2123,7 +2127,7 @@ static int snd_soc_dapm_set_pin(struct snd_soc_dapm_context *dapm, | |||
2123 | struct snd_soc_dapm_widget *w = dapm_find_widget(dapm, pin, true); | 2127 | struct snd_soc_dapm_widget *w = dapm_find_widget(dapm, pin, true); |
2124 | 2128 | ||
2125 | if (!w) { | 2129 | if (!w) { |
2126 | dev_err(dapm->dev, "dapm: unknown pin %s\n", pin); | 2130 | dev_err(dapm->dev, "ASoC: DAPM unknown pin %s\n", pin); |
2127 | return -EINVAL; | 2131 | return -EINVAL; |
2128 | } | 2132 | } |
2129 | 2133 | ||
@@ -2212,8 +2216,16 @@ static int snd_soc_dapm_add_route(struct snd_soc_dapm_context *dapm, | |||
2212 | if (!wsource) | 2216 | if (!wsource) |
2213 | wsource = wtsource; | 2217 | wsource = wtsource; |
2214 | 2218 | ||
2215 | if (wsource == NULL || wsink == NULL) | 2219 | if (wsource == NULL) { |
2220 | dev_err(dapm->dev, "ASoC: no source widget found for %s\n", | ||
2221 | route->source); | ||
2216 | return -ENODEV; | 2222 | return -ENODEV; |
2223 | } | ||
2224 | if (wsink == NULL) { | ||
2225 | dev_err(dapm->dev, "ASoC: no sink widget found for %s\n", | ||
2226 | route->sink); | ||
2227 | return -ENODEV; | ||
2228 | } | ||
2217 | 2229 | ||
2218 | path = kzalloc(sizeof(struct snd_soc_dapm_path), GFP_KERNEL); | 2230 | path = kzalloc(sizeof(struct snd_soc_dapm_path), GFP_KERNEL); |
2219 | if (!path) | 2231 | if (!path) |
@@ -2308,7 +2320,7 @@ static int snd_soc_dapm_add_route(struct snd_soc_dapm_context *dapm, | |||
2308 | return 0; | 2320 | return 0; |
2309 | 2321 | ||
2310 | err: | 2322 | err: |
2311 | dev_warn(dapm->dev, "asoc: no dapm match for %s --> %s --> %s\n", | 2323 | dev_warn(dapm->dev, "ASoC: no dapm match for %s --> %s --> %s\n", |
2312 | source, control, sink); | 2324 | source, control, sink); |
2313 | kfree(path); | 2325 | kfree(path); |
2314 | return ret; | 2326 | return ret; |
@@ -2325,7 +2337,7 @@ static int snd_soc_dapm_del_route(struct snd_soc_dapm_context *dapm, | |||
2325 | 2337 | ||
2326 | if (route->control) { | 2338 | if (route->control) { |
2327 | dev_err(dapm->dev, | 2339 | dev_err(dapm->dev, |
2328 | "Removal of routes with controls not supported\n"); | 2340 | "ASoC: Removal of routes with controls not supported\n"); |
2329 | return -EINVAL; | 2341 | return -EINVAL; |
2330 | } | 2342 | } |
2331 | 2343 | ||
@@ -2360,7 +2372,7 @@ static int snd_soc_dapm_del_route(struct snd_soc_dapm_context *dapm, | |||
2360 | list_del(&path->list_source); | 2372 | list_del(&path->list_source); |
2361 | kfree(path); | 2373 | kfree(path); |
2362 | } else { | 2374 | } else { |
2363 | dev_warn(dapm->dev, "Route %s->%s does not exist\n", | 2375 | dev_warn(dapm->dev, "ASoC: Route %s->%s does not exist\n", |
2364 | source, sink); | 2376 | source, sink); |
2365 | } | 2377 | } |
2366 | 2378 | ||
@@ -2389,8 +2401,10 @@ int snd_soc_dapm_add_routes(struct snd_soc_dapm_context *dapm, | |||
2389 | for (i = 0; i < num; i++) { | 2401 | for (i = 0; i < num; i++) { |
2390 | r = snd_soc_dapm_add_route(dapm, route); | 2402 | r = snd_soc_dapm_add_route(dapm, route); |
2391 | if (r < 0) { | 2403 | if (r < 0) { |
2392 | dev_err(dapm->dev, "Failed to add route %s->%s\n", | 2404 | dev_err(dapm->dev, "ASoC: Failed to add route %s -> %s -> %s\n", |
2393 | route->source, route->sink); | 2405 | route->source, |
2406 | route->control ? route->control : "direct", | ||
2407 | route->sink); | ||
2394 | ret = r; | 2408 | ret = r; |
2395 | } | 2409 | } |
2396 | route++; | 2410 | route++; |
@@ -2438,19 +2452,19 @@ static int snd_soc_dapm_weak_route(struct snd_soc_dapm_context *dapm, | |||
2438 | int count = 0; | 2452 | int count = 0; |
2439 | 2453 | ||
2440 | if (!source) { | 2454 | if (!source) { |
2441 | dev_err(dapm->dev, "Unable to find source %s for weak route\n", | 2455 | dev_err(dapm->dev, "ASoC: Unable to find source %s for weak route\n", |
2442 | route->source); | 2456 | route->source); |
2443 | return -ENODEV; | 2457 | return -ENODEV; |
2444 | } | 2458 | } |
2445 | 2459 | ||
2446 | if (!sink) { | 2460 | if (!sink) { |
2447 | dev_err(dapm->dev, "Unable to find sink %s for weak route\n", | 2461 | dev_err(dapm->dev, "ASoC: Unable to find sink %s for weak route\n", |
2448 | route->sink); | 2462 | route->sink); |
2449 | return -ENODEV; | 2463 | return -ENODEV; |
2450 | } | 2464 | } |
2451 | 2465 | ||
2452 | if (route->control || route->connected) | 2466 | if (route->control || route->connected) |
2453 | dev_warn(dapm->dev, "Ignoring control for weak route %s->%s\n", | 2467 | dev_warn(dapm->dev, "ASoC: Ignoring control for weak route %s->%s\n", |
2454 | route->source, route->sink); | 2468 | route->source, route->sink); |
2455 | 2469 | ||
2456 | list_for_each_entry(path, &source->sinks, list_source) { | 2470 | list_for_each_entry(path, &source->sinks, list_source) { |
@@ -2461,10 +2475,10 @@ static int snd_soc_dapm_weak_route(struct snd_soc_dapm_context *dapm, | |||
2461 | } | 2475 | } |
2462 | 2476 | ||
2463 | if (count == 0) | 2477 | if (count == 0) |
2464 | dev_err(dapm->dev, "No path found for weak route %s->%s\n", | 2478 | dev_err(dapm->dev, "ASoC: No path found for weak route %s->%s\n", |
2465 | route->source, route->sink); | 2479 | route->source, route->sink); |
2466 | if (count > 1) | 2480 | if (count > 1) |
2467 | dev_warn(dapm->dev, "%d paths found for weak route %s->%s\n", | 2481 | dev_warn(dapm->dev, "ASoC: %d paths found for weak route %s->%s\n", |
2468 | count, route->source, route->sink); | 2482 | count, route->source, route->sink); |
2469 | 2483 | ||
2470 | return 0; | 2484 | return 0; |
@@ -2601,7 +2615,7 @@ int snd_soc_dapm_get_volsw(struct snd_kcontrol *kcontrol, | |||
2601 | 2615 | ||
2602 | if (snd_soc_volsw_is_stereo(mc)) | 2616 | if (snd_soc_volsw_is_stereo(mc)) |
2603 | dev_warn(widget->dapm->dev, | 2617 | dev_warn(widget->dapm->dev, |
2604 | "Control '%s' is stereo, which is not supported\n", | 2618 | "ASoC: Control '%s' is stereo, which is not supported\n", |
2605 | kcontrol->id.name); | 2619 | kcontrol->id.name); |
2606 | 2620 | ||
2607 | ucontrol->value.integer.value[0] = | 2621 | ucontrol->value.integer.value[0] = |
@@ -2644,7 +2658,7 @@ int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol, | |||
2644 | 2658 | ||
2645 | if (snd_soc_volsw_is_stereo(mc)) | 2659 | if (snd_soc_volsw_is_stereo(mc)) |
2646 | dev_warn(widget->dapm->dev, | 2660 | dev_warn(widget->dapm->dev, |
2647 | "Control '%s' is stereo, which is not supported\n", | 2661 | "ASoC: Control '%s' is stereo, which is not supported\n", |
2648 | kcontrol->id.name); | 2662 | kcontrol->id.name); |
2649 | 2663 | ||
2650 | val = (ucontrol->value.integer.value[0] & mask); | 2664 | val = (ucontrol->value.integer.value[0] & mask); |
@@ -3021,7 +3035,7 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm, | |||
3021 | w->regulator = devm_regulator_get(dapm->dev, w->name); | 3035 | w->regulator = devm_regulator_get(dapm->dev, w->name); |
3022 | if (IS_ERR(w->regulator)) { | 3036 | if (IS_ERR(w->regulator)) { |
3023 | ret = PTR_ERR(w->regulator); | 3037 | ret = PTR_ERR(w->regulator); |
3024 | dev_err(dapm->dev, "Failed to request %s: %d\n", | 3038 | dev_err(dapm->dev, "ASoC: Failed to request %s: %d\n", |
3025 | w->name, ret); | 3039 | w->name, ret); |
3026 | return NULL; | 3040 | return NULL; |
3027 | } | 3041 | } |
@@ -3031,7 +3045,7 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm, | |||
3031 | w->clk = devm_clk_get(dapm->dev, w->name); | 3045 | w->clk = devm_clk_get(dapm->dev, w->name); |
3032 | if (IS_ERR(w->clk)) { | 3046 | if (IS_ERR(w->clk)) { |
3033 | ret = PTR_ERR(w->clk); | 3047 | ret = PTR_ERR(w->clk); |
3034 | dev_err(dapm->dev, "Failed to request %s: %d\n", | 3048 | dev_err(dapm->dev, "ASoC: Failed to request %s: %d\n", |
3035 | w->name, ret); | 3049 | w->name, ret); |
3036 | return NULL; | 3050 | return NULL; |
3037 | } | 3051 | } |
@@ -3182,7 +3196,7 @@ static int snd_soc_dai_link_event(struct snd_soc_dapm_widget *w, | |||
3182 | if (config->formats) { | 3196 | if (config->formats) { |
3183 | fmt = ffs(config->formats) - 1; | 3197 | fmt = ffs(config->formats) - 1; |
3184 | } else { | 3198 | } else { |
3185 | dev_warn(w->dapm->dev, "Invalid format %llx specified\n", | 3199 | dev_warn(w->dapm->dev, "ASoC: Invalid format %llx specified\n", |
3186 | config->formats); | 3200 | config->formats); |
3187 | fmt = 0; | 3201 | fmt = 0; |
3188 | } | 3202 | } |
@@ -3215,7 +3229,7 @@ static int snd_soc_dai_link_event(struct snd_soc_dapm_widget *w, | |||
3215 | params, source); | 3229 | params, source); |
3216 | if (ret != 0) { | 3230 | if (ret != 0) { |
3217 | dev_err(source->dev, | 3231 | dev_err(source->dev, |
3218 | "hw_params() failed: %d\n", ret); | 3232 | "ASoC: hw_params() failed: %d\n", ret); |
3219 | goto out; | 3233 | goto out; |
3220 | } | 3234 | } |
3221 | } | 3235 | } |
@@ -3226,7 +3240,7 @@ static int snd_soc_dai_link_event(struct snd_soc_dapm_widget *w, | |||
3226 | sink); | 3240 | sink); |
3227 | if (ret != 0) { | 3241 | if (ret != 0) { |
3228 | dev_err(sink->dev, | 3242 | dev_err(sink->dev, |
3229 | "hw_params() failed: %d\n", ret); | 3243 | "ASoC: hw_params() failed: %d\n", ret); |
3230 | goto out; | 3244 | goto out; |
3231 | } | 3245 | } |
3232 | } | 3246 | } |
@@ -3235,14 +3249,14 @@ static int snd_soc_dai_link_event(struct snd_soc_dapm_widget *w, | |||
3235 | case SND_SOC_DAPM_POST_PMU: | 3249 | case SND_SOC_DAPM_POST_PMU: |
3236 | ret = snd_soc_dai_digital_mute(sink, 0); | 3250 | ret = snd_soc_dai_digital_mute(sink, 0); |
3237 | if (ret != 0 && ret != -ENOTSUPP) | 3251 | if (ret != 0 && ret != -ENOTSUPP) |
3238 | dev_warn(sink->dev, "Failed to unmute: %d\n", ret); | 3252 | dev_warn(sink->dev, "ASoC: Failed to unmute: %d\n", ret); |
3239 | ret = 0; | 3253 | ret = 0; |
3240 | break; | 3254 | break; |
3241 | 3255 | ||
3242 | case SND_SOC_DAPM_PRE_PMD: | 3256 | case SND_SOC_DAPM_PRE_PMD: |
3243 | ret = snd_soc_dai_digital_mute(sink, 1); | 3257 | ret = snd_soc_dai_digital_mute(sink, 1); |
3244 | if (ret != 0 && ret != -ENOTSUPP) | 3258 | if (ret != 0 && ret != -ENOTSUPP) |
3245 | dev_warn(sink->dev, "Failed to mute: %d\n", ret); | 3259 | dev_warn(sink->dev, "ASoC: Failed to mute: %d\n", ret); |
3246 | ret = 0; | 3260 | ret = 0; |
3247 | break; | 3261 | break; |
3248 | 3262 | ||
@@ -3281,11 +3295,11 @@ int snd_soc_dapm_new_pcm(struct snd_soc_card *card, | |||
3281 | template.event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU | | 3295 | template.event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU | |
3282 | SND_SOC_DAPM_PRE_PMD; | 3296 | SND_SOC_DAPM_PRE_PMD; |
3283 | 3297 | ||
3284 | dev_dbg(card->dev, "adding %s widget\n", link_name); | 3298 | dev_dbg(card->dev, "ASoC: adding %s widget\n", link_name); |
3285 | 3299 | ||
3286 | w = snd_soc_dapm_new_control(&card->dapm, &template); | 3300 | w = snd_soc_dapm_new_control(&card->dapm, &template); |
3287 | if (!w) { | 3301 | if (!w) { |
3288 | dev_err(card->dev, "Failed to create %s widget\n", | 3302 | dev_err(card->dev, "ASoC: Failed to create %s widget\n", |
3289 | link_name); | 3303 | link_name); |
3290 | return -ENOMEM; | 3304 | return -ENOMEM; |
3291 | } | 3305 | } |
@@ -3319,12 +3333,12 @@ int snd_soc_dapm_new_dai_widgets(struct snd_soc_dapm_context *dapm, | |||
3319 | template.name = dai->driver->playback.stream_name; | 3333 | template.name = dai->driver->playback.stream_name; |
3320 | template.sname = dai->driver->playback.stream_name; | 3334 | template.sname = dai->driver->playback.stream_name; |
3321 | 3335 | ||
3322 | dev_dbg(dai->dev, "adding %s widget\n", | 3336 | dev_dbg(dai->dev, "ASoC: adding %s widget\n", |
3323 | template.name); | 3337 | template.name); |
3324 | 3338 | ||
3325 | w = snd_soc_dapm_new_control(dapm, &template); | 3339 | w = snd_soc_dapm_new_control(dapm, &template); |
3326 | if (!w) { | 3340 | if (!w) { |
3327 | dev_err(dapm->dev, "Failed to create %s widget\n", | 3341 | dev_err(dapm->dev, "ASoC: Failed to create %s widget\n", |
3328 | dai->driver->playback.stream_name); | 3342 | dai->driver->playback.stream_name); |
3329 | } | 3343 | } |
3330 | 3344 | ||
@@ -3337,12 +3351,12 @@ int snd_soc_dapm_new_dai_widgets(struct snd_soc_dapm_context *dapm, | |||
3337 | template.name = dai->driver->capture.stream_name; | 3351 | template.name = dai->driver->capture.stream_name; |
3338 | template.sname = dai->driver->capture.stream_name; | 3352 | template.sname = dai->driver->capture.stream_name; |
3339 | 3353 | ||
3340 | dev_dbg(dai->dev, "adding %s widget\n", | 3354 | dev_dbg(dai->dev, "ASoC: adding %s widget\n", |
3341 | template.name); | 3355 | template.name); |
3342 | 3356 | ||
3343 | w = snd_soc_dapm_new_control(dapm, &template); | 3357 | w = snd_soc_dapm_new_control(dapm, &template); |
3344 | if (!w) { | 3358 | if (!w) { |
3345 | dev_err(dapm->dev, "Failed to create %s widget\n", | 3359 | dev_err(dapm->dev, "ASoC: Failed to create %s widget\n", |
3346 | dai->driver->capture.stream_name); | 3360 | dai->driver->capture.stream_name); |
3347 | } | 3361 | } |
3348 | 3362 | ||
@@ -3518,11 +3532,11 @@ int snd_soc_dapm_force_enable_pin(struct snd_soc_dapm_context *dapm, | |||
3518 | struct snd_soc_dapm_widget *w = dapm_find_widget(dapm, pin, true); | 3532 | struct snd_soc_dapm_widget *w = dapm_find_widget(dapm, pin, true); |
3519 | 3533 | ||
3520 | if (!w) { | 3534 | if (!w) { |
3521 | dev_err(dapm->dev, "dapm: unknown pin %s\n", pin); | 3535 | dev_err(dapm->dev, "ASoC: unknown pin %s\n", pin); |
3522 | return -EINVAL; | 3536 | return -EINVAL; |
3523 | } | 3537 | } |
3524 | 3538 | ||
3525 | dev_dbg(w->dapm->dev, "dapm: force enable pin %s\n", pin); | 3539 | dev_dbg(w->dapm->dev, "ASoC: force enable pin %s\n", pin); |
3526 | w->connected = 1; | 3540 | w->connected = 1; |
3527 | w->force = 1; | 3541 | w->force = 1; |
3528 | dapm_mark_dirty(w, "force enable"); | 3542 | dapm_mark_dirty(w, "force enable"); |
@@ -3605,7 +3619,7 @@ int snd_soc_dapm_ignore_suspend(struct snd_soc_dapm_context *dapm, | |||
3605 | struct snd_soc_dapm_widget *w = dapm_find_widget(dapm, pin, false); | 3619 | struct snd_soc_dapm_widget *w = dapm_find_widget(dapm, pin, false); |
3606 | 3620 | ||
3607 | if (!w) { | 3621 | if (!w) { |
3608 | dev_err(dapm->dev, "dapm: unknown pin %s\n", pin); | 3622 | dev_err(dapm->dev, "ASoC: unknown pin %s\n", pin); |
3609 | return -EINVAL; | 3623 | return -EINVAL; |
3610 | } | 3624 | } |
3611 | 3625 | ||
@@ -3664,7 +3678,7 @@ void snd_soc_dapm_auto_nc_codec_pins(struct snd_soc_codec *codec) | |||
3664 | struct snd_soc_dapm_context *dapm = &codec->dapm; | 3678 | struct snd_soc_dapm_context *dapm = &codec->dapm; |
3665 | struct snd_soc_dapm_widget *w; | 3679 | struct snd_soc_dapm_widget *w; |
3666 | 3680 | ||
3667 | dev_dbg(codec->dev, "Auto NC: DAPMs: card:%p codec:%p\n", | 3681 | dev_dbg(codec->dev, "ASoC: Auto NC: DAPMs: card:%p codec:%p\n", |
3668 | &card->dapm, &codec->dapm); | 3682 | &card->dapm, &codec->dapm); |
3669 | 3683 | ||
3670 | list_for_each_entry(w, &card->widgets, list) { | 3684 | list_for_each_entry(w, &card->widgets, list) { |
@@ -3674,7 +3688,7 @@ void snd_soc_dapm_auto_nc_codec_pins(struct snd_soc_codec *codec) | |||
3674 | case snd_soc_dapm_input: | 3688 | case snd_soc_dapm_input: |
3675 | case snd_soc_dapm_output: | 3689 | case snd_soc_dapm_output: |
3676 | case snd_soc_dapm_micbias: | 3690 | case snd_soc_dapm_micbias: |
3677 | dev_dbg(codec->dev, "Auto NC: Checking widget %s\n", | 3691 | dev_dbg(codec->dev, "ASoC: Auto NC: Checking widget %s\n", |
3678 | w->name); | 3692 | w->name); |
3679 | if (!snd_soc_dapm_widget_in_card_paths(card, w)) { | 3693 | if (!snd_soc_dapm_widget_in_card_paths(card, w)) { |
3680 | dev_dbg(codec->dev, | 3694 | dev_dbg(codec->dev, |
@@ -3745,7 +3759,7 @@ void snd_soc_dapm_shutdown(struct snd_soc_card *card) | |||
3745 | { | 3759 | { |
3746 | struct snd_soc_codec *codec; | 3760 | struct snd_soc_codec *codec; |
3747 | 3761 | ||
3748 | list_for_each_entry(codec, &card->codec_dev_list, list) { | 3762 | list_for_each_entry(codec, &card->codec_dev_list, card_list) { |
3749 | soc_dapm_shutdown_codec(&codec->dapm); | 3763 | soc_dapm_shutdown_codec(&codec->dapm); |
3750 | if (codec->dapm.bias_level == SND_SOC_BIAS_STANDBY) | 3764 | if (codec->dapm.bias_level == SND_SOC_BIAS_STANDBY) |
3751 | snd_soc_dapm_set_bias_level(&codec->dapm, | 3765 | snd_soc_dapm_set_bias_level(&codec->dapm, |