Fix: ASoC snd_doc_dapm on linux 6.9-rc1
authorKienan Stewart <kstewart@efficios.com>
Mon, 25 Mar 2024 12:54:42 +0000 (08:54 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 27 Mar 2024 13:25:36 +0000 (09:25 -0400)
See upstream commit:

    commit 7df3eb4cdb6bbfa482f51548b9fd47c2723c68ba
    Author: Luca Ceresoli <luca.ceresoli@bootlin.com>
    Date:   Wed Mar 6 10:30:01 2024 +0100

        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

Change-Id: If0d33544b8dd1dfb3d12ca9390892190fc0444b0
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/instrumentation/events/asoc.h

index 21d13a0fea52f019ffef21510a04b78797962493..5126d4c1241cfad3e155efbfde5989048d0cfa0f 100644 (file)
@@ -51,6 +51,38 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_card, snd_soc_bias_level_done,
 
 )
 
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(6,9,0))
+LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_dapm_basic,
+
+       TP_PROTO(struct snd_soc_card *card, int event),
+
+       TP_ARGS(card, event),
+
+       TP_FIELDS(
+               ctf_string(name, card->name)
+               ctf_integer(int, event, event)
+       )
+)
+LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_basic, snd_soc_dapm_start,
+
+       asoc_snd_soc_dapm_start,
+
+       TP_PROTO(struct snd_soc_card *card, int event),
+
+       TP_ARGS(card, event)
+
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_basic, snd_soc_dapm_done,
+
+       asoc_snd_soc_dapm_done,
+
+       TP_PROTO(struct snd_soc_card *card, int event),
+
+       TP_ARGS(card, event)
+
+)
+#else
 LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_dapm_basic,
 
        TP_PROTO(struct snd_soc_card *card),
@@ -81,6 +113,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_dapm_basic, snd_soc_dapm_done,
        TP_ARGS(card)
 
 )
+#endif
 
 LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_dapm_widget,
 
This page took 0.027308 seconds and 4 git commands to generate.