/[openvortex]/alsa/pci/au88x0/au88x0.c
ViewVC logotype

Diff of /alsa/pci/au88x0/au88x0.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by vizard, Tue Apr 15 22:01:03 2003 UTC revision 1.2 by mjander, Fri Apr 18 23:47:50 2003 UTC
# Line 27  static int index[SNDRV_CARDS] = SNDRV_DE Line 27  static int index[SNDRV_CARDS] = SNDRV_DE
27  static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;  static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
28  static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;  static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
29    
 #define CARD_NAME "Aureal Vortex 3D Sound Processor"  
   
30  MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");  MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
31  MODULE_PARM_DESC(index, "Index value for " CARD_NAME " soundcard.");  MODULE_PARM_DESC(index, "Index value for " CARD_NAME " soundcard.");
32  MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);  MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
# Line 57  static int __init alsa_card_vortex_setup Line 55  static int __init alsa_card_vortex_setup
55      nr_dev++;      nr_dev++;
56      return 1;      return 1;
57  }  }
58  __setup("snd-mychip=", alsa_card_vortex_setup);  __setup("snd-au88x0=", alsa_card_vortex_setup);
59  #endif /* ifndef MODULE */  #endif /* ifndef MODULE */
60    
61  // PCI IDs  
 /*  
 static struct pci_device_id snd_vortex_ids[] __devinitdata = {  
     {PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_VORTEX,  
      PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0,},  
     {PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_VORTEX2,  
      PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1,},  
     {PCI_VENDOR_ID_AUREAL, PCI_DEVICE_ID_AUREAL_ADVANTAGE,  
      PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1,},  
     {0,}  
 };  
 */  
