diff options
-rw-r--r-- | include/sound/soc-dapm.h | 2 | ||||
-rw-r--r-- | sound/soc/soc-dapm.c | 16 |
2 files changed, 18 insertions, 0 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index d4609029f014..f4f85dd1cd97 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
@@ -311,6 +311,8 @@ struct device; | |||
311 | #define SND_SOC_DAPM_POST_PMD 0x8 /* after widget power down */ | 311 | #define SND_SOC_DAPM_POST_PMD 0x8 /* after widget power down */ |
312 | #define SND_SOC_DAPM_PRE_REG 0x10 /* before audio path setup */ | 312 | #define SND_SOC_DAPM_PRE_REG 0x10 /* before audio path setup */ |
313 | #define SND_SOC_DAPM_POST_REG 0x20 /* after audio path setup */ | 313 | #define SND_SOC_DAPM_POST_REG 0x20 /* after audio path setup */ |
314 | #define SND_SOC_DAPM_WILL_PMU 0x40 /* called at start of sequence */ | ||
315 | #define SND_SOC_DAPM_WILL_PMD 0x80 /* called at start of sequence */ | ||
314 | #define SND_SOC_DAPM_PRE_POST_PMD \ | 316 | #define SND_SOC_DAPM_PRE_POST_PMD \ |
315 | (SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD) | 317 | (SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD) |
316 | 318 | ||
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index a80c883bb8be..e4e5420de725 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -1277,6 +1277,14 @@ static void dapm_seq_check_event(struct snd_soc_dapm_context *dapm, | |||
1277 | ev_name = "POST_PMD"; | 1277 | ev_name = "POST_PMD"; |
1278 | power = 0; | 1278 | power = 0; |
1279 | break; | 1279 | break; |
1280 | case SND_SOC_DAPM_WILL_PMU: | ||
1281 | ev_name = "WILL_PMU"; | ||
1282 | power = 1; | ||
1283 | break; | ||
1284 | case SND_SOC_DAPM_WILL_PMD: | ||
1285 | ev_name = "WILL_PMD"; | ||
1286 | power = 0; | ||
1287 | break; | ||
1280 | default: | 1288 | default: |
1281 | BUG(); | 1289 | BUG(); |
1282 | return; | 1290 | return; |
@@ -1737,6 +1745,14 @@ static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event) | |||
1737 | &async_domain); | 1745 | &async_domain); |
1738 | async_synchronize_full_domain(&async_domain); | 1746 | async_synchronize_full_domain(&async_domain); |
1739 | 1747 | ||
1748 | list_for_each_entry(w, &down_list, list) { | ||
1749 | dapm_seq_check_event(dapm, w, SND_SOC_DAPM_WILL_PMD); | ||
1750 | } | ||
1751 | |||
1752 | list_for_each_entry(w, &up_list, list) { | ||
1753 | dapm_seq_check_event(dapm, w, SND_SOC_DAPM_WILL_PMU); | ||
1754 | } | ||
1755 | |||
1740 | /* Power down widgets first; try to avoid amplifying pops. */ | 1756 | /* Power down widgets first; try to avoid amplifying pops. */ |
1741 | dapm_seq_run(dapm, &down_list, event, false); | 1757 | dapm_seq_run(dapm, &down_list, event, false); |
1742 | 1758 | ||