diff options
| author | John W. Linville <linville@tuxdriver.com> | 2005-01-07 22:17:06 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@evo.osdl.org> | 2005-01-07 22:17:06 -0800 |
| commit | 8f0fa85a6458a1c8ac635cf55a3ca81ecf0760b8 (patch) | |
| tree | 8cfd0cab5038356d84b97e685dc5e5556075f9b4 /include/linux | |
| parent | c6aa77671601f8a2ad56c8030312c23d0c1020d1 (diff) | |
[PATCH] oss: AC97 quirk facility
Add a quirk facility for AC97 in OSS, and add a quirk list for the
i810_audio driver.
This allows automatically "correct" behaviour for sound hardware w/ known
oddities. For example, many cards have the headphone and line-out outputs
swapped or headphone outputs only.
The code is stolen shamelessly from ALSA, FWIW...
Signed-off-by: John W. Linville <linville@tuxdriver.com>
From: William Lee Irwin III <wli@holomorphy.com>
include/linux/ac97_codec.h:337: warning: `struct pci_dev' declared inside parameter list
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/ac97_codec.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/ac97_codec.h b/include/linux/ac97_codec.h index 2b68241da812..4e2fe240d5d0 100644 --- a/include/linux/ac97_codec.h +++ b/include/linux/ac97_codec.h @@ -315,4 +315,26 @@ struct ac97_driver { extern int ac97_register_driver(struct ac97_driver *driver); extern void ac97_unregister_driver(struct ac97_driver *driver); +/* quirk types */ +enum { + AC97_TUNE_DEFAULT = -1, /* use default from quirk list (not valid in list) */ + AC97_TUNE_NONE = 0, /* nothing extra to do */ + AC97_TUNE_HP_ONLY, /* headphone (true line-out) control as master only */ + AC97_TUNE_SWAP_HP, /* swap headphone and master controls */ + AC97_TUNE_SWAP_SURROUND, /* swap master and surround controls */ + AC97_TUNE_AD_SHARING, /* for AD1985, turn on OMS bit and use headphone */ + AC97_TUNE_ALC_JACK, /* for Realtek, enable JACK detection */ +}; + +struct ac97_quirk { + unsigned short vendor; /* PCI vendor id */ + unsigned short device; /* PCI device id */ + unsigned short mask; /* device id bit mask, 0 = accept all */ + const char *name; /* name shown as info */ + int type; /* quirk type above */ +}; + +struct pci_dev; +extern int ac97_tune_hardware(struct pci_dev *pdev, struct ac97_quirk *quirk, int override); + #endif /* _AC97_CODEC_H_ */ |
