|
@@ -46,6 +46,8 @@
|
|
#include <sound/soc-dapm.h>
|
|
#include <sound/soc-dapm.h>
|
|
#include <sound/initval.h>
|
|
#include <sound/initval.h>
|
|
|
|
|
|
|
|
+#include <trace/events/asoc.h>
|
|
|
|
+
|
|
/* dapm power sequences - make this per codec in the future */
|
|
/* dapm power sequences - make this per codec in the future */
|
|
static int dapm_up_seq[] = {
|
|
static int dapm_up_seq[] = {
|
|
[snd_soc_dapm_pre] = 0,
|
|
[snd_soc_dapm_pre] = 0,
|
|
@@ -151,6 +153,8 @@ static int snd_soc_dapm_set_bias_level(struct snd_soc_card *card,
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ trace_snd_soc_bias_level_start(card, level);
|
|
|
|
+
|
|
if (card && card->set_bias_level)
|
|
if (card && card->set_bias_level)
|
|
ret = card->set_bias_level(card, level);
|
|
ret = card->set_bias_level(card, level);
|
|
if (ret == 0) {
|
|
if (ret == 0) {
|
|
@@ -160,6 +164,8 @@ static int snd_soc_dapm_set_bias_level(struct snd_soc_card *card,
|
|
dapm->bias_level = level;
|
|
dapm->bias_level = level;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ trace_snd_soc_bias_level_done(card, level);
|
|
|
|
+
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -761,7 +767,9 @@ static void dapm_seq_check_event(struct snd_soc_dapm_context *dapm,
|
|
if (w->event && (w->event_flags & event)) {
|
|
if (w->event && (w->event_flags & event)) {
|
|
pop_dbg(dapm->dev, card->pop_time, "pop test : %s %s\n",
|
|
pop_dbg(dapm->dev, card->pop_time, "pop test : %s %s\n",
|
|
w->name, ev_name);
|
|
w->name, ev_name);
|
|
|
|
+ trace_snd_soc_dapm_widget_event_start(w, event);
|
|
ret = w->event(w, NULL, event);
|
|
ret = w->event(w, NULL, event);
|
|
|
|
+ trace_snd_soc_dapm_widget_event_done(w, event);
|
|
if (ret < 0)
|
|
if (ret < 0)
|
|
pr_err("%s: %s event failed: %d\n",
|
|
pr_err("%s: %s event failed: %d\n",
|
|
ev_name, w->name, ret);
|
|
ev_name, w->name, ret);
|
|
@@ -921,6 +929,8 @@ static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event)
|
|
int power;
|
|
int power;
|
|
int sys_power = 0;
|
|
int sys_power = 0;
|
|
|
|
|
|
|
|
+ trace_snd_soc_dapm_start(card);
|
|
|
|
+
|
|
/* Check which widgets we need to power and store them in
|
|
/* Check which widgets we need to power and store them in
|
|
* lists indicating if they should be powered up or down.
|
|
* lists indicating if they should be powered up or down.
|
|
*/
|
|
*/
|
|
@@ -947,6 +957,8 @@ static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event)
|
|
if (w->power == power)
|
|
if (w->power == power)
|
|
continue;
|
|
continue;
|
|
|
|
|
|
|
|
+ trace_snd_soc_dapm_widget_power(w, power);
|
|
|
|
+
|
|
if (power)
|
|
if (power)
|
|
dapm_seq_insert(w, &up_list, dapm_up_seq);
|
|
dapm_seq_insert(w, &up_list, dapm_up_seq);
|
|
else
|
|
else
|
|
@@ -1037,6 +1049,8 @@ static int dapm_power_widgets(struct snd_soc_dapm_context *dapm, int event)
|
|
"DAPM sequencing finished, waiting %dms\n", card->pop_time);
|
|
"DAPM sequencing finished, waiting %dms\n", card->pop_time);
|
|
pop_wait(card->pop_time);
|
|
pop_wait(card->pop_time);
|
|
|
|
|
|
|
|
+ trace_snd_soc_dapm_done(card);
|
|
|
|
+
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|