19 #include <linux/pci.h>
20 #include <linux/slab.h>
22 #include <linux/module.h>
47 static void vortex_fix_latency(
struct pci_dev *vortex)
50 if (!(rc = pci_write_config_byte(vortex, 0x40, 0xff))) {
52 ": vortex latency is 0xff\n");
55 ": could not set vortex latency: pci error 0x%x\n", rc);
59 static void vortex_fix_agp_bridge(
struct pci_dev *via)
70 if (!(rc = pci_read_config_byte(via, 0x42, &value))
72 || !(rc = pci_write_config_byte(via, 0x42, value | 0x10)))) {
74 ": bridge config is 0x%x\n", value | 0x10);
77 ": could not set vortex latency: pci error 0x%x\n", rc);
101 vortex_fix_latency(vortex);
102 vortex_fix_agp_bridge(via);
106 vortex_fix_latency(vortex);
109 vortex_fix_agp_bridge(via);
112 vortex_fix_agp_bridge(via);
115 vortex_fix_agp_bridge(via);
126 vortex_gameport_unregister(vortex);
127 vortex_core_shutdown(vortex);
146 .dev_free = snd_vortex_dev_free,
155 pci_set_consistent_dma_mask(pci,
DMA_BIT_MASK(32)) < 0) {
193 if ((err = vortex_core_init(chip)) != 0) {
223 vortex_core_shutdown(chip);
231 vortex_gameport_unregister(chip);
258 if ((err = snd_vortex_create(card, pci, &chip)) < 0) {
262 snd_vortex_workaround(pci, pcifix[dev]);
271 err = snd_vortex_mixer(chip);
308 if ((err = snd_vortex_midi(chip)) < 0) {
313 vortex_gameport_register(chip);
317 sizeof(snd_vortex_synth_arg_t), &wave) < 0
321 snd_vortex_synth_arg_t *
arg;
324 strcpy(wave->name,
"Aureal Synth");
327 arg->seq_ports = seq_ports[
dev];
328 arg->max_voices = max_synth_voices[
dev];
345 if ((chip->
rev) != 0xfe && (chip->
rev) != 0xfa) {
347 "vortex: The revision (%x) of your card has not been seen before.\n",
363 pci_set_drvdata(pci, card);
365 vortex_connect_default(chip, 1);
366 vortex_enable_int(chip);
374 pci_set_drvdata(pci,
NULL);
379 .name = KBUILD_MODNAME,
380 .id_table = snd_vortex_ids,
381 .probe = snd_vortex_probe,