aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-dapm.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 8d760449965d..c1f3563133bc 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -771,6 +771,14 @@ int dapm_reg_event(struct snd_soc_dapm_widget *w,
771} 771}
772EXPORT_SYMBOL_GPL(dapm_reg_event); 772EXPORT_SYMBOL_GPL(dapm_reg_event);
773 773
774static int dapm_widget_power_check(struct snd_soc_dapm_widget *w)
775{
776 if (w->force)
777 return 1;
778 else
779 return w->power_check(w);
780}
781
774/* Generic check to see if a widget should be powered. 782/* Generic check to see if a widget should be powered.
775 */ 783 */
776static int dapm_generic_check_power(struct snd_soc_dapm_widget *w) 784static int dapm_generic_check_power(struct snd_soc_dapm_widget *w)
@@ -840,13 +848,7 @@ static int dapm_supply_check_power(struct snd_soc_dapm_widget *w)
840 if (!path->sink) 848 if (!path->sink)
841 continue; 849 continue;
842 850
843 if (path->sink->force) { 851 if (dapm_widget_power_check(path->sink)) {
844 power = 1;
845 break;
846 }
847
848 if (path->sink->power_check &&
849 path->sink->power_check(path->sink)) {
850 power = 1; 852 power = 1;
851 break; 853 break;
852 } 854 }
@@ -1234,10 +1236,7 @@ static void dapm_power_one_widget(struct snd_soc_dapm_widget *w,
1234 break; 1236 break;
1235 1237
1236 default: 1238 default:
1237 if (!w->force) 1239 power = dapm_widget_power_check(w);
1238 power = w->power_check(w);
1239 else
1240 power = 1;
1241 1240
1242 dapm_widget_set_power(w, power, up_list, down_list); 1241 dapm_widget_set_power(w, power, up_list, down_list);
1243 break; 1242 break;