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
f57c2565
Commit
f57c2565
authored
Aug 15, 2011
by
Takashi Iwai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ALSA: hda - Add snd_hda_override_pin_caps() helper function
Signed-off-by:
Takashi Iwai
<
tiwai@suse.de
>
parent
2d9f8a6e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
sound/pci/hda/hda_codec.c
sound/pci/hda/hda_codec.c
+23
-0
sound/pci/hda/hda_local.h
sound/pci/hda/hda_local.h
+2
-0
No files found.
sound/pci/hda/hda_codec.c
View file @
f57c2565
...
@@ -1692,6 +1692,29 @@ u32 snd_hda_query_pin_caps(struct hda_codec *codec, hda_nid_t nid)
...
@@ -1692,6 +1692,29 @@ u32 snd_hda_query_pin_caps(struct hda_codec *codec, hda_nid_t nid)
}
}
EXPORT_SYMBOL_HDA
(
snd_hda_query_pin_caps
);
EXPORT_SYMBOL_HDA
(
snd_hda_query_pin_caps
);
/**
* snd_hda_override_pin_caps - Override the pin capabilities
* @codec: the CODEC
* @nid: the NID to override
* @caps: the capability bits to set
*
* Override the cached PIN capabilitiy bits value by the given one.
*
* Returns zero if successful or a negative error code.
*/
int
snd_hda_override_pin_caps
(
struct
hda_codec
*
codec
,
hda_nid_t
nid
,
unsigned
int
caps
)
{
struct
hda_amp_info
*
info
;
info
=
get_alloc_amp_hash
(
codec
,
HDA_HASH_PINCAP_KEY
(
nid
));
if
(
!
info
)
return
-
ENOMEM
;
info
->
amp_caps
=
caps
;
info
->
head
.
val
|=
INFO_AMP_CAPS
;
return
0
;
}
EXPORT_SYMBOL_HDA
(
snd_hda_override_pin_caps
);
/**
/**
* snd_hda_pin_sense - execute pin sense measurement
* snd_hda_pin_sense - execute pin sense measurement
* @codec: the CODEC to sense
* @codec: the CODEC to sense
...
...
sound/pci/hda/hda_local.h
View file @
f57c2565
...
@@ -492,6 +492,8 @@ u32 query_amp_caps(struct hda_codec *codec, hda_nid_t nid, int direction);
...
@@ -492,6 +492,8 @@ u32 query_amp_caps(struct hda_codec *codec, hda_nid_t nid, int direction);
int
snd_hda_override_amp_caps
(
struct
hda_codec
*
codec
,
hda_nid_t
nid
,
int
dir
,
int
snd_hda_override_amp_caps
(
struct
hda_codec
*
codec
,
hda_nid_t
nid
,
int
dir
,
unsigned
int
caps
);
unsigned
int
caps
);
u32
snd_hda_query_pin_caps
(
struct
hda_codec
*
codec
,
hda_nid_t
nid
);
u32
snd_hda_query_pin_caps
(
struct
hda_codec
*
codec
,
hda_nid_t
nid
);
int
snd_hda_override_pin_caps
(
struct
hda_codec
*
codec
,
hda_nid_t
nid
,
unsigned
int
caps
);
u32
snd_hda_pin_sense
(
struct
hda_codec
*
codec
,
hda_nid_t
nid
);
u32
snd_hda_pin_sense
(
struct
hda_codec
*
codec
,
hda_nid_t
nid
);
int
snd_hda_jack_detect
(
struct
hda_codec
*
codec
,
hda_nid_t
nid
);
int
snd_hda_jack_detect
(
struct
hda_codec
*
codec
,
hda_nid_t
nid
);
...
...
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