aboutsummaryrefslogtreecommitdiff
path: root/sound/pci/ctxfi/ctatc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-03-01 08:58:44 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-01 08:58:44 -0800
commit524df55725217b13d5a232fb5badb5846418ea0e (patch)
treec041613577ac7e68737cfd8af16a37d1ed37e6af /sound/pci/ctxfi/ctatc.c
parent0f4533979473a456a8adb3869365e12c7a99cf65 (diff)
parent6679ee1870f7ccdd48e2e5c57919240b8f19a6dc (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (252 commits) ASoC: Check progress when reporting periods from i.MX FIQ handler ASoC: Remove a unused variables from i.MX FIQ runtime data ALSA: hda - Add/fix ALC269 FSC and Quanta models ALSA: hda - Add ALC670 codec support OMAP4: PMIC: Add support for twl6030 codec ALSA: hda - remove unnecessary msleep on power state transitions usb/gadget/{f_audio,gmidi}.c: follow recent changes in audio.h ASoC: fsi: Modify over/under run error settlement ASoC: OMAP4: Add McPDM platform driver ASoC: OMAP4: Add support for McPDM ASoC: OMAP: data_type and sync_mode configurable in audio dma ALSA: hda - Add missing description in HD-Audio-Models.txt ALSA: add support for Macbook Air 2,1 internal speaker ALSA: usbaudio: consolidate header files ALSA: usbmixer: bail out early when parsing audio class v2 descriptors ALSA: usbaudio: implement basic set of class v2.0 parser ALSA: usbaudio: introduce new types for audio class v2 ALSA: usbaudio: parse USB descriptors with structs ALSA: hda - enable snoop for Intel Cougar Point ALSA: hda - Remove identical definitions for macmini3 model ...
Diffstat (limited to 'sound/pci/ctxfi/ctatc.c')
-rw-r--r--sound/pci/ctxfi/ctatc.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c
index 459c1f62783..480cb1e905b 100644
--- a/sound/pci/ctxfi/ctatc.c
+++ b/sound/pci/ctxfi/ctatc.c
@@ -1214,10 +1214,11 @@ static int atc_dev_free(struct snd_device *dev)
return ct_atc_destroy(atc);
}
-static int __devinit atc_identify_card(struct ct_atc *atc)
+static int __devinit atc_identify_card(struct ct_atc *atc, unsigned int ssid)
{
const struct snd_pci_quirk *p;
const struct snd_pci_quirk *list;
+ u16 vendor_id, device_id;
switch (atc->chip_type) {
case ATC20K1:
@@ -1231,13 +1232,19 @@ static int __devinit atc_identify_card(struct ct_atc *atc)
default:
return -ENOENT;
}
- p = snd_pci_quirk_lookup(atc->pci, list);
+ if (ssid) {
+ vendor_id = ssid >> 16;
+ device_id = ssid & 0xffff;
+ } else {
+ vendor_id = atc->pci->subsystem_vendor;
+ device_id = atc->pci->subsystem_device;
+ }
+ p = snd_pci_quirk_lookup_id(vendor_id, device_id, list);
if (p) {
if (p->value < 0) {
printk(KERN_ERR "ctxfi: "
"Device %04x:%04x is black-listed\n",
- atc->pci->subsystem_vendor,
- atc->pci->subsystem_device);
+ vendor_id, device_id);
return -ENOENT;
}
atc->model = p->value;
@@ -1250,8 +1257,7 @@ static int __devinit atc_identify_card(struct ct_atc *atc)
atc->model_name = ct_subsys_name[atc->model];
snd_printd("ctxfi: chip %s model %s (%04x:%04x) is found\n",
atc->chip_name, atc->model_name,
- atc->pci->subsystem_vendor,
- atc->pci->subsystem_device);
+ vendor_id, device_id);
return 0;
}
@@ -1625,7 +1631,8 @@ static struct ct_atc atc_preset __devinitdata = {
int __devinit ct_atc_create(struct snd_card *card, struct pci_dev *pci,
unsigned int rsr, unsigned int msr,
- int chip_type, struct ct_atc **ratc)
+ int chip_type, unsigned int ssid,
+ struct ct_atc **ratc)
{
struct ct_atc *atc;
static struct snd_device_ops ops = {
@@ -1651,7 +1658,7 @@ int __devinit ct_atc_create(struct snd_card *card, struct pci_dev *pci,
mutex_init(&atc->atc_mutex);
/* Find card model */
- err = atc_identify_card(atc);
+ err = atc_identify_card(atc, ssid);
if (err < 0) {
printk(KERN_ERR "ctatc: Card not recognised\n");
goto error1;