-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Takashi Iwai
committed
Mar 23, 2015
1 parent
c4c2533
commit e311782
Showing
6 changed files
with
77 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
snd-hda-core-objs := hda_bus_type.o hdac_bus.o hdac_device.o hdac_sysfs.o | ||
|
||
snd-hda-core-objs += trace.o | ||
CFLAGS_trace.o := -I$(src) | ||
|
||
obj-$(CONFIG_SND_HDA_CORE) += snd-hda-core.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* | ||
* tracepoint definitions for HD-audio core drivers | ||
*/ | ||
|
||
#define CREATE_TRACE_POINTS | ||
#include "trace.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#undef TRACE_SYSTEM | ||
#define TRACE_SYSTEM hda | ||
|
||
#if !defined(__HDAC_TRACE_H) || defined(TRACE_HEADER_MULTI_READ) | ||
#define __HDAC_TRACE_H | ||
|
||
#include <linux/tracepoint.h> | ||
#include <linux/device.h> | ||
#include <sound/hdaudio.h> | ||
|
||
#ifndef HDAC_MSG_MAX | ||
#define HDAC_MSG_MAX 500 | ||
#endif | ||
|
||
struct hdac_bus; | ||
struct hdac_codec; | ||
|
||
TRACE_EVENT(hda_send_cmd, | ||
TP_PROTO(struct hdac_bus *bus, unsigned int cmd), | ||
TP_ARGS(bus, cmd), | ||
TP_STRUCT__entry(__dynamic_array(char, msg, HDAC_MSG_MAX)), | ||
TP_fast_assign( | ||
snprintf(__get_str(msg), HDAC_MSG_MAX, | ||
"[%s:%d] val=0x%08x", | ||
dev_name((bus)->dev), (cmd) >> 28, cmd); | ||
), | ||
TP_printk("%s", __get_str(msg)) | ||
); | ||
|
||
TRACE_EVENT(hda_get_response, | ||
TP_PROTO(struct hdac_bus *bus, unsigned int addr, unsigned int res), | ||
TP_ARGS(bus, addr, res), | ||
TP_STRUCT__entry(__dynamic_array(char, msg, HDAC_MSG_MAX)), | ||
TP_fast_assign( | ||
snprintf(__get_str(msg), HDAC_MSG_MAX, | ||
"[%s:%d] val=0x%08x", | ||
dev_name((bus)->dev), addr, res); | ||
), | ||
TP_printk("%s", __get_str(msg)) | ||
); | ||
|
||
TRACE_EVENT(hda_unsol_event, | ||
TP_PROTO(struct hdac_bus *bus, u32 res, u32 res_ex), | ||
TP_ARGS(bus, res, res_ex), | ||
TP_STRUCT__entry(__dynamic_array(char, msg, HDAC_MSG_MAX)), | ||
TP_fast_assign( | ||
snprintf(__get_str(msg), HDAC_MSG_MAX, | ||
"[%s:%d] res=0x%08x, res_ex=0x%08x", | ||
dev_name((bus)->dev), res_ex & 0x0f, res, res_ex); | ||
), | ||
TP_printk("%s", __get_str(msg)) | ||
); | ||
#endif /* __HDAC_TRACE_H */ | ||
|
||
/* This part must be outside protection */ | ||
#undef TRACE_INCLUDE_PATH | ||
#define TRACE_INCLUDE_PATH . | ||
|
||
#undef TRACE_INCLUDE_FILE | ||
#define TRACE_INCLUDE_FILE trace | ||
|
||
#include <trace/define_trace.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.