return -ENOENT;
}
model = pci_id->driver_data ? &model_meridian : &model_generic;
- err = oxygen_pci_probe(pci, index[dev], id[dev], model);
+ err = oxygen_pci_probe(pci, index[dev], id[dev], 1, model);
if (err >= 0)
++dev;
return err;
/* oxygen_lib.c */
-int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
+int oxygen_pci_probe(struct pci_dev *pci, int index, char *id, int midi,
const struct oxygen_model *model);
void oxygen_pci_remove(struct pci_dev *pci);
}
int __devinit oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
- const struct oxygen_model *model)
+ int midi, const struct oxygen_model *model)
{
struct snd_card *card;
struct oxygen *chip;
if (err < 0)
goto err_card;
- if (oxygen_read8(chip, OXYGEN_MISC) & OXYGEN_MISC_MIDI) {
+ oxygen_write8_masked(chip, OXYGEN_MISC,
+ midi ? OXYGEN_MISC_MIDI : 0, OXYGEN_MISC_MIDI);
+ if (midi) {
err = snd_mpu401_uart_new(card, 0, MPU401_HW_CMIPCI,
chip->addr + OXYGEN_MPU401,
MPU401_INFO_INTEGRATED, 0, 0,
++dev;
return -ENOENT;
}
- err = oxygen_pci_probe(pci, index[dev], id[dev], &model_xonar);
+ err = oxygen_pci_probe(pci, index[dev], id[dev], 1, &model_xonar);
if (err >= 0)
++dev;
return err;