projects/linux·blob master · refs

55 lines · 1.5 KiB

1/* SPDX-License-Identifier: GPL-2.0 */
2#undef TRACE_SYSTEM
3#define TRACE_SYSTEM snd_ctl
4
5#if !defined(_TRACE_SND_CTL_H) || defined(TRACE_HEADER_MULTI_READ)
6#define _TRACE_SND_CTL_H
7
8#include <linux/tracepoint.h>
9#include <uapi/sound/asound.h>
10
11TRACE_EVENT(snd_ctl_put,
12
13 TP_PROTO(struct snd_ctl_elem_id *id, const char *iname, unsigned int card,
14 int expected, int actual),
15
16 TP_ARGS(id, iname, card, expected, actual),
17
18 TP_STRUCT__entry(
19 __field(unsigned int, numid)
20 __string(iname, iname)
21 __string(kname, id->name)
22 __field(unsigned int, index)
23 __field(unsigned int, device)
24 __field(unsigned int, subdevice)
25 __field(unsigned int, card)
26 __field(int, expected)
27 __field(int, actual)
28 ),
29
30 TP_fast_assign(
31 __entry->numid = id->numid;
32 __assign_str(iname);
33 __assign_str(kname);
34 __entry->index = id->index;
35 __entry->device = id->device;
36 __entry->subdevice = id->subdevice;
37 __entry->card = card;
38 __entry->expected = expected;
39 __entry->actual = actual;
40 ),
41
42 TP_printk("%s: expected=%d, actual=%d for ctl numid=%d, iface=%s, name='%s', index=%d, device=%d, subdevice=%d, card=%d\n",
43 __entry->expected == __entry->actual ? "success" : "fail",
44 __entry->expected, __entry->actual, __entry->numid,
45 __get_str(iname), __get_str(kname), __entry->index,
46 __entry->device, __entry->subdevice, __entry->card)
47);
48
49#endif /* _TRACE_SND_CTL_H */
50
51/* This part must be outside protection */
52#undef TRACE_INCLUDE_PATH
53#define TRACE_INCLUDE_PATH .
54#define TRACE_INCLUDE_FILE control_trace
55#include <trace/define_trace.h>