// SPDX-License-Identifier: GPL-2.0-only /* * ALSA driver for the Aureal Vortex family of soundprocessors. * Author: Manuel Jander (mjander@embedded.cl) * * This driver is the result of the OpenVortex Project from Savannah * (savannah.nongnu.org/projects/openvortex). I would like to thank * the developers of OpenVortex, Jeff Muizelaar and Kester Maddock, from * whom i got plenty of help, and their codebase was invaluable. * Thanks to the ALSA developers, they helped a lot working out * the ALSA part. * Thanks also to Sourceforge for maintaining the old binary drivers, * and the forum, where developers could communicate. * * Now at least i can play Legacy DOOM with MIDI music :-)
*/
staticvoid vortex_fix_latency(struct pci_dev *vortex)
{ int rc;
rc = pci_write_config_byte(vortex, 0x40, 0xff); if (!rc) {
dev_info(&vortex->dev, "vortex latency is 0xff\n");
} else {
dev_warn(&vortex->dev, "could not set vortex latency: pci error 0x%x\n", rc);
}
}
staticvoid vortex_fix_agp_bridge(struct pci_dev *via)
{ int rc;
u8 value;
/* * only set the bit (Extend PCI#2 Internal Master for * Efficient Handling of Dummy Requests) if the can * read the config and it is not already set
*/
rc = pci_read_config_byte(via, 0x42, &value); if (!rc) { if (!(value & 0x10))
rc = pci_write_config_byte(via, 0x42, value | 0x10);
} if (!rc) {
dev_info(&via->dev, "bridge config is 0x%x\n", value | 0x10);
} else {
dev_warn(&via->dev, "could not set vortex latency: pci error 0x%x\n", rc);
}
}
// (1) PCI resource allocation // Get MMIO area //
chip->mmio = pcim_iomap_region(pci, 0, KBUILD_MODNAME); if (IS_ERR(chip->mmio)) return PTR_ERR(chip->mmio);
chip->io = pci_resource_start(pci, 0);
/* Init audio core. * This must be done before we do request_irq otherwise we can get spurious
* interrupts that we do not handle properly and make a mess of things */
err = vortex_core_init(chip); if (err) {
dev_err(card->dev, "hw core init failed\n"); return err;
}
// (5)
err = pci_read_config_word(pci, PCI_DEVICE_ID, &chip->device); if (err < 0) return err;
err = pci_read_config_word(pci, PCI_VENDOR_ID, &chip->vendor); if (err < 0) return err;
chip->rev = pci->revision; #ifdef CHIP_AU8830 if ((chip->rev) != 0xfe && (chip->rev) != 0xfa) {
dev_alert(card->dev, "The revision (%x) of your card has not been seen before.\n",
chip->rev);
dev_alert(card->dev, "Please email the results of 'lspci -vv' to openvortex-dev@nongnu.org.\n"); return -ENODEV;
} #endif
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.