diff options
-rw-r--r-- | include/sound/soc-dapm.h | 3 | ||||
-rw-r--r-- | include/sound/soc.h | 3 | ||||
-rw-r--r-- | sound/soc/soc-core.c | 1 | ||||
-rw-r--r-- | sound/soc/soc-dapm.c | 16 |
4 files changed, 22 insertions, 1 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index a3760c93a8a3..6c9ae237814b 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
@@ -500,6 +500,9 @@ struct snd_soc_dapm_context { | |||
500 | 500 | ||
501 | struct snd_soc_dapm_update *update; | 501 | struct snd_soc_dapm_update *update; |
502 | 502 | ||
503 | void (*seq_notifier)(struct snd_soc_dapm_context *, | ||
504 | enum snd_soc_dapm_type); | ||
505 | |||
503 | struct device *dev; /* from parent - for debug */ | 506 | struct device *dev; /* from parent - for debug */ |
504 | struct snd_soc_codec *codec; /* parent codec */ | 507 | struct snd_soc_codec *codec; /* parent codec */ |
505 | struct snd_soc_card *card; /* parent card */ | 508 | struct snd_soc_card *card; /* parent card */ |
diff --git a/include/sound/soc.h b/include/sound/soc.h index 9952254974b3..d244f9013767 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -546,6 +546,9 @@ struct snd_soc_codec_driver { | |||
546 | /* codec bias level */ | 546 | /* codec bias level */ |
547 | int (*set_bias_level)(struct snd_soc_codec *, | 547 | int (*set_bias_level)(struct snd_soc_codec *, |
548 | enum snd_soc_bias_level level); | 548 | enum snd_soc_bias_level level); |
549 | |||
550 | void (*seq_notifier)(struct snd_soc_dapm_context *, | ||
551 | enum snd_soc_dapm_type); | ||
549 | }; | 552 | }; |
550 | 553 | ||
551 | /* SoC platform interface */ | 554 | /* SoC platform interface */ |
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 9e68984423b2..b0e7689159c1 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -3496,6 +3496,7 @@ int snd_soc_register_codec(struct device *dev, | |||
3496 | codec->dapm.bias_level = SND_SOC_BIAS_OFF; | 3496 | codec->dapm.bias_level = SND_SOC_BIAS_OFF; |
3497 | codec->dapm.dev = dev; | 3497 | codec->dapm.dev = dev; |
3498 | codec->dapm.codec = codec; | 3498 | codec->dapm.codec = codec; |
3499 | codec->dapm.seq_notifier = codec_drv->seq_notifier; | ||
3499 | codec->dev = dev; | 3500 | codec->dev = dev; |
3500 | codec->driver = codec_drv; | 3501 | codec->driver = codec_drv; |
3501 | codec->num_dai = num_dai; | 3502 | codec->num_dai = num_dai; |
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index eb7436c7acad..37b376f4c75d 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -878,7 +878,7 @@ static void dapm_seq_run(struct snd_soc_dapm_context *dapm, | |||
878 | int cur_subseq = -1; | 878 | int cur_subseq = -1; |
879 | int cur_reg = SND_SOC_NOPM; | 879 | int cur_reg = SND_SOC_NOPM; |
880 | struct snd_soc_dapm_context *cur_dapm = NULL; | 880 | struct snd_soc_dapm_context *cur_dapm = NULL; |
881 | int ret; | 881 | int ret, i; |
882 | int *sort; | 882 | int *sort; |
883 | 883 | ||
884 | if (power_up) | 884 | if (power_up) |
@@ -895,6 +895,13 @@ static void dapm_seq_run(struct snd_soc_dapm_context *dapm, | |||
895 | if (!list_empty(&pending)) | 895 | if (!list_empty(&pending)) |
896 | dapm_seq_run_coalesced(cur_dapm, &pending); | 896 | dapm_seq_run_coalesced(cur_dapm, &pending); |
897 | 897 | ||
898 | if (cur_dapm && cur_dapm->seq_notifier) { | ||
899 | for (i = 0; i < ARRAY_SIZE(dapm_up_seq); i++) | ||
900 | if (sort[i] == cur_sort) | ||
901 | cur_dapm->seq_notifier(cur_dapm, | ||
902 | i); | ||
903 | } | ||
904 | |||
898 | INIT_LIST_HEAD(&pending); | 905 | INIT_LIST_HEAD(&pending); |
899 | cur_sort = -1; | 906 | cur_sort = -1; |
900 | cur_subseq = -1; | 907 | cur_subseq = -1; |
@@ -956,6 +963,13 @@ static void dapm_seq_run(struct snd_soc_dapm_context *dapm, | |||
956 | 963 | ||
957 | if (!list_empty(&pending)) | 964 | if (!list_empty(&pending)) |
958 | dapm_seq_run_coalesced(dapm, &pending); | 965 | dapm_seq_run_coalesced(dapm, &pending); |
966 | |||
967 | if (cur_dapm && cur_dapm->seq_notifier) { | ||
968 | for (i = 0; i < ARRAY_SIZE(dapm_up_seq); i++) | ||
969 | if (sort[i] == cur_sort) | ||
970 | cur_dapm->seq_notifier(cur_dapm, | ||
971 | i); | ||
972 | } | ||
959 | } | 973 | } |
960 | 974 | ||
961 | static void dapm_widget_update(struct snd_soc_dapm_context *dapm) | 975 | static void dapm_widget_update(struct snd_soc_dapm_context *dapm) |