summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/lttng/lttng-modules/0001-Fix-ASoC-snd_doc_dapm-on-linux-6.9-rc1.patch
blob: 9d5fd0de604dae802dd465147f0736b2f1562209 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
From fec007d9630e010062cf5699a08460f71f46b527 Mon Sep 17 00:00:00 2001
From: Kienan Stewart <kstewart@efficios.com>
Date: Mon, 25 Mar 2024 08:54:42 -0400
Subject: [PATCH 1/4] Fix: ASoC snd_doc_dapm on linux 6.9-rc1

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

Upstream-Status: Backport [88c4e0fe Fix: ASoC snd_doc_dapm on linux 6.9-rc1]

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 | 33 +++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/include/instrumentation/events/asoc.h b/include/instrumentation/events/asoc.h
index 21d13a0f..5126d4c1 100644
--- a/include/instrumentation/events/asoc.h
+++ b/include/instrumentation/events/asoc.h
@@ -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,
 
-- 
2.39.2