X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=instrumentation%2Fevents%2Flttng-module%2Fasoc.h;h=4c5833c3cbc4ff9c518fb79be03a8296bf2cb3a5;hb=4d0e0310925957fc042dc65d8f109d56fed2c4ab;hp=79ffc26e607b11e299046688f62e9a1c877b1dcf;hpb=7c9c39d22fc6a0cf662b3b77a36763264a646a98;p=lttng-modules.git diff --git a/instrumentation/events/lttng-module/asoc.h b/instrumentation/events/lttng-module/asoc.h index 79ffc26e..4c5833c3 100644 --- a/instrumentation/events/lttng-module/asoc.h +++ b/instrumentation/events/lttng-module/asoc.h @@ -4,7 +4,7 @@ #if !defined(LTTNG_TRACE_ASOC_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_ASOC_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include @@ -13,15 +13,22 @@ #ifndef _TRACE_ASOC_DEF #define _TRACE_ASOC_DEF struct snd_soc_jack; +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)) struct snd_soc_codec; -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)) +#endif +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0) && \ + LINUX_VERSION_CODE < KERNEL_VERSION(3,16,0)) struct snd_soc_platform; #endif struct snd_soc_card; struct snd_soc_dapm_widget; +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) +struct snd_soc_dapm_path; +#endif #endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0) \ + || LTTNG_RHEL_KERNEL_RANGE(3,10,0,514,0,0, 3,11,0,0,0,0)) #define CODEC_NAME_FIELD component.name #define CODEC_ID_FIELD component.id #else @@ -29,6 +36,7 @@ struct snd_soc_dapm_widget; #define CODEC_ID_FIELD id #endif +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,16,0)) /* * Log register events */ @@ -68,8 +76,10 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(asoc_snd_soc_reg, snd_soc_reg_read, TP_ARGS(codec, reg, val) ) +#endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0) && \ + LINUX_VERSION_CODE < KERNEL_VERSION(3,16,0)) LTTNG_TRACEPOINT_EVENT_CLASS(asoc_snd_soc_preg, TP_PROTO(struct snd_soc_platform *platform, unsigned int reg, @@ -231,7 +241,27 @@ LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_walk_done, ) #endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) +LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_path, + + asoc_snd_soc_dapm_path, + + TP_PROTO(struct snd_soc_dapm_widget *widget, + enum snd_soc_dapm_direction dir, + struct snd_soc_dapm_path *path), + + TP_ARGS(widget, dir, path), + + TP_FIELDS( + ctf_string(wname, widget->name) + ctf_string(pname, path->name ? path->name : DAPM_DIRECT) + ctf_string(pnname, path->node[dir]->name) + ctf_integer(int, path_node, (long) path->node[dir]) + ctf_integer(int, path_connect, path->connect) + ctf_integer(int, path_dir, dir) + ) +) +#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_output_path, asoc_snd_soc_dapm_output_path, @@ -267,7 +297,9 @@ LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_input_path, ctf_integer(int, path_connect, path->connect) ) ) +#endif +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_dapm_connected, asoc_snd_soc_dapm_connected, @@ -296,6 +328,36 @@ LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_jack_irq, ) ) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) +LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_jack_report, + + asoc_snd_soc_jack_report, + + TP_PROTO(struct snd_soc_jack *jack, int mask, int val), + + TP_ARGS(jack, mask, val), + + TP_FIELDS( + ctf_string(name, jack->jack->id) + ctf_integer(int, mask, mask) + ctf_integer(int, val, val) + ) +) + +LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_jack_notify, + + asoc_snd_soc_jack_notify, + + TP_PROTO(struct snd_soc_jack *jack, int val), + + TP_ARGS(jack, val), + + TP_FIELDS( + ctf_string(name, jack->jack->id) + ctf_integer(int, val, val) + ) +) +#else LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_jack_report, asoc_snd_soc_jack_report, @@ -324,7 +386,9 @@ LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_jack_notify, ctf_integer(int, val, val) ) ) +#endif +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)) LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_cache_sync, asoc_snd_soc_cache_sync, @@ -341,8 +405,9 @@ LTTNG_TRACEPOINT_EVENT_MAP(snd_soc_cache_sync, ctf_integer(int, id, codec->CODEC_ID_FIELD) ) ) +#endif #endif /* LTTNG_TRACE_ASOC_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include