Lines Matching refs:dapm

3 // soc-dapm.c  --  ALSA SoC Dynamic Audio Power Management
43 #define DAPM_UPDATE_STAT(widget, val) widget->dapm->card->dapm_stats.val++;
52 static int snd_soc_dapm_add_path(struct snd_soc_dapm_context *dapm,
59 snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
63 snd_soc_dapm_new_control_unlocked(struct snd_soc_dapm_context *dapm,
66 static unsigned int soc_dapm_read(struct snd_soc_dapm_context *dapm, int reg);
68 /* dapm power sequences - make this per codec in the future */
151 static void dapm_assert_locked(struct snd_soc_dapm_context *dapm)
153 if (snd_soc_card_is_instantiated(dapm->card))
154 snd_soc_dapm_mutex_assert_held(dapm);
191 dapm_assert_locked(w->dapm);
194 dev_vdbg(w->dapm->dev, "Marking %s dirty due to %s\n",
196 list_add_tail(&w->dirty, &w->dapm->card->dapm_dirty);
215 dapm_assert_locked(w->dapm);
322 /* create a new dapm widget */
383 dev_warn(widget->dapm->dev,
409 snd_soc_dapm_new_control_unlocked(widget->dapm,
444 widget->dapm, &template);
451 snd_soc_dapm_add_path(widget->dapm, data->widget,
454 data->value = soc_dapm_read(widget->dapm, e->reg) &
595 * snd_soc_dapm_kcontrol_dapm() - Returns the dapm context associated to a
605 return dapm_kcontrol_get_wlist(kcontrol)->widgets[0]->dapm;
623 static const char *soc_dapm_prefix(struct snd_soc_dapm_context *dapm)
625 if (!dapm->component)
627 return dapm->component->name_prefix;
630 static unsigned int soc_dapm_read(struct snd_soc_dapm_context *dapm, int reg)
632 if (!dapm->component)
634 return snd_soc_component_read(dapm->component, reg);
637 static int soc_dapm_update_bits(struct snd_soc_dapm_context *dapm,
640 if (!dapm->component)
642 return snd_soc_component_update_bits(dapm->component, reg,
646 static int soc_dapm_test_bits(struct snd_soc_dapm_context *dapm,
649 if (!dapm->component)
651 return snd_soc_component_test_bits(dapm->component, reg, mask, value);
654 static void soc_dapm_async_complete(struct snd_soc_dapm_context *dapm)
656 if (dapm->component)
657 snd_soc_component_async_complete(dapm->component);
664 struct list_head *wlist = &w->dapm->card->widgets;
682 * @dapm: The DAPM context for which to set the level
697 int snd_soc_dapm_force_bias_level(struct snd_soc_dapm_context *dapm,
702 if (dapm->component)
703 ret = snd_soc_component_set_bias_level(dapm->component, level);
706 dapm->bias_level = level;
714 * @dapm: DAPM context
721 static int snd_soc_dapm_set_bias_level(struct snd_soc_dapm_context *dapm,
724 struct snd_soc_card *card = dapm->card;
727 trace_snd_soc_bias_level_start(dapm, level);
729 ret = snd_soc_card_set_bias_level(card, dapm, level);
733 if (dapm != &card->dapm)
734 ret = snd_soc_dapm_force_bias_level(dapm, level);
739 ret = snd_soc_card_set_bias_level_post(card, dapm, level);
741 trace_snd_soc_bias_level_done(dapm, level);
747 static int dapm_connect_mux(struct snd_soc_dapm_context *dapm,
758 val = soc_dapm_read(dapm, e->reg);
794 unsigned int val = soc_dapm_read(p->sink->dapm, reg);
810 val = soc_dapm_read(p->sink->dapm, mc->rreg);
830 static int dapm_connect_mixer(struct snd_soc_dapm_context *dapm,
846 static int dapm_is_shared_kcontrol(struct snd_soc_dapm_context *dapm,
856 for_each_card_widgets(dapm->card, w) {
857 if (w == kcontrolw || w->dapm != kcontrolw->dapm)
878 struct snd_soc_dapm_context *dapm = w->dapm;
879 struct snd_card *card = dapm->card->snd_card;
889 prefix = soc_dapm_prefix(dapm);
895 shared = dapm_is_shared_kcontrol(dapm, w, &w->kcontrol_news[kci],
967 dev_err(dapm->dev,
968 "ASoC: failed to add widget %s dapm kcontrol %s: %d\n",
984 /* create new dapm mixer control */
1009 snd_soc_dapm_add_path(data->widget->dapm,
1019 /* create new dapm mux control */
1022 struct snd_soc_dapm_context *dapm = w->dapm;
1042 dev_err(dapm->dev,
1049 dev_err(dapm->dev, "ASoC: %s %s has no paths\n", type, w->name);
1065 /* create new dapm volume control */
1079 /* create new dapm dai link control */
1091 struct snd_soc_dapm_context *dapm = w->dapm;
1092 struct snd_card *card = dapm->card->snd_card;
1098 dev_err(dapm->dev,
1099 "ASoC: failed to add widget %s dapm kcontrol %s: %d\n",
1116 int level = snd_power_get_state(widget->dapm->card->snd_card);
1122 dev_dbg(widget->dapm->dev, "ASoC: %s ignoring suspend\n",
1254 * This function takes the dapm widget currently being examined and the walk
1272 * This function takes the dapm widget currently being examined and the walk
1298 * This function takes the dapm widget currently being examined and the walk
1355 soc_dapm_async_complete(w->dapm);
1361 dev_warn(w->dapm->dev,
1371 dev_warn(w->dapm->dev,
1415 soc_dapm_async_complete(w->dapm);
1512 if (a->dapm != b->dapm)
1513 return (unsigned long)a->dapm - (unsigned long)b->dapm;
1576 pop_dbg(w->dapm->dev, card->pop_time, "pop test : %s %s\n",
1578 soc_dapm_async_complete(w->dapm);
1583 dev_err(w->dapm->dev, "ASoC: %s: %s event failed: %d\n",
1592 struct snd_soc_dapm_context *dapm;
1600 dapm = w->dapm;
1603 WARN_ON(reg != w->reg || dapm != w->dapm);
1612 pop_dbg(dapm->dev, card->pop_time,
1626 pop_dbg(dapm->dev, card->pop_time,
1630 soc_dapm_update_bits(dapm, reg, mask, value);
1670 w->dapm != cur_dapm || w->subseq != cur_subseq) {
1682 if (cur_dapm && w->dapm != cur_dapm)
1722 cur_dapm = w->dapm;
1728 dev_err(w->dapm->dev,
1764 dev_err(w->dapm->dev, "ASoC: %s DAPM pre-event failed: %d\n",
1772 ret = soc_dapm_update_bits(w->dapm, update->reg, update->mask,
1775 dev_err(w->dapm->dev, "ASoC: %s DAPM update failed: %d\n",
1779 ret = soc_dapm_update_bits(w->dapm, update->reg2,
1782 dev_err(w->dapm->dev,
1791 dev_err(w->dapm->dev, "ASoC: %s DAPM post-event failed: %d\n",
1930 static bool dapm_idle_bias_off(struct snd_soc_dapm_context *dapm)
1932 if (dapm->idle_bias_off)
1935 switch (snd_power_get_state(dapm->card->snd_card)) {
1938 return dapm->suspend_bias_off;
1947 * Scan each dapm widget for complete audio path.
2000 d = w->dapm;
2043 dapm_pre_sequence_async(&card->dapm, 0);
2046 if (d != &card->dapm && d->bias_level != d->target_bias_level)
2070 if (d != &card->dapm && d->bias_level != d->target_bias_level)
2076 dapm_post_sequence_async(&card->dapm, 0);
2158 snd_soc_dapm_mutex_lock_root(w->dapm);
2197 c_name = p->node[rdir]->dapm->component ?
2198 p->node[rdir]->dapm->component->name : NULL;
2207 snd_soc_dapm_mutex_unlock(w->dapm);
2224 struct snd_soc_dapm_context *dapm = file->private_data;
2227 switch (dapm->bias_level) {
2241 WARN(1, "Unknown bias_level %d\n", dapm->bias_level);
2256 void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm,
2262 dapm->debugfs_dapm = debugfs_create_dir("dapm", parent);
2264 debugfs_create_file("bias_level", 0444, dapm->debugfs_dapm, dapm,
2270 struct snd_soc_dapm_context *dapm = w->dapm;
2272 if (!dapm->debugfs_dapm || !w->name)
2275 debugfs_create_file(w->name, 0444, dapm->debugfs_dapm, w,
2281 struct snd_soc_dapm_context *dapm = w->dapm;
2283 if (!dapm->debugfs_dapm || !w->name)
2286 debugfs_lookup_and_remove(w->name, dapm->debugfs_dapm);
2289 static void dapm_debugfs_cleanup(struct snd_soc_dapm_context *dapm)
2291 debugfs_remove_recursive(dapm->debugfs_dapm);
2292 dapm->debugfs_dapm = NULL;
2296 void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm,
2309 static inline void dapm_debugfs_cleanup(struct snd_soc_dapm_context *dapm)
2344 /* find dapm widget path assoc with kcontrol */
2362 int snd_soc_dapm_mux_update_power(struct snd_soc_dapm_context *dapm,
2366 struct snd_soc_card *card = dapm->card;
2390 /* find dapm widget path assoc with kcontrol */
2427 int snd_soc_dapm_mixer_update_power(struct snd_soc_dapm_context *dapm,
2431 struct snd_soc_card *card = dapm->card;
2448 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(cmpnt);
2460 if (w->dapm != dapm)
2490 switch (snd_soc_dapm_get_bias_level(dapm)) {
2509 /* show dapm widget status in sys fs */
2581 /* free all dapm widgets and resources */
2582 static void dapm_free_widgets(struct snd_soc_dapm_context *dapm)
2586 for_each_card_widgets_safe(dapm->card, w, next_w) {
2587 if (w->dapm != dapm)
2592 dapm->wcache_sink = NULL;
2593 dapm->wcache_source = NULL;
2597 struct snd_soc_dapm_context *dapm, const char *pin,
2604 const char *prefix = soc_dapm_prefix(dapm);
2614 for_each_card_widgets(dapm->card, w) {
2616 if (w->dapm == dapm)
2634 static int __snd_soc_dapm_set_pin(struct snd_soc_dapm_context *dapm,
2637 struct snd_soc_dapm_widget *w = dapm_find_widget(dapm, pin, true);
2640 dapm_assert_locked(dapm);
2643 dev_err(dapm->dev, "ASoC: DAPM unknown pin %s\n", pin);
2665 static int snd_soc_dapm_set_pin(struct snd_soc_dapm_context *dapm,
2668 int ret = __snd_soc_dapm_set_pin(dapm, pin, status);
2674 * snd_soc_dapm_sync_unlocked - scan and power dapm paths
2675 * @dapm: DAPM context
2677 * Walks all dapm audio paths and powers widgets according to their
2684 int snd_soc_dapm_sync_unlocked(struct snd_soc_dapm_context *dapm)
2690 if (!snd_soc_card_is_instantiated(dapm->card))
2693 return dapm_power_widgets(dapm->card, SND_SOC_DAPM_STREAM_NOP);
2698 * snd_soc_dapm_sync - scan and power dapm paths
2699 * @dapm: DAPM context
2701 * Walks all dapm audio paths and powers widgets according to their
2706 int snd_soc_dapm_sync(struct snd_soc_dapm_context *dapm)
2710 snd_soc_dapm_mutex_lock(dapm);
2711 ret = snd_soc_dapm_sync_unlocked(dapm);
2712 snd_soc_dapm_mutex_unlock(dapm);
2729 dev_dbg(w->dapm->dev, "%s DAI route %s -> %s\n",
2790 struct snd_soc_component *component = widget->dapm->component;
2818 if (w->dapm->card->fully_routed)
2833 if (w->dapm->card->fully_routed)
2860 static int snd_soc_dapm_check_dynamic_path(struct snd_soc_dapm_context *dapm,
2890 dev_err(dapm->dev,
2895 dev_err(dapm->dev,
2904 static int snd_soc_dapm_add_path(struct snd_soc_dapm_context *dapm,
2915 dev_err(dapm->dev,
2922 dev_err(dapm->dev,
2929 dev_err(dapm->dev,
2935 ret = snd_soc_dapm_check_dynamic_path(dapm, wsource, wsink, control);
2959 ret = dapm_connect_mux(dapm, path, control, wsource);
2969 ret = dapm_connect_mux(dapm, path, control, wsink);
2976 ret = dapm_connect_mixer(dapm, path, control);
2985 list_add(&path->list, &dapm->card->paths);
2995 if (snd_soc_card_is_instantiated(dapm->card) && path->connect)
3004 static int snd_soc_dapm_add_route(struct snd_soc_dapm_context *dapm,
3018 prefix = soc_dapm_prefix(dapm);
3031 wsource = dapm_wcache_lookup(dapm->wcache_source, source);
3032 wsink = dapm_wcache_lookup(dapm->wcache_sink, sink);
3041 for_each_card_widgets(dapm->card, w) {
3044 if (w->dapm == dapm) {
3051 dev_warn(dapm->dev,
3058 if (w->dapm == dapm) {
3065 dev_warn(dapm->dev,
3084 dapm->wcache_sink = wsink;
3085 dapm->wcache_source = wsource;
3087 ret = snd_soc_dapm_add_path(dapm, wsource, wsink, route->control,
3091 dev_err(dapm->dev, "ASoC: Failed to add route %s%s -%s%s%s> %s%s\n",
3100 static int snd_soc_dapm_del_route(struct snd_soc_dapm_context *dapm,
3111 dev_err(dapm->dev,
3116 prefix = soc_dapm_prefix(dapm);
3130 list_for_each_entry(p, &dapm->card->paths, list) {
3154 dev_warn(dapm->dev, "ASoC: Route %s->%s does not exist\n",
3163 * @dapm: DAPM context
3167 * Connects 2 dapm widgets together via a named audio path. The sink is
3174 int snd_soc_dapm_add_routes(struct snd_soc_dapm_context *dapm,
3179 snd_soc_dapm_mutex_lock(dapm);
3181 int r = snd_soc_dapm_add_route(dapm, route);
3186 snd_soc_dapm_mutex_unlock(dapm);
3194 * @dapm: DAPM context
3200 int snd_soc_dapm_del_routes(struct snd_soc_dapm_context *dapm,
3205 snd_soc_dapm_mutex_lock(dapm);
3207 snd_soc_dapm_del_route(dapm, route);
3210 snd_soc_dapm_mutex_unlock(dapm);
3216 static int snd_soc_dapm_weak_route(struct snd_soc_dapm_context *dapm,
3219 struct snd_soc_dapm_widget *source = dapm_find_widget(dapm,
3222 struct snd_soc_dapm_widget *sink = dapm_find_widget(dapm,
3229 dev_err(dapm->dev, "ASoC: Unable to find source %s for weak route\n",
3235 dev_err(dapm->dev, "ASoC: Unable to find sink %s for weak route\n",
3241 dev_warn(dapm->dev, "ASoC: Ignoring control for weak route %s->%s\n",
3252 dev_err(dapm->dev, "ASoC: No path found for weak route %s->%s\n",
3255 dev_warn(dapm->dev, "ASoC: %d paths found for weak route %s->%s\n",
3263 * @dapm: DAPM context
3277 int snd_soc_dapm_weak_routes(struct snd_soc_dapm_context *dapm,
3283 snd_soc_dapm_mutex_lock_root(dapm);
3285 int err = snd_soc_dapm_weak_route(dapm, route);
3290 snd_soc_dapm_mutex_unlock(dapm);
3297 * snd_soc_dapm_new_widgets - add new dapm widgets
3298 * @card: card to be checked for new dapm widgets
3300 * Checks the codec for any new dapm widgets and creates them if found.
3350 val = soc_dapm_read(w->dapm, w->reg);
3370 * snd_soc_dapm_get_volsw - dapm mixer get callback
3374 * Callback to get the value of a dapm mixer control.
3381 struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol);
3392 snd_soc_dapm_mutex_lock(dapm);
3394 reg_val = soc_dapm_read(dapm, reg);
3398 reg_val = soc_dapm_read(dapm, mc->rreg);
3409 snd_soc_dapm_mutex_unlock(dapm);
3428 * snd_soc_dapm_put_volsw - dapm mixer set callback
3432 * Callback to set the value of a dapm mixer control.
3439 struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol);
3440 struct snd_soc_card *card = dapm->card;
3471 dev_warn(dapm->dev,
3480 reg_change = soc_dapm_test_bits(dapm, reg, mask << shift, val);
3483 reg_change |= soc_dapm_test_bits(dapm, mc->rreg,
3519 * snd_soc_dapm_get_enum_double - dapm enumerated double mixer get callback
3523 * Callback to get the value of a dapm enumerated double mixer control.
3530 struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol);
3534 snd_soc_dapm_mutex_lock(dapm);
3536 reg_val = soc_dapm_read(dapm, e->reg);
3540 snd_soc_dapm_mutex_unlock(dapm);
3555 * snd_soc_dapm_put_enum_double - dapm enumerated double mixer set callback
3559 * Callback to set the value of a dapm enumerated double mixer control.
3566 struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol);
3567 struct snd_soc_card *card = dapm->card;
3592 reg_change = soc_dapm_test_bits(dapm, e->reg, mask, val);
3652 snd_soc_dapm_get_pin_status(&card->dapm, pin);
3674 ret = __snd_soc_dapm_set_pin(&card->dapm, pin,
3678 snd_soc_dapm_sync(&card->dapm);
3684 snd_soc_dapm_new_control_unlocked(struct snd_soc_dapm_context *dapm,
3691 w = dapm_cnew_widget(widget, soc_dapm_prefix(dapm));
3697 w->regulator = devm_regulator_get(dapm->dev, widget->name);
3706 dev_warn(dapm->dev,
3712 w->pinctrl = devm_pinctrl_get(dapm->dev);
3722 w->clk = devm_clk_get(dapm->dev, widget->name);
3738 if (!dapm->card->fully_routed)
3748 if (!dapm->card->fully_routed)
3800 w->dapm = dapm;
3804 list_add_tail(&w->list, &dapm->card->widgets);
3816 dev_err_probe(dapm->dev, ret, "ASoC: Failed to request %s\n",
3826 * snd_soc_dapm_new_control - create new dapm control
3827 * @dapm: DAPM context
3835 snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
3840 snd_soc_dapm_mutex_lock(dapm);
3841 w = snd_soc_dapm_new_control_unlocked(dapm, widget);
3842 snd_soc_dapm_mutex_unlock(dapm);
3849 * snd_soc_dapm_new_controls - create new dapm controls
3850 * @dapm: DAPM context
3858 int snd_soc_dapm_new_controls(struct snd_soc_dapm_context *dapm,
3865 snd_soc_dapm_mutex_lock_root(dapm);
3867 struct snd_soc_dapm_widget *w = snd_soc_dapm_new_control_unlocked(dapm, widget);
3874 snd_soc_dapm_mutex_unlock(dapm);
3942 dev_err(w->dapm->dev, "ASoC: link config missing\n");
3948 dev_warn(w->dapm->dev, "ASoC: Invalid format was specified\n");
4158 dev_warn(card->dapm.dev,
4257 w = snd_soc_dapm_new_control_unlocked(&card->dapm, &template);
4281 * @dapm: DAPM context
4286 int snd_soc_dapm_new_dai_widgets(struct snd_soc_dapm_context *dapm,
4292 WARN_ON(dapm->dev != dai->dev);
4305 w = snd_soc_dapm_new_control_unlocked(dapm, &template);
4321 w = snd_soc_dapm_new_control_unlocked(dapm, &template);
4360 if (w->dapm != dai_w->dapm)
4382 snd_soc_dapm_add_path(w->dapm, src, sink, NULL, NULL);
4389 static void dapm_connect_dai_routes(struct snd_soc_dapm_context *dapm,
4396 dev_dbg(dapm->dev, "connected DAI link %s:%s -> %s:%s\n",
4401 snd_soc_dapm_add_path(dapm, src, dai, NULL, NULL);
4405 snd_soc_dapm_add_path(dapm, src, sink, NULL, NULL);
4447 dapm_connect_dai_routes(&card->dapm, src_dai[stream], *src[stream],
4535 * snd_soc_dapm_stream_event - send a stream event to the dapm core
4540 * Sends a stream event to the dapm core. The core then makes any
4580 * @dapm: DAPM context
4591 int snd_soc_dapm_enable_pin_unlocked(struct snd_soc_dapm_context *dapm,
4594 return snd_soc_dapm_set_pin(dapm, pin, 1);
4600 * @dapm: DAPM context
4609 int snd_soc_dapm_enable_pin(struct snd_soc_dapm_context *dapm, const char *pin)
4613 snd_soc_dapm_mutex_lock(dapm);
4615 ret = snd_soc_dapm_set_pin(dapm, pin, 1);
4617 snd_soc_dapm_mutex_unlock(dapm);
4625 * @dapm: DAPM context
4637 int snd_soc_dapm_force_enable_pin_unlocked(struct snd_soc_dapm_context *dapm,
4640 struct snd_soc_dapm_widget *w = dapm_find_widget(dapm, pin, true);
4643 dev_err(dapm->dev, "ASoC: unknown pin %s\n", pin);
4647 dev_dbg(w->dapm->dev, "ASoC: force enable pin %s\n", pin);
4666 * @dapm: DAPM context
4676 int snd_soc_dapm_force_enable_pin(struct snd_soc_dapm_context *dapm,
4681 snd_soc_dapm_mutex_lock(dapm);
4683 ret = snd_soc_dapm_force_enable_pin_unlocked(dapm, pin);
4685 snd_soc_dapm_mutex_unlock(dapm);
4693 * @dapm: DAPM context
4703 int snd_soc_dapm_disable_pin_unlocked(struct snd_soc_dapm_context *dapm,
4706 return snd_soc_dapm_set_pin(dapm, pin, 0);
4712 * @dapm: DAPM context
4720 int snd_soc_dapm_disable_pin(struct snd_soc_dapm_context *dapm,
4725 snd_soc_dapm_mutex_lock(dapm);
4727 ret = snd_soc_dapm_set_pin(dapm, pin, 0);
4729 snd_soc_dapm_mutex_unlock(dapm);
4737 * @dapm: DAPM context
4751 int snd_soc_dapm_nc_pin_unlocked(struct snd_soc_dapm_context *dapm,
4754 return snd_soc_dapm_set_pin(dapm, pin, 0);
4760 * @dapm: DAPM context
4772 int snd_soc_dapm_nc_pin(struct snd_soc_dapm_context *dapm, const char *pin)
4776 snd_soc_dapm_mutex_lock(dapm);
4778 ret = snd_soc_dapm_set_pin(dapm, pin, 0);
4780 snd_soc_dapm_mutex_unlock(dapm);
4788 * @dapm: DAPM context
4795 int snd_soc_dapm_get_pin_status(struct snd_soc_dapm_context *dapm,
4798 struct snd_soc_dapm_widget *w = dapm_find_widget(dapm, pin, true);
4809 * @dapm: DAPM context
4818 int snd_soc_dapm_ignore_suspend(struct snd_soc_dapm_context *dapm,
4821 struct snd_soc_dapm_widget *w = dapm_find_widget(dapm, pin, false);
4824 dev_err(dapm->dev, "ASoC: unknown pin %s\n", pin);
4835 * snd_soc_dapm_free - free dapm resources
4836 * @dapm: DAPM context
4838 * Free all dapm widgets and resources.
4840 void snd_soc_dapm_free(struct snd_soc_dapm_context *dapm)
4842 dapm_debugfs_cleanup(dapm);
4843 dapm_free_widgets(dapm);
4844 list_del(&dapm->list);
4848 void snd_soc_dapm_init(struct snd_soc_dapm_context *dapm,
4852 dapm->card = card;
4853 dapm->component = component;
4854 dapm->bias_level = SND_SOC_BIAS_OFF;
4857 dapm->dev = component->dev;
4858 dapm->idle_bias_off = !component->driver->idle_bias_on;
4859 dapm->suspend_bias_off = component->driver->suspend_bias_off;
4861 dapm->dev = card->dev;
4864 INIT_LIST_HEAD(&dapm->list);
4866 list_add(&dapm->list, &card->dapm_list);
4870 static void soc_dapm_shutdown_dapm(struct snd_soc_dapm_context *dapm)
4872 struct snd_soc_card *card = dapm->card;
4879 for_each_card_widgets(dapm->card, w) {
4880 if (w->dapm != dapm)
4893 if (dapm->bias_level == SND_SOC_BIAS_ON)
4894 snd_soc_dapm_set_bias_level(dapm,
4897 if (dapm->bias_level == SND_SOC_BIAS_PREPARE)
4898 snd_soc_dapm_set_bias_level(dapm,
4910 struct snd_soc_dapm_context *dapm;
4912 for_each_card_dapms(card, dapm) {
4913 if (dapm != &card->dapm) {
4914 soc_dapm_shutdown_dapm(dapm);
4915 if (dapm->bias_level == SND_SOC_BIAS_STANDBY)
4916 snd_soc_dapm_set_bias_level(dapm,
4921 soc_dapm_shutdown_dapm(&card->dapm);
4922 if (card->dapm.bias_level == SND_SOC_BIAS_STANDBY)
4923 snd_soc_dapm_set_bias_level(&card->dapm,