summaryrefslogtreecommitdiffstats
path: root/sound/pci/ctxfi/xfi.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-06-08 18:10:32 +0200
committerTakashi Iwai <tiwai@suse.de>2009-06-08 18:10:32 +0200
commit9470195a9cd13e6d90221b8b5d897e9232da8d28 (patch)
tree12f57a49fe94310396f7108c267560c74189c0e0 /sound/pci/ctxfi/xfi.c
parentd362af62ed98f58c64a2b3dd58c79d25ad181b0b (diff)
downloadop-kernel-dev-9470195a9cd13e6d90221b8b5d897e9232da8d28.zip
op-kernel-dev-9470195a9cd13e6d90221b8b5d897e9232da8d28.tar.gz
ALSA: ctxfi - Clean up probe routines
Clean up probe routines and model detection routines so that the driver won't call and check the PCI subsystem id at each time. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ctxfi/xfi.c')
-rw-r--r--sound/pci/ctxfi/xfi.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/sound/pci/ctxfi/xfi.c b/sound/pci/ctxfi/xfi.c
index 279dac6..2d3dd89 100644
--- a/sound/pci/ctxfi/xfi.c
+++ b/sound/pci/ctxfi/xfi.c
@@ -15,6 +15,7 @@
#include <sound/core.h>
#include <sound/initval.h>
#include "ctatc.h"
+#include "cthardware.h"
MODULE_AUTHOR("Creative Technology Ltd");
MODULE_DESCRIPTION("X-Fi driver version 1.03");
@@ -41,8 +42,12 @@ MODULE_PARM_DESC(enable, "Enable Creative X-Fi driver");
static struct pci_device_id ct_pci_dev_ids[] = {
/* only X-Fi is supported, so... */
- { PCI_DEVICE(PCI_VENDOR_ID_CREATIVE, PCI_DEVICE_ID_CREATIVE_20K1) },
- { PCI_DEVICE(PCI_VENDOR_ID_CREATIVE, PCI_DEVICE_ID_CREATIVE_20K2) },
+ { PCI_DEVICE(PCI_VENDOR_ID_CREATIVE, PCI_DEVICE_ID_CREATIVE_20K1),
+ .driver_data = ATC20K1,
+ },
+ { PCI_DEVICE(PCI_VENDOR_ID_CREATIVE, PCI_DEVICE_ID_CREATIVE_20K2),
+ .driver_data = ATC20K2,
+ },
{ 0, }
};
MODULE_DEVICE_TABLE(pci, ct_pci_dev_ids);
@@ -79,7 +84,8 @@ ct_card_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
"1 and 2, Value 2 is assumed.\n");
multiple = 2;
}
- err = ct_atc_create(card, pci, reference_rate, multiple, &atc);
+ err = ct_atc_create(card, pci, reference_rate, multiple,
+ pci_id->driver_data, &atc);
if (err < 0)
goto error;
@@ -92,7 +98,8 @@ ct_card_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
strcpy(card->driver, "SB-XFi");
strcpy(card->shortname, "Creative X-Fi");
- strcpy(card->longname, "Creative ALSA Driver X-Fi");
+ snprintf(card->longname, sizeof(card->longname), "%s %s %s",
+ card->shortname, atc->chip_name, atc->model_name);
err = snd_card_register(card);
if (err < 0)
OpenPOWER on IntegriCloud