Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
b244d335
Commit
b244d335
authored
Aug 20, 2012
by
Takashi Iwai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ALSA: hda - Add tracepoints at snd_hda_power_up/down entrances.
Signed-off-by:
Takashi Iwai
<
tiwai@suse.de
>
parent
6f0fa660
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
sound/pci/hda/hda_codec.c
sound/pci/hda/hda_codec.c
+2
-0
sound/pci/hda/hda_trace.h
sound/pci/hda/hda_trace.h
+24
-0
No files found.
sound/pci/hda/hda_codec.c
View file @
b244d335
...
@@ -4417,6 +4417,7 @@ static void __snd_hda_power_up(struct hda_codec *codec, bool wait_power_down)
...
@@ -4417,6 +4417,7 @@ static void __snd_hda_power_up(struct hda_codec *codec, bool wait_power_down)
spin_lock
(
&
codec
->
power_lock
);
spin_lock
(
&
codec
->
power_lock
);
codec
->
power_count
++
;
codec
->
power_count
++
;
trace_hda_power_count
(
codec
);
/* Return if power_on or transitioning to power_on, unless currently
/* Return if power_on or transitioning to power_on, unless currently
* powering down. */
* powering down. */
if
((
codec
->
power_on
||
codec
->
power_transition
>
0
)
&&
if
((
codec
->
power_on
||
codec
->
power_transition
>
0
)
&&
...
@@ -4496,6 +4497,7 @@ void snd_hda_power_down(struct hda_codec *codec)
...
@@ -4496,6 +4497,7 @@ void snd_hda_power_down(struct hda_codec *codec)
{
{
spin_lock
(
&
codec
->
power_lock
);
spin_lock
(
&
codec
->
power_lock
);
--
codec
->
power_count
;
--
codec
->
power_count
;
trace_hda_power_count
(
codec
);
if
(
!
codec
->
power_on
||
codec
->
power_count
||
codec
->
power_transition
)
{
if
(
!
codec
->
power_on
||
codec
->
power_count
||
codec
->
power_transition
)
{
spin_unlock
(
&
codec
->
power_lock
);
spin_unlock
(
&
codec
->
power_lock
);
return
;
return
;
...
...
sound/pci/hda/hda_trace.h
View file @
b244d335
...
@@ -87,6 +87,30 @@ DEFINE_EVENT(hda_power, hda_power_up,
...
@@ -87,6 +87,30 @@ DEFINE_EVENT(hda_power, hda_power_up,
TP_ARGS
(
codec
)
TP_ARGS
(
codec
)
);
);
TRACE_EVENT
(
hda_power_count
,
TP_PROTO
(
struct
hda_codec
*
codec
),
TP_ARGS
(
codec
),
TP_STRUCT__entry
(
__field
(
unsigned
int
,
card
)
__field
(
unsigned
int
,
addr
)
__field
(
int
,
power_count
)
__field
(
int
,
power_on
)
__field
(
int
,
power_transition
)
),
TP_fast_assign
(
__entry
->
card
=
(
codec
)
->
bus
->
card
->
number
;
__entry
->
addr
=
(
codec
)
->
addr
;
__entry
->
power_count
=
(
codec
)
->
power_count
;
__entry
->
power_on
=
(
codec
)
->
power_on
;
__entry
->
power_transition
=
(
codec
)
->
power_transition
;
),
TP_printk
(
"[%d:%d] power_count=%d, power_on=%d, power_transition=%d"
,
__entry
->
card
,
__entry
->
addr
,
__entry
->
power_count
,
__entry
->
power_on
,
__entry
->
power_transition
)
);
TRACE_EVENT
(
hda_unsol_event
,
TRACE_EVENT
(
hda_unsol_event
,
TP_PROTO
(
struct
hda_bus
*
bus
,
u32
res
,
u32
res_ex
),
TP_PROTO
(
struct
hda_bus
*
bus
,
u32
res
,
u32
res_ex
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment