summaryrefslogtreecommitdiff
path: root/sound/core/control_trace.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-11-21 17:22:21 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-11-21 17:22:21 -0800
commit4843f6873f7c4835e62f2c73ba0fd538e57a2f22 (patch)
treeee620501a1ffbad9a83141e3a70154e1fe641040 /sound/core/control_trace.h
downloadlinux-master.tar.gz
linux-master.zip
Merge tag 'sysctl-7.04-fixes-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctlgraftedHEADmaster
Pull sysctl fix from Joel Granados: "Fix sysctl jiffy / milliseconds conversion: - Writing a previously read value "X" shall keep the same "X" value - Remove truncation that was causing incorrect saturation of valid timeouts" * tag 'sysctl-7.04-fixes-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl: sysctl: Do jiffy / ms conversion in ulong space
Diffstat (limited to 'sound/core/control_trace.h')
-rw-r--r--sound/core/control_trace.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/sound/core/control_trace.h b/sound/core/control_trace.h
new file mode 100644
index 000000000..d30e654b0
--- /dev/null
+++ b/sound/core/control_trace.h
@@ -0,0 +1,55 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#undef TRACE_SYSTEM
+#define TRACE_SYSTEM snd_ctl
+
+#if !defined(_TRACE_SND_CTL_H) || defined(TRACE_HEADER_MULTI_READ)
+#define _TRACE_SND_CTL_H
+
+#include <linux/tracepoint.h>
+#include <uapi/sound/asound.h>
+
+TRACE_EVENT(snd_ctl_put,
+
+ TP_PROTO(struct snd_ctl_elem_id *id, const char *iname, unsigned int card,
+ int expected, int actual),
+
+ TP_ARGS(id, iname, card, expected, actual),
+
+ TP_STRUCT__entry(
+ __field(unsigned int, numid)
+ __string(iname, iname)
+ __string(kname, id->name)
+ __field(unsigned int, index)
+ __field(unsigned int, device)
+ __field(unsigned int, subdevice)
+ __field(unsigned int, card)
+ __field(int, expected)
+ __field(int, actual)
+ ),
+
+ TP_fast_assign(
+ __entry->numid = id->numid;
+ __assign_str(iname);
+ __assign_str(kname);
+ __entry->index = id->index;
+ __entry->device = id->device;
+ __entry->subdevice = id->subdevice;
+ __entry->card = card;
+ __entry->expected = expected;
+ __entry->actual = actual;
+ ),
+
+ TP_printk("%s: expected=%d, actual=%d for ctl numid=%d, iface=%s, name='%s', index=%d, device=%d, subdevice=%d, card=%d\n",
+ __entry->expected == __entry->actual ? "success" : "fail",
+ __entry->expected, __entry->actual, __entry->numid,
+ __get_str(iname), __get_str(kname), __entry->index,
+ __entry->device, __entry->subdevice, __entry->card)
+);
+
+#endif /* _TRACE_SND_CTL_H */
+
+/* This part must be outside protection */
+#undef TRACE_INCLUDE_PATH
+#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_FILE control_trace
+#include <trace/define_trace.h>