mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
ASoC: trace: add event to snd_soc_dapm trace events
Add the event value to the snd_soc_dapm_start and snd_soc_dapm_done trace events to make them more informative. Trace before: aplay-229 [000] 250.140309: snd_soc_dapm_start: card=vscn-2046 aplay-229 [000] 250.167531: snd_soc_dapm_done: card=vscn-2046 aplay-229 [000] 251.169588: snd_soc_dapm_start: card=vscn-2046 aplay-229 [000] 251.195245: snd_soc_dapm_done: card=vscn-2046 Trace after: aplay-214 [000] 693.290612: snd_soc_dapm_start: card=vscn-2046 event=1 aplay-214 [000] 693.315508: snd_soc_dapm_done: card=vscn-2046 event=1 aplay-214 [000] 694.537349: snd_soc_dapm_start: card=vscn-2046 event=2 aplay-214 [000] 694.563241: snd_soc_dapm_done: card=vscn-2046 event=2 Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Link: https://msgid.link/r/20240306-improve-asoc-trace-events-v1-2-edb252bbeb10@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
6ef46a69ec
commit
7df3eb4cdb
@ -57,34 +57,36 @@ DEFINE_EVENT(snd_soc_dapm, snd_soc_bias_level_done,
|
||||
|
||||
DECLARE_EVENT_CLASS(snd_soc_dapm_basic,
|
||||
|
||||
TP_PROTO(struct snd_soc_card *card),
|
||||
TP_PROTO(struct snd_soc_card *card, int event),
|
||||
|
||||
TP_ARGS(card),
|
||||
TP_ARGS(card, event),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__string( name, card->name )
|
||||
__field( int, event )
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__assign_str(name, card->name);
|
||||
__entry->event = event;
|
||||
),
|
||||
|
||||
TP_printk("card=%s", __get_str(name))
|
||||
TP_printk("card=%s event=%d", __get_str(name), (int)__entry->event)
|
||||
);
|
||||
|
||||
DEFINE_EVENT(snd_soc_dapm_basic, snd_soc_dapm_start,
|
||||
|
||||
TP_PROTO(struct snd_soc_card *card),
|
||||
TP_PROTO(struct snd_soc_card *card, int event),
|
||||
|
||||
TP_ARGS(card)
|
||||
TP_ARGS(card, event)
|
||||
|
||||
);
|
||||
|
||||
DEFINE_EVENT(snd_soc_dapm_basic, snd_soc_dapm_done,
|
||||
|
||||
TP_PROTO(struct snd_soc_card *card),
|
||||
TP_PROTO(struct snd_soc_card *card, int event),
|
||||
|
||||
TP_ARGS(card)
|
||||
TP_ARGS(card, event)
|
||||
|
||||
);
|
||||
|
||||
|
@ -1963,7 +1963,7 @@ static int dapm_power_widgets(struct snd_soc_card *card, int event)
|
||||
|
||||
snd_soc_dapm_mutex_assert_held(card);
|
||||
|
||||
trace_snd_soc_dapm_start(card);
|
||||
trace_snd_soc_dapm_start(card, event);
|
||||
|
||||
for_each_card_dapms(card, d) {
|
||||
if (dapm_idle_bias_off(d))
|
||||
@ -2088,7 +2088,7 @@ static int dapm_power_widgets(struct snd_soc_card *card, int event)
|
||||
"DAPM sequencing finished, waiting %dms\n", card->pop_time);
|
||||
pop_wait(card->pop_time);
|
||||
|
||||
trace_snd_soc_dapm_done(card);
|
||||
trace_snd_soc_dapm_done(card, event);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user