62  MODULE_DEVICE_TABLE(pci, snd_vortex_ids);  MODULE_DEVICE_TABLE(pci, snd_vortex_ids);
63    
64  // chip-specific destructor  // chip-specific destructor
# Line 102  static int snd_vortex_dev_free(snd_devic Line 89  static int snd_vortex_dev_free(snd_devic
89  // (see "Management of Cards and Components")  // (see "Management of Cards and Components")
90  static int __devinit  static int __devinit
91  snd_vortex_create(snd_card_t * card, struct pci_dev *pci, vortex_t ** rchip) {  snd_vortex_create(snd_card_t * card, struct pci_dev *pci, vortex_t ** rchip) {
92      vortex_t *chip;             // vortex      vortex_t *chip;
93      int err;      int err;
94      static snd_device_ops_t ops = {      static snd_device_ops_t ops = {
95          .dev_free = snd_vortex_dev_free,          .dev_free = snd_vortex_dev_free,
# Line 139  snd_vortex_create(snd_card_t * card, str Line 126  snd_vortex_create(snd_card_t * card, str
126      // (1) PCI resource allocation      // (1) PCI resource allocation
127      // Get MMIO area.      // Get MMIO area.
128      if (!request_mem_region(pci_resource_start(pci, 0),      if (!request_mem_region(pci_resource_start(pci, 0),
129                              pci_resource_len(pci, 0), "vortex")) {                              pci_resource_len(pci, 0), CARD_NAME_SHORT)) {
130          snd_vortex_free(chip);          snd_vortex_free(chip);
131          printk(KERN_ERR "cannot allocate mmio area.\n");          printk(KERN_ERR "cannot allocate mmio area.\n");
132          return -EBUSY;          return -EBUSY;
# Line 157  snd_vortex_create(snd_card_t * card, str Line 144  snd_vortex_create(snd_card_t * card, str
144          printk(KERN_ERR "cannot allocate I/O port0.\n");          printk(KERN_ERR "cannot allocate I/O port0.\n");
145          return -EBUSY;          return -EBUSY;
146      }      }
147      chip->port0 = request_region(pci_resource_start(pci, 1), 8, "vortex");      chip->port0 = request_region(pci_resource_start(pci, 1), 8, CARD_NAME_SHORT);
148            
149      if (check_region(pci_resource_start(pci, 2), 8)) {      if (check_region(pci_resource_start(pci, 2), 8)) {
150          snd_vortex_free(chip);          snd_vortex_free(chip);
151          printk(KERN_ERR "cannot allocate the I/O port1.\n");          printk(KERN_ERR "cannot allocate the I/O port1.\n");
152          return -EBUSY;          return -EBUSY;
153      }      }
154      chip->port1 = request_region(pci_resource_start(pci, 2), 8, "vortex");      chip->port1 = request_region(pci_resource_start(pci, 2), 8, CARD_NAME_SHORT);
155            
156      if (request_irq(pci->irq, vortex_interrupt, SA_INTERRUPT | SA_SHIRQ,      if (request_irq(pci->irq, vortex_interrupt, SA_INTERRUPT | SA_SHIRQ,
157                      "vortex", (void *) chip)) {                      CARD_NAME_SHORT, (void *) chip)) {
158          snd_vortex_free(chip);          snd_vortex_free(chip);
159          printk(KERN_ERR "cannot grab irq\n");          printk(KERN_ERR "cannot grab irq\n");
160          return -EBUSY;          return -EBUSY;
# Line 242  snd_vortex_probe(struct pci_dev *pci, co Line 229  snd_vortex_probe(struct pci_dev *pci, co
229      if (snd_seq_device_new(card, 1, SNDRV_SEQ_DEV_ID_VORTEX_SYNTH,      if (snd_seq_device_new(card, 1, SNDRV_SEQ_DEV_ID_VORTEX_SYNTH,
230                             sizeof(snd_vortex_synth_arg_t), &wave) < 0                             sizeof(snd_vortex_synth_arg_t), &wave) < 0
231          || wave == NULL) {          || wave == NULL) {
232          snd_printk("can't initialize Vortex wavetable synth\n");          snd_printk("Can't initialize Aureal wavetable synth\n");
233      } else {      } else {
234          snd_vortex_synth_arg_t *arg;          snd_vortex_synth_arg_t *arg;
235    
236          arg = SNDRV_SEQ_DEVICE_ARGPTR(wave);          arg = SNDRV_SEQ_DEVICE_ARGPTR(wave);
237          strcpy(wave->name, "Vortex Synth");          strcpy(wave->name, "Aureal Synth");
238          arg->hwptr = vortex;          arg->hwptr = vortex;
239          arg->index = 1;          arg->index = 1;
240          arg->seq_ports = seq_ports[dev];          arg->seq_ports = seq_ports[dev];
# Line 256  snd_vortex_probe(struct pci_dev *pci, co Line 243  snd_vortex_probe(struct pci_dev *pci, co
243  #endif  #endif
244    
245      // (5)      // (5)
246      strcpy(card->driver, "vortex Vortex");      strcpy(card->driver, "Aureal Vortex");
247      strcpy(card->shortname, "vortex");      strcpy(card->shortname, CARD_NAME_SHORT);
248      sprintf(card->longname, "%s at 0x%lx irq %i",      sprintf(card->longname, "%s at 0x%lx irq %i",
249              card->shortname, chip->io, chip->irq);              card->shortname, chip->io, chip->irq);
250    
# Line 288  static void __devexit snd_vortex_remove( Line 275  static void __devexit snd_vortex_remove(
275    
276  // pci_driver definition  // pci_driver definition
277  static struct pci_driver driver = {  static struct pci_driver driver = {
278      .name = "Aureal Vortex",      .name = CARD_NAME_SHORT,
279      .id_table = snd_vortex_ids,      .id_table = snd_vortex_ids,
280      .probe = snd_vortex_probe,      .probe = snd_vortex_probe,
281      .remove = __devexit_p(snd_vortex_remove),      .remove = __devexit_p(snd_vortex_remove),
# Line 300  static int __init alsa_card_vortex_init( Line 287  static int __init alsa_card_vortex_init(
287    
288      if ((err = pci_module_init(&driver)) < 0) {      if ((err = pci_module_init(&driver)) < 0) {
289  #ifdef MODULE  #ifdef MODULE
290          printk(KERN_ERR "vortex soundcard not found " "or device busy\n");          printk(KERN_ERR "Aureal soundcard not found " "or device busy\n");
291  #endif  #endif
292          return err;          return err;
293      }      }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26