Lines Matching refs:dapm

3 // soc-dapm.c  --  ALSA SoC Dynamic Audio Power Management
42 #define DAPM_UPDATE_STAT(widget, val) widget->dapm->card->dapm_stats.val++;
51 static int snd_soc_dapm_add_path(struct snd_soc_dapm_context *dapm,
58 snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
62 snd_soc_dapm_new_control_unlocked(struct snd_soc_dapm_context *dapm,
65 static unsigned int soc_dapm_read(struct snd_soc_dapm_context *dapm, int reg);
67 /* dapm power sequences - make this per codec in the future */
150 static void dapm_assert_locked(struct snd_soc_dapm_context *dapm)
152 if (snd_soc_card_is_instantiated(dapm->card))
153 snd_soc_dapm_mutex_assert_held(dapm);
190 dapm_assert_locked(w->dapm);
193 dev_vdbg(w->dapm->dev, "Marking %s dirty due to %s\n",
195 list_add_tail(&w->dirty, &w->dapm->card->dapm_dirty);
214 dapm_assert_locked(w->dapm);
321 /* create a new dapm widget */
377 dev_warn(widget->dapm->dev,
403 snd_soc_dapm_new_control_unlocked(widget->dapm,
438 widget->dapm, &template);
445 snd_soc_dapm_add_path(widget->dapm, data->widget,
448 data->value = soc_dapm_read(widget->dapm, e->reg) &
589 * snd_soc_dapm_kcontrol_dapm() - Returns the dapm context associated to a
599 return dapm_kcontrol_get_wlist(kcontrol)->widgets[0]->dapm;
617 static const char *soc_dapm_prefix(struct snd_soc_dapm_context *dapm)
619 if (!dapm->component)
621 return dapm->component->name_prefix;
624 static unsigned int soc_dapm_read(struct snd_soc_dapm_context *dapm, int reg)
626 if (!dapm->component)
628 return snd_soc_component_read(dapm->component, reg);
631 static int soc_dapm_update_bits(struct snd_soc_dapm_context *dapm,
634 if (!dapm->component)
636 return snd_soc_component_update_bits(dapm->component, reg,
640 static int soc_dapm_test_bits(struct snd_soc_dapm_context *dapm,
643 if (!dapm->component)
645 return snd_soc_component_test_bits(dapm->component, reg, mask, value);
648 static void soc_dapm_async_complete(struct snd_soc_dapm_context *dapm)
650 if (dapm->component)
651 snd_soc_component_async_complete(dapm->component);
658 struct list_head *wlist = &w->dapm->card->widgets;
676 * @dapm: The DAPM context for which to set the level
691 int snd_soc_dapm_force_bias_level(struct snd_soc_dapm_context *dapm,
696 if (dapm->component)
697 ret = snd_soc_component_set_bias_level(dapm->component, level);
700 dapm->bias_level = level;
708 * @dapm: DAPM context
715 static int snd_soc_dapm_set_bias_level(struct snd_soc_dapm_context *dapm,
718 struct snd_soc_card *card = dapm->card;
723 ret = snd_soc_card_set_bias_level(card, dapm, level);
727 if (!card || dapm != &card->dapm)
728 ret = snd_soc_dapm_force_bias_level(dapm, level);
733 ret = snd_soc_card_set_bias_level_post(card, dapm, level);
741 static int dapm_connect_mux(struct snd_soc_dapm_context *dapm,
752 val = soc_dapm_read(dapm, e->reg);
788 unsigned int val = soc_dapm_read(p->sink->dapm, reg);
804 val = soc_dapm_read(p->sink->dapm, mc->rreg);
824 static int dapm_connect_mixer(struct snd_soc_dapm_context *dapm,
840 static int dapm_is_shared_kcontrol(struct snd_soc_dapm_context *dapm,
850 for_each_card_widgets(dapm->card, w) {
851 if (w == kcontrolw || w->dapm != kcontrolw->dapm)
872 struct snd_soc_dapm_context *dapm = w->dapm;
873 struct snd_card *card = dapm->card->snd_card;
883 prefix = soc_dapm_prefix(dapm);
889 shared = dapm_is_shared_kcontrol(dapm, w, &w->kcontrol_news[kci],
961 dev_err(dapm->dev,
962 "ASoC: failed to add widget %s dapm kcontrol %s: %d\n",
978 /* create new dapm mixer control */
1003 snd_soc_dapm_add_path(data->widget->dapm,
1013 /* create new dapm mux control */
1016 struct snd_soc_dapm_context *dapm = w->dapm;
1036 dev_err(dapm->dev,
1043 dev_err(dapm->dev, "ASoC: %s %s has no paths\n", type, w->name);
1059 /* create new dapm volume control */
1073 /* create new dapm dai link control */
1085 struct snd_soc_dapm_context *dapm = w->dapm;
1086 struct snd_card *card = dapm->card->snd_card;
1092 dev_err(dapm->dev,
1093 "ASoC: failed to add widget %s dapm kcontrol %s: %d\n",
1110 int level = snd_power_get_state(widget->dapm->card->snd_card);
1116 dev_dbg(widget->dapm->dev, "ASoC: %s ignoring suspend\n",
1246 * This function takes the dapm widget currently being examined and the walk
1264 * This function takes the dapm widget currently being examined and the walk
1290 * This function takes the dapm widget currently being examined and the walk
1347 soc_dapm_async_complete(w->dapm);
1353 dev_warn(w->dapm->dev,
1363 dev_warn(w->dapm->dev,
1407 soc_dapm_async_complete(w->dapm);
1504 if (a->dapm != b->dapm)
1505 return (unsigned long)a->dapm - (unsigned long)b->dapm;
1568 pop_dbg(w->dapm->dev, card->pop_time, "pop test : %s %s\n",
1570 soc_dapm_async_complete(w->dapm);
1575 dev_err(w->dapm->dev, "ASoC: %s: %s event failed: %d\n",
1584 struct snd_soc_dapm_context *dapm;
1592 dapm = w->dapm;
1595 WARN_ON(reg != w->reg || dapm != w->dapm);
1604 pop_dbg(dapm->dev, card->pop_time,
1618 pop_dbg(dapm->dev, card->pop_time,
1622 soc_dapm_update_bits(dapm, reg, mask, value);
1662 w->dapm != cur_dapm || w->subseq != cur_subseq) {
1674 if (cur_dapm && w->dapm != cur_dapm)
1714 cur_dapm = w->dapm;
1720 dev_err(w->dapm->dev,
1756 dev_err(w->dapm->dev, "ASoC: %s DAPM pre-event failed: %d\n",
1764 ret = soc_dapm_update_bits(w->dapm, update->reg, update->mask,
1767 dev_err(w->dapm->dev, "ASoC: %s DAPM update failed: %d\n",
1771 ret = soc_dapm_update_bits(w->dapm, update->reg2,
1774 dev_err(w->dapm->dev,
1783 dev_err(w->dapm->dev, "ASoC: %s DAPM post-event failed: %d\n",
1922 static bool dapm_idle_bias_off(struct snd_soc_dapm_context *dapm)
1924 if (dapm->idle_bias_off)
1927 switch (snd_power_get_state(dapm->card->snd_card)) {
1930 return dapm->suspend_bias_off;
1939 * Scan each dapm widget for complete audio path.
1992 d = w->dapm;
2035 dapm_pre_sequence_async(&card->dapm, 0);
2038 if (d != &card->dapm && d->bias_level != d->target_bias_level)
2062 if (d != &card->dapm && d->bias_level != d->target_bias_level)
2068 dapm_post_sequence_async(&card->dapm, 0);
2105 snd_soc_dapm_mutex_lock_root(w->dapm);
2149 snd_soc_dapm_mutex_unlock(w->dapm);
2166 struct snd_soc_dapm_context *dapm = file->private_data;
2169 switch (dapm->bias_level) {
2183 WARN(1, "Unknown bias_level %d\n", dapm->bias_level);
2198 void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm,
2204 dapm->debugfs_dapm = debugfs_create_dir("dapm", parent);
2206 debugfs_create_file("bias_level", 0444, dapm->debugfs_dapm, dapm,
2212 struct snd_soc_dapm_context *dapm = w->dapm;
2214 if (!dapm->debugfs_dapm || !w->name)
2217 debugfs_create_file(w->name, 0444, dapm->debugfs_dapm, w,
2223 struct snd_soc_dapm_context *dapm = w->dapm;
2225 if (!dapm->debugfs_dapm || !w->name)
2228 debugfs_lookup_and_remove(w->name, dapm->debugfs_dapm);
2231 static void dapm_debugfs_cleanup(struct snd_soc_dapm_context *dapm)
2233 debugfs_remove_recursive(dapm->debugfs_dapm);
2234 dapm->debugfs_dapm = NULL;
2238 void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm,
2251 static inline void dapm_debugfs_cleanup(struct snd_soc_dapm_context *dapm)
2286 /* find dapm widget path assoc with kcontrol */
2304 int snd_soc_dapm_mux_update_power(struct snd_soc_dapm_context *dapm,
2308 struct snd_soc_card *card = dapm->card;
2332 /* find dapm widget path assoc with kcontrol */
2369 int snd_soc_dapm_mixer_update_power(struct snd_soc_dapm_context *dapm,
2373 struct snd_soc_card *card = dapm->card;
2390 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(cmpnt);
2402 if (w->dapm != dapm)
2432 switch (snd_soc_dapm_get_bias_level(dapm)) {
2451 /* show dapm widget status in sys fs */
2523 /* free all dapm widgets and resources */
2524 static void dapm_free_widgets(struct snd_soc_dapm_context *dapm)
2528 for_each_card_widgets_safe(dapm->card, w, next_w) {
2529 if (w->dapm != dapm)
2534 dapm->wcache_sink = NULL;
2535 dapm->wcache_source = NULL;
2539 struct snd_soc_dapm_context *dapm, const char *pin,
2546 const char *prefix = soc_dapm_prefix(dapm);
2556 for_each_card_widgets(dapm->card, w) {
2558 if (w->dapm == dapm)
2576 static int __snd_soc_dapm_set_pin(struct snd_soc_dapm_context *dapm,
2579 struct snd_soc_dapm_widget *w = dapm_find_widget(dapm, pin, true);
2582 dapm_assert_locked(dapm);
2585 dev_err(dapm->dev, "ASoC: DAPM unknown pin %s\n", pin);
2607 static int snd_soc_dapm_set_pin(struct snd_soc_dapm_context *dapm,
2610 int ret = __snd_soc_dapm_set_pin(dapm, pin, status);
2616 * snd_soc_dapm_sync_unlocked - scan and power dapm paths
2617 * @dapm: DAPM context
2619 * Walks all dapm audio paths and powers widgets according to their
2626 int snd_soc_dapm_sync_unlocked(struct snd_soc_dapm_context *dapm)
2632 if (!snd_soc_card_is_instantiated(dapm->card))
2635 return dapm_power_widgets(dapm->card, SND_SOC_DAPM_STREAM_NOP);
2640 * snd_soc_dapm_sync - scan and power dapm paths
2641 * @dapm: DAPM context
2643 * Walks all dapm audio paths and powers widgets according to their
2648 int snd_soc_dapm_sync(struct snd_soc_dapm_context *dapm)
2652 snd_soc_dapm_mutex_lock(dapm);
2653 ret = snd_soc_dapm_sync_unlocked(dapm);
2654 snd_soc_dapm_mutex_unlock(dapm);
2671 dev_dbg(w->dapm->dev, "%s DAI route %s -> %s\n",
2733 struct snd_soc_component *component = snd_soc_dapm_to_component(widget->dapm);
2761 if (w->dapm->card->fully_routed)
2776 if (w->dapm->card->fully_routed)
2803 static int snd_soc_dapm_check_dynamic_path(struct snd_soc_dapm_context *dapm,
2833 dev_err(dapm->dev,
2838 dev_err(dapm->dev,
2847 static int snd_soc_dapm_add_path(struct snd_soc_dapm_context *dapm,
2858 dev_err(dapm->dev,
2865 dev_err(dapm->dev,
2872 dev_err(dapm->dev,
2878 ret = snd_soc_dapm_check_dynamic_path(dapm, wsource, wsink, control);
2902 ret = dapm_connect_mux(dapm, path, control, wsource);
2912 ret = dapm_connect_mux(dapm, path, control, wsink);
2919 ret = dapm_connect_mixer(dapm, path, control);
2928 list_add(&path->list, &dapm->card->paths);
2938 if (snd_soc_card_is_instantiated(dapm->card) && path->connect)
2947 static int snd_soc_dapm_add_route(struct snd_soc_dapm_context *dapm,
2961 prefix = soc_dapm_prefix(dapm);
2974 wsource = dapm_wcache_lookup(dapm->wcache_source, source);
2975 wsink = dapm_wcache_lookup(dapm->wcache_sink, sink);
2984 for_each_card_widgets(dapm->card, w) {
2987 if (w->dapm == dapm) {
2994 dev_warn(dapm->dev,
3001 if (w->dapm == dapm) {
3008 dev_warn(dapm->dev,
3027 dapm->wcache_sink = wsink;
3028 dapm->wcache_source = wsource;
3030 ret = snd_soc_dapm_add_path(dapm, wsource, wsink, route->control,
3034 dev_err(dapm->dev, "ASoC: Failed to add route %s%s -%s%s%s> %s%s\n",
3043 static int snd_soc_dapm_del_route(struct snd_soc_dapm_context *dapm,
3054 dev_err(dapm->dev,
3059 prefix = soc_dapm_prefix(dapm);
3073 list_for_each_entry(p, &dapm->card->paths, list) {
3097 dev_warn(dapm->dev, "ASoC: Route %s->%s does not exist\n",
3106 * @dapm: DAPM context
3110 * Connects 2 dapm widgets together via a named audio path. The sink is
3117 int snd_soc_dapm_add_routes(struct snd_soc_dapm_context *dapm,
3122 snd_soc_dapm_mutex_lock(dapm);
3124 int r = snd_soc_dapm_add_route(dapm, route);
3129 snd_soc_dapm_mutex_unlock(dapm);
3137 * @dapm: DAPM context
3143 int snd_soc_dapm_del_routes(struct snd_soc_dapm_context *dapm,
3148 snd_soc_dapm_mutex_lock(dapm);
3150 snd_soc_dapm_del_route(dapm, route);
3153 snd_soc_dapm_mutex_unlock(dapm);
3159 static int snd_soc_dapm_weak_route(struct snd_soc_dapm_context *dapm,
3162 struct snd_soc_dapm_widget *source = dapm_find_widget(dapm,
3165 struct snd_soc_dapm_widget *sink = dapm_find_widget(dapm,
3172 dev_err(dapm->dev, "ASoC: Unable to find source %s for weak route\n",
3178 dev_err(dapm->dev, "ASoC: Unable to find sink %s for weak route\n",
3184 dev_warn(dapm->dev, "ASoC: Ignoring control for weak route %s->%s\n",
3195 dev_err(dapm->dev, "ASoC: No path found for weak route %s->%s\n",
3198 dev_warn(dapm->dev, "ASoC: %d paths found for weak route %s->%s\n",
3206 * @dapm: DAPM context
3220 int snd_soc_dapm_weak_routes(struct snd_soc_dapm_context *dapm,
3226 snd_soc_dapm_mutex_lock_root(dapm);
3228 int err = snd_soc_dapm_weak_route(dapm, route);
3233 snd_soc_dapm_mutex_unlock(dapm);
3240 * snd_soc_dapm_new_widgets - add new dapm widgets
3241 * @card: card to be checked for new dapm widgets
3243 * Checks the codec for any new dapm widgets and creates them if found.
3293 val = soc_dapm_read(w->dapm, w->reg);
3313 * snd_soc_dapm_get_volsw - dapm mixer get callback
3317 * Callback to get the value of a dapm mixer control.
3324 struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol);
3335 snd_soc_dapm_mutex_lock(dapm);
3337 reg_val = soc_dapm_read(dapm, reg);
3341 reg_val = soc_dapm_read(dapm, mc->rreg);
3352 snd_soc_dapm_mutex_unlock(dapm);
3371 * snd_soc_dapm_put_volsw - dapm mixer set callback
3375 * Callback to set the value of a dapm mixer control.
3382 struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol);
3383 struct snd_soc_card *card = dapm->card;
3414 dev_warn(dapm->dev,
3423 reg_change = soc_dapm_test_bits(dapm, reg, mask << shift, val);
3426 reg_change |= soc_dapm_test_bits(dapm, mc->rreg,
3462 * snd_soc_dapm_get_enum_double - dapm enumerated double mixer get callback
3466 * Callback to get the value of a dapm enumerated double mixer control.
3473 struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol);
3477 snd_soc_dapm_mutex_lock(dapm);
3479 reg_val = soc_dapm_read(dapm, e->reg);
3483 snd_soc_dapm_mutex_unlock(dapm);
3498 * snd_soc_dapm_put_enum_double - dapm enumerated double mixer set callback
3502 * Callback to set the value of a dapm enumerated double mixer control.
3509 struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_dapm(kcontrol);
3510 struct snd_soc_card *card = dapm->card;
3535 reg_change = soc_dapm_test_bits(dapm, e->reg, mask, val);
3595 snd_soc_dapm_get_pin_status(&card->dapm, pin);
3617 ret = __snd_soc_dapm_set_pin(&card->dapm, pin,
3621 snd_soc_dapm_sync(&card->dapm);
3627 snd_soc_dapm_new_control_unlocked(struct snd_soc_dapm_context *dapm,
3638 prefix = soc_dapm_prefix(dapm);
3648 w->regulator = devm_regulator_get(dapm->dev, widget->name);
3657 dev_warn(dapm->dev,
3663 w->pinctrl = devm_pinctrl_get(dapm->dev);
3673 w->clk = devm_clk_get(dapm->dev, widget->name);
3689 if (!dapm->card->fully_routed)
3699 if (!dapm->card->fully_routed)
3751 w->dapm = dapm;
3755 list_add_tail(&w->list, &dapm->card->widgets);
3767 dev_err_probe(dapm->dev, ret, "ASoC: Failed to request %s\n",
3778 * snd_soc_dapm_new_control - create new dapm control
3779 * @dapm: DAPM context
3787 snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
3792 snd_soc_dapm_mutex_lock(dapm);
3793 w = snd_soc_dapm_new_control_unlocked(dapm, widget);
3794 snd_soc_dapm_mutex_unlock(dapm);
3801 * snd_soc_dapm_new_controls - create new dapm controls
3802 * @dapm: DAPM context
3810 int snd_soc_dapm_new_controls(struct snd_soc_dapm_context *dapm,
3817 snd_soc_dapm_mutex_lock_root(dapm);
3819 struct snd_soc_dapm_widget *w = snd_soc_dapm_new_control_unlocked(dapm, widget);
3826 snd_soc_dapm_mutex_unlock(dapm);
3896 dev_err(w->dapm->dev, "ASoC: link config missing\n");
3903 dev_warn(w->dapm->dev, "ASoC: Invalid format was specified\n");
4105 dev_warn(card->dapm.dev,
4204 w = snd_soc_dapm_new_control_unlocked(&card->dapm, &template);
4228 * @dapm: DAPM context
4233 int snd_soc_dapm_new_dai_widgets(struct snd_soc_dapm_context *dapm,
4239 WARN_ON(dapm->dev != dai->dev);
4252 w = snd_soc_dapm_new_control_unlocked(dapm, &template);
4268 w = snd_soc_dapm_new_control_unlocked(dapm, &template);
4307 if (w->dapm != dai_w->dapm)
4329 snd_soc_dapm_add_path(w->dapm, src, sink, NULL, NULL);
4336 static void dapm_connect_dai_routes(struct snd_soc_dapm_context *dapm,
4343 dev_dbg(dapm->dev, "connected DAI link %s:%s -> %s:%s\n",
4348 snd_soc_dapm_add_path(dapm, src, dai, NULL, NULL);
4352 snd_soc_dapm_add_path(dapm, src, sink, NULL, NULL);
4394 dapm_connect_dai_routes(&card->dapm, src_dai[stream], *src[stream],
4503 * snd_soc_dapm_stream_event - send a stream event to the dapm core
4508 * Sends a stream event to the dapm core. The core then makes any
4548 * @dapm: DAPM context
4559 int snd_soc_dapm_enable_pin_unlocked(struct snd_soc_dapm_context *dapm,
4562 return snd_soc_dapm_set_pin(dapm, pin, 1);
4568 * @dapm: DAPM context
4577 int snd_soc_dapm_enable_pin(struct snd_soc_dapm_context *dapm, const char *pin)
4581 snd_soc_dapm_mutex_lock(dapm);
4583 ret = snd_soc_dapm_set_pin(dapm, pin, 1);
4585 snd_soc_dapm_mutex_unlock(dapm);
4593 * @dapm: DAPM context
4605 int snd_soc_dapm_force_enable_pin_unlocked(struct snd_soc_dapm_context *dapm,
4608 struct snd_soc_dapm_widget *w = dapm_find_widget(dapm, pin, true);
4611 dev_err(dapm->dev, "ASoC: unknown pin %s\n", pin);
4615 dev_dbg(w->dapm->dev, "ASoC: force enable pin %s\n", pin);
4634 * @dapm: DAPM context
4644 int snd_soc_dapm_force_enable_pin(struct snd_soc_dapm_context *dapm,
4649 snd_soc_dapm_mutex_lock(dapm);
4651 ret = snd_soc_dapm_force_enable_pin_unlocked(dapm, pin);
4653 snd_soc_dapm_mutex_unlock(dapm);
4661 * @dapm: DAPM context
4671 int snd_soc_dapm_disable_pin_unlocked(struct snd_soc_dapm_context *dapm,
4674 return snd_soc_dapm_set_pin(dapm, pin, 0);
4680 * @dapm: DAPM context
4688 int snd_soc_dapm_disable_pin(struct snd_soc_dapm_context *dapm,
4693 snd_soc_dapm_mutex_lock(dapm);
4695 ret = snd_soc_dapm_set_pin(dapm, pin, 0);
4697 snd_soc_dapm_mutex_unlock(dapm);
4705 * @dapm: DAPM context
4719 int snd_soc_dapm_nc_pin_unlocked(struct snd_soc_dapm_context *dapm,
4722 return snd_soc_dapm_set_pin(dapm, pin, 0);
4728 * @dapm: DAPM context
4740 int snd_soc_dapm_nc_pin(struct snd_soc_dapm_context *dapm, const char *pin)
4744 snd_soc_dapm_mutex_lock(dapm);
4746 ret = snd_soc_dapm_set_pin(dapm, pin, 0);
4748 snd_soc_dapm_mutex_unlock(dapm);
4756 * @dapm: DAPM context
4763 int snd_soc_dapm_get_pin_status(struct snd_soc_dapm_context *dapm,
4766 struct snd_soc_dapm_widget *w = dapm_find_widget(dapm, pin, true);
4777 * @dapm: DAPM context
4786 int snd_soc_dapm_ignore_suspend(struct snd_soc_dapm_context *dapm,
4789 struct snd_soc_dapm_widget *w = dapm_find_widget(dapm, pin, false);
4792 dev_err(dapm->dev, "ASoC: unknown pin %s\n", pin);
4803 * snd_soc_dapm_free - free dapm resources
4804 * @dapm: DAPM context
4806 * Free all dapm widgets and resources.
4808 void snd_soc_dapm_free(struct snd_soc_dapm_context *dapm)
4810 dapm_debugfs_cleanup(dapm);
4811 dapm_free_widgets(dapm);
4812 list_del(&dapm->list);
4816 void snd_soc_dapm_init(struct snd_soc_dapm_context *dapm,
4820 dapm->card = card;
4821 dapm->component = component;
4822 dapm->bias_level = SND_SOC_BIAS_OFF;
4825 dapm->dev = component->dev;
4826 dapm->idle_bias_off = !component->driver->idle_bias_on;
4827 dapm->suspend_bias_off = component->driver->suspend_bias_off;
4829 dapm->dev = card->dev;
4832 INIT_LIST_HEAD(&dapm->list);
4834 list_add(&dapm->list, &card->dapm_list);
4838 static void soc_dapm_shutdown_dapm(struct snd_soc_dapm_context *dapm)
4840 struct snd_soc_card *card = dapm->card;
4847 for_each_card_widgets(dapm->card, w) {
4848 if (w->dapm != dapm)
4861 if (dapm->bias_level == SND_SOC_BIAS_ON)
4862 snd_soc_dapm_set_bias_level(dapm,
4865 if (dapm->bias_level == SND_SOC_BIAS_PREPARE)
4866 snd_soc_dapm_set_bias_level(dapm,
4878 struct snd_soc_dapm_context *dapm;
4880 for_each_card_dapms(card, dapm) {
4881 if (dapm != &card->dapm) {
4882 soc_dapm_shutdown_dapm(dapm);
4883 if (dapm->bias_level == SND_SOC_BIAS_STANDBY)
4884 snd_soc_dapm_set_bias_level(dapm,
4889 soc_dapm_shutdown_dapm(&card->dapm);
4890 if (card->dapm.bias_level == SND_SOC_BIAS_STANDBY)
4891 snd_soc_dapm_set_bias_level(&card->dapm,