diff options
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/events/v4l2.h | 75 |
1 files changed, 50 insertions, 25 deletions
diff --git a/include/trace/events/v4l2.h b/include/trace/events/v4l2.h index b9bb1f204693..20112170ff11 100644 --- a/include/trace/events/v4l2.h +++ b/include/trace/events/v4l2.h | |||
@@ -6,33 +6,58 @@ | |||
6 | 6 | ||
7 | #include <linux/tracepoint.h> | 7 | #include <linux/tracepoint.h> |
8 | 8 | ||
9 | #define show_type(type) \ | 9 | /* Enums require being exported to userspace, for user tool parsing */ |
10 | __print_symbolic(type, \ | 10 | #undef EM |
11 | { V4L2_BUF_TYPE_VIDEO_CAPTURE, "VIDEO_CAPTURE" }, \ | 11 | #undef EMe |
12 | { V4L2_BUF_TYPE_VIDEO_OUTPUT, "VIDEO_OUTPUT" }, \ | 12 | #define EM(a, b) TRACE_DEFINE_ENUM(a); |
13 | { V4L2_BUF_TYPE_VIDEO_OVERLAY, "VIDEO_OVERLAY" }, \ | 13 | #define EMe(a, b) TRACE_DEFINE_ENUM(a); |
14 | { V4L2_BUF_TYPE_VBI_CAPTURE, "VBI_CAPTURE" }, \ | 14 | |
15 | { V4L2_BUF_TYPE_VBI_OUTPUT, "VBI_OUTPUT" }, \ | 15 | #define show_type(type) \ |
16 | { V4L2_BUF_TYPE_SLICED_VBI_CAPTURE, "SLICED_VBI_CAPTURE" }, \ | 16 | __print_symbolic(type, SHOW_TYPE) |
17 | { V4L2_BUF_TYPE_SLICED_VBI_OUTPUT, "SLICED_VBI_OUTPUT" }, \ | 17 | |
18 | { V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY, "VIDEO_OUTPUT_OVERLAY" },\ | 18 | #define SHOW_TYPE \ |
19 | { V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, "VIDEO_CAPTURE_MPLANE" },\ | 19 | EM( V4L2_BUF_TYPE_VIDEO_CAPTURE, "VIDEO_CAPTURE" ) \ |
20 | { V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, "VIDEO_OUTPUT_MPLANE" }, \ | 20 | EM( V4L2_BUF_TYPE_VIDEO_OUTPUT, "VIDEO_OUTPUT" ) \ |
21 | { V4L2_BUF_TYPE_SDR_CAPTURE, "SDR_CAPTURE" }, \ | 21 | EM( V4L2_BUF_TYPE_VIDEO_OVERLAY, "VIDEO_OVERLAY" ) \ |
22 | { V4L2_BUF_TYPE_PRIVATE, "PRIVATE" }) | 22 | EM( V4L2_BUF_TYPE_VBI_CAPTURE, "VBI_CAPTURE" ) \ |
23 | EM( V4L2_BUF_TYPE_VBI_OUTPUT, "VBI_OUTPUT" ) \ | ||
24 | EM( V4L2_BUF_TYPE_SLICED_VBI_CAPTURE, "SLICED_VBI_CAPTURE" ) \ | ||
25 | EM( V4L2_BUF_TYPE_SLICED_VBI_OUTPUT, "SLICED_VBI_OUTPUT" ) \ | ||
26 | EM( V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY, "VIDEO_OUTPUT_OVERLAY" ) \ | ||
27 | EM( V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, "VIDEO_CAPTURE_MPLANE" ) \ | ||
28 | EM( V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, "VIDEO_OUTPUT_MPLANE" ) \ | ||
29 | EM( V4L2_BUF_TYPE_SDR_CAPTURE, "SDR_CAPTURE" ) \ | ||
30 | EMe(V4L2_BUF_TYPE_PRIVATE, "PRIVATE" ) | ||
31 | |||
32 | SHOW_TYPE | ||
23 | 33 | ||
24 | #define show_field(field) \ | 34 | #define show_field(field) \ |
25 | __print_symbolic(field, \ | 35 | __print_symbolic(field, SHOW_FIELD) |
26 | { V4L2_FIELD_ANY, "ANY" }, \ | 36 | |
27 | { V4L2_FIELD_NONE, "NONE" }, \ | 37 | #define SHOW_FIELD \ |
28 | { V4L2_FIELD_TOP, "TOP" }, \ | 38 | EM( V4L2_FIELD_ANY, "ANY" ) \ |
29 | { V4L2_FIELD_BOTTOM, "BOTTOM" }, \ | 39 | EM( V4L2_FIELD_NONE, "NONE" ) \ |
30 | { V4L2_FIELD_INTERLACED, "INTERLACED" }, \ | 40 | EM( V4L2_FIELD_TOP, "TOP" ) \ |
31 | { V4L2_FIELD_SEQ_TB, "SEQ_TB" }, \ | 41 | EM( V4L2_FIELD_BOTTOM, "BOTTOM" ) \ |
32 | { V4L2_FIELD_SEQ_BT, "SEQ_BT" }, \ | 42 | EM( V4L2_FIELD_INTERLACED, "INTERLACED" ) \ |
33 | { V4L2_FIELD_ALTERNATE, "ALTERNATE" }, \ | 43 | EM( V4L2_FIELD_SEQ_TB, "SEQ_TB" ) \ |
34 | { V4L2_FIELD_INTERLACED_TB, "INTERLACED_TB" }, \ | 44 | EM( V4L2_FIELD_SEQ_BT, "SEQ_BT" ) \ |
35 | { V4L2_FIELD_INTERLACED_BT, "INTERLACED_BT" }) | 45 | EM( V4L2_FIELD_ALTERNATE, "ALTERNATE" ) \ |
46 | EM( V4L2_FIELD_INTERLACED_TB, "INTERLACED_TB" ) \ | ||
47 | EMe( V4L2_FIELD_INTERLACED_BT, "INTERLACED_BT" ) | ||
48 | |||
49 | SHOW_FIELD | ||
50 | |||
51 | /* | ||
52 | * Now redefine the EM() and EMe() macros to map the enums to the strings | ||
53 | * that will be printed in the output. | ||
54 | */ | ||
55 | #undef EM | ||
56 | #undef EMe | ||
57 | #define EM(a, b) {a, b}, | ||
58 | #define EMe(a, b) {a, b} | ||
59 | |||
60 | /* V4L2_TC_TYPE_* are macros, not defines, they do not need processing */ | ||
36 | 61 | ||
37 | #define show_timecode_type(type) \ | 62 | #define show_timecode_type(type) \ |
38 | __print_symbolic(type, \ | 63 | __print_symbolic(type, \ |