From 9998c4057287512b6fd20972511db8591fbc9a1b Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 9 Aug 2011 14:22:44 +0200 Subject: [PATCH] --- yaml --- r: 270331 b: refs/heads/master c: ecf726f5414489fe749477eb77d6cb12bb93c8bc h: refs/heads/master i: 270329: 8c62bc1bf87ce800e0ad3d3cf2f1985a02335c03 270327: eb6015aac4db2073d424ecc6bd8da64646419812 v: v3 --- [refs] | 2 +- trunk/Documentation/sound/alsa/HD-Audio.txt | 3 ++- trunk/sound/pci/hda/hda_codec.c | 1 + trunk/sound/pci/hda/hda_trace.h | 22 +++++++++++++++++++++ 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 1ebbef6ef2ce..52ab68804e39 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d11b7fa3d5b6d4b3a730f563e7b14dfc859c40c6 +refs/heads/master: ecf726f5414489fe749477eb77d6cb12bb93c8bc diff --git a/trunk/Documentation/sound/alsa/HD-Audio.txt b/trunk/Documentation/sound/alsa/HD-Audio.txt index ba2a155f3a30..850b1b3956ae 100644 --- a/trunk/Documentation/sound/alsa/HD-Audio.txt +++ b/trunk/Documentation/sound/alsa/HD-Audio.txt @@ -529,7 +529,8 @@ Tracepoints The hd-audio driver gives a few basic tracepoints. `hda:hda_send_cmd` traces each CORB write while `hda:hda_get_response` traces the response from RIRB (only when read from the codec driver). -`hda:hda_bus_reset` traces the bus-reset due to fatal error, etc, and +`hda:hda_bus_reset` traces the bus-reset due to fatal error, etc, +`hda:hda_unsol_event` traces the unsolicited events, and `hda:hda_power_down` and `hda:hda_power_up` trace the power down/up via power-saving behavior. diff --git a/trunk/sound/pci/hda/hda_codec.c b/trunk/sound/pci/hda/hda_codec.c index e105b653130d..2a8d447c8ed6 100644 --- a/trunk/sound/pci/hda/hda_codec.c +++ b/trunk/sound/pci/hda/hda_codec.c @@ -610,6 +610,7 @@ int snd_hda_queue_unsol_event(struct hda_bus *bus, u32 res, u32 res_ex) struct hda_bus_unsolicited *unsol; unsigned int wp; + trace_hda_unsol_event(bus, res, res_ex); unsol = bus->unsol; if (!unsol) return 0; diff --git a/trunk/sound/pci/hda/hda_trace.h b/trunk/sound/pci/hda/hda_trace.h index b446cfcf60de..9884871ddb00 100644 --- a/trunk/sound/pci/hda/hda_trace.h +++ b/trunk/sound/pci/hda/hda_trace.h @@ -87,6 +87,28 @@ DEFINE_EVENT(hda_power, hda_power_up, TP_ARGS(codec) ); +TRACE_EVENT(hda_unsol_event, + + TP_PROTO(struct hda_bus *bus, u32 res, u32 res_ex), + + TP_ARGS(bus, res, res_ex), + + TP_STRUCT__entry( + __field( unsigned int, card ) + __field( u32, res ) + __field( u32, res_ex ) + ), + + TP_fast_assign( + __entry->card = (bus)->card->number; + __entry->res = res; + __entry->res_ex = res_ex; + ), + + TP_printk("[%d] res=%x, res_ex=%x", __entry->card, + __entry->res, __entry->res_ex) +); + #endif /* _TRACE_HDA_H */ /* This part must be outside protection */