aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-03-10 10:16:28 -0400
committerTakashi Iwai <tiwai@suse.de>2015-03-23 08:17:58 -0400
commite311782acd196d17d25b323d115709c50c8f7d3f (patch)
treeafdc50298bdc5fe760bd7f501ce152bcc54b25af /sound/pci
parentc4c2533f802d6877803c4d778def43d8a122f27b (diff)
ALSA: hda - Re-add tracepoints to HD-audio core driver
Now let's take the basic tracepoints back to the HD-audio driver. The three bus tracepoints, hda_send_cmd, hda_get_response and hda_unsol_event are revived but in a slightly different form. Since we don't assign the card number there, print the bus device name instead. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/Makefile1
-rw-r--r--sound/pci/hda/hda_trace.h119
2 files changed, 0 insertions, 120 deletions
diff --git a/sound/pci/hda/Makefile b/sound/pci/hda/Makefile
index 96caaebfc19d..af78fb33a4fd 100644
--- a/sound/pci/hda/Makefile
+++ b/sound/pci/hda/Makefile
@@ -10,7 +10,6 @@ snd-hda-codec-$(CONFIG_SND_HDA_HWDEP) += hda_hwdep.o
10snd-hda-codec-$(CONFIG_SND_HDA_INPUT_BEEP) += hda_beep.o 10snd-hda-codec-$(CONFIG_SND_HDA_INPUT_BEEP) += hda_beep.o
11 11
12# for trace-points 12# for trace-points
13CFLAGS_hda_codec.o := -I$(src)
14CFLAGS_hda_controller.o := -I$(src) 13CFLAGS_hda_controller.o := -I$(src)
15 14
16snd-hda-codec-generic-objs := hda_generic.o 15snd-hda-codec-generic-objs := hda_generic.o
diff --git a/sound/pci/hda/hda_trace.h b/sound/pci/hda/hda_trace.h
deleted file mode 100644
index 7fedfa862419..000000000000
--- a/sound/pci/hda/hda_trace.h
+++ /dev/null
@@ -1,119 +0,0 @@
1#undef TRACE_SYSTEM
2#define TRACE_SYSTEM hda
3#define TRACE_INCLUDE_FILE hda_trace
4
5#if !defined(_TRACE_HDA_H) || defined(TRACE_HEADER_MULTI_READ)
6#define _TRACE_HDA_H
7
8#include <linux/tracepoint.h>
9
10struct hda_bus;
11struct hda_codec;
12
13DECLARE_EVENT_CLASS(hda_cmd,
14
15 TP_PROTO(struct hda_codec *codec, unsigned int val),
16
17 TP_ARGS(codec, val),
18
19 TP_STRUCT__entry(
20 __field( unsigned int, card )
21 __field( unsigned int, addr )
22 __field( unsigned int, val )
23 ),
24
25 TP_fast_assign(
26 __entry->card = (codec)->card->number;
27 __entry->addr = (codec)->addr;
28 __entry->val = (val);
29 ),
30
31 TP_printk("[%d:%d] val=%x", __entry->card, __entry->addr, __entry->val)
32);
33
34DEFINE_EVENT(hda_cmd, hda_send_cmd,
35 TP_PROTO(struct hda_codec *codec, unsigned int val),
36 TP_ARGS(codec, val)
37);
38
39DEFINE_EVENT(hda_cmd, hda_get_response,
40 TP_PROTO(struct hda_codec *codec, unsigned int val),
41 TP_ARGS(codec, val)
42);
43
44TRACE_EVENT(hda_bus_reset,
45
46 TP_PROTO(struct hda_bus *bus),
47
48 TP_ARGS(bus),
49
50 TP_STRUCT__entry(
51 __field( unsigned int, card )
52 ),
53
54 TP_fast_assign(
55 __entry->card = (bus)->card->number;
56 ),
57
58 TP_printk("[%d]", __entry->card)
59);
60
61#ifdef CONFIG_PM
62DECLARE_EVENT_CLASS(hda_power,
63
64 TP_PROTO(struct hda_codec *codec),
65
66 TP_ARGS(codec),
67
68 TP_STRUCT__entry(
69 __field( unsigned int, card )
70 __field( unsigned int, addr )
71 ),
72
73 TP_fast_assign(
74 __entry->card = (codec)->card->number;
75 __entry->addr = (codec)->addr;
76 ),
77
78 TP_printk("[%d:%d]", __entry->card, __entry->addr)
79);
80
81DEFINE_EVENT(hda_power, hda_power_down,
82 TP_PROTO(struct hda_codec *codec),
83 TP_ARGS(codec)
84);
85
86DEFINE_EVENT(hda_power, hda_power_up,
87 TP_PROTO(struct hda_codec *codec),
88 TP_ARGS(codec)
89);
90#endif /* CONFIG_PM */
91
92TRACE_EVENT(hda_unsol_event,
93
94 TP_PROTO(struct hda_bus *bus, u32 res, u32 res_ex),
95
96 TP_ARGS(bus, res, res_ex),
97
98 TP_STRUCT__entry(
99 __field( unsigned int, card )
100 __field( u32, res )
101 __field( u32, res_ex )
102 ),
103
104 TP_fast_assign(
105 __entry->card = (bus)->card->number;
106 __entry->res = res;
107 __entry->res_ex = res_ex;
108 ),
109
110 TP_printk("[%d] res=%x, res_ex=%x", __entry->card,
111 __entry->res, __entry->res_ex)
112);
113
114#endif /* _TRACE_HDA_H */
115
116/* This part must be outside protection */
117#undef TRACE_INCLUDE_PATH
118#define TRACE_INCLUDE_PATH .
119#include <trace/define_trace.h>