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
nexedi
linux
Commits
bafdb727
Commit
bafdb727
authored
Mar 24, 2009
by
Takashi Iwai
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'topic/quirk-cleanup' into for-linus
parents
5b56eec7
8bd4bb7a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
6 deletions
+20
-6
include/sound/core.h
include/sound/core.h
+14
-2
sound/core/misc.c
sound/core/misc.c
+6
-4
No files found.
include/sound/core.h
View file @
bafdb727
...
@@ -458,21 +458,33 @@ static inline int __snd_bug_on(int cond)
...
@@ -458,21 +458,33 @@ static inline int __snd_bug_on(int cond)
struct
snd_pci_quirk
{
struct
snd_pci_quirk
{
unsigned
short
subvendor
;
/* PCI subvendor ID */
unsigned
short
subvendor
;
/* PCI subvendor ID */
unsigned
short
subdevice
;
/* PCI subdevice ID */
unsigned
short
subdevice
;
/* PCI subdevice ID */
unsigned
short
subdevice_mask
;
/* bitmask to match */
int
value
;
/* value */
int
value
;
/* value */
#ifdef CONFIG_SND_DEBUG_VERBOSE
#ifdef CONFIG_SND_DEBUG_VERBOSE
const
char
*
name
;
/* name of the device (optional) */
const
char
*
name
;
/* name of the device (optional) */
#endif
#endif
};
};
#define _SND_PCI_QUIRK_ID(vend,dev) \
#define _SND_PCI_QUIRK_ID_MASK(vend, mask, dev) \
.subvendor = (vend), .subdevice = (dev)
.subvendor = (vend), .subdevice = (dev), .subdevice_mask = (mask)
#define _SND_PCI_QUIRK_ID(vend, dev) \
_SND_PCI_QUIRK_ID_MASK(vend, 0xffff, dev)
#define SND_PCI_QUIRK_ID(vend,dev) {_SND_PCI_QUIRK_ID(vend, dev)}
#define SND_PCI_QUIRK_ID(vend,dev) {_SND_PCI_QUIRK_ID(vend, dev)}
#ifdef CONFIG_SND_DEBUG_VERBOSE
#ifdef CONFIG_SND_DEBUG_VERBOSE
#define SND_PCI_QUIRK(vend,dev,xname,val) \
#define SND_PCI_QUIRK(vend,dev,xname,val) \
{_SND_PCI_QUIRK_ID(vend, dev), .value = (val), .name = (xname)}
{_SND_PCI_QUIRK_ID(vend, dev), .value = (val), .name = (xname)}
#define SND_PCI_QUIRK_VENDOR(vend, xname, val) \
{_SND_PCI_QUIRK_ID_MASK(vend, 0, 0), .value = (val), .name = (xname)}
#define SND_PCI_QUIRK_MASK(vend, mask, dev, xname, val) \
{_SND_PCI_QUIRK_ID_MASK(vend, mask, dev), \
.value = (val), .name = (xname)}
#else
#else
#define SND_PCI_QUIRK(vend,dev,xname,val) \
#define SND_PCI_QUIRK(vend,dev,xname,val) \
{_SND_PCI_QUIRK_ID(vend, dev), .value = (val)}
{_SND_PCI_QUIRK_ID(vend, dev), .value = (val)}
#define SND_PCI_QUIRK_MASK(vend, mask, dev, xname, val) \
{_SND_PCI_QUIRK_ID_MASK(vend, mask, dev), .value = (val)}
#define SND_PCI_QUIRK_VENDOR(vend, xname, val) \
{_SND_PCI_QUIRK_ID_MASK(vend, 0, 0), .value = (val)}
#endif
#endif
const
struct
snd_pci_quirk
*
const
struct
snd_pci_quirk
*
...
...
sound/core/misc.c
View file @
bafdb727
...
@@ -95,12 +95,14 @@ snd_pci_quirk_lookup(struct pci_dev *pci, const struct snd_pci_quirk *list)
...
@@ -95,12 +95,14 @@ snd_pci_quirk_lookup(struct pci_dev *pci, const struct snd_pci_quirk *list)
{
{
const
struct
snd_pci_quirk
*
q
;
const
struct
snd_pci_quirk
*
q
;
for
(
q
=
list
;
q
->
subvendor
;
q
++
)
for
(
q
=
list
;
q
->
subvendor
;
q
++
)
{
if
(
q
->
subvendor
==
pci
->
subsystem_vendor
&&
if
(
q
->
subvendor
!=
pci
->
subsystem_vendor
)
(
!
q
->
subdevice
||
q
->
subdevice
==
pci
->
subsystem_device
))
continue
;
if
(
!
q
->
subdevice
||
(
pci
->
subsystem_device
&
q
->
subdevice_mask
)
==
q
->
subdevice
)
return
q
;
return
q
;
}
return
NULL
;
return
NULL
;
}
}
EXPORT_SYMBOL
(
snd_pci_quirk_lookup
);
EXPORT_SYMBOL
(
snd_pci_quirk_lookup
);
#endif
#endif
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