Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/sound/pci/vibes.c
Show First 20 Lines • Show All 753 Lines • ▼ Show 20 Lines | sv_attach(device_t dev) { | ||||
DEB(printf("sv_attach: initial dmac 0x%08x\n", data)); | DEB(printf("sv_attach: initial dmac 0x%08x\n", data)); | ||||
/* Initialize DMA_A and DMA_C */ | /* Initialize DMA_A and DMA_C */ | ||||
pci_write_config(dev, SV_PCI_DMAA, SV_PCI_DMA_EXTENDED, 4); | pci_write_config(dev, SV_PCI_DMAA, SV_PCI_DMA_EXTENDED, 4); | ||||
pci_write_config(dev, SV_PCI_DMAC, 0, 4); | pci_write_config(dev, SV_PCI_DMAC, 0, 4); | ||||
/* Register IRQ handler */ | /* Register IRQ handler */ | ||||
sc->irqid = 0; | sc->irqid = 0; | ||||
sc->irq = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->irqid, | sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irqid, | ||||
0, ~0, 1, RF_ACTIVE | RF_SHAREABLE); | RF_ACTIVE | RF_SHAREABLE); | ||||
if (!sc->irq || | if (!sc->irq || | ||||
snd_setup_intr(dev, sc->irq, 0, sv_intr, sc, &sc->ih)) { | snd_setup_intr(dev, sc->irq, 0, sv_intr, sc, &sc->ih)) { | ||||
device_printf(dev, "sv_attach: Unable to map interrupt\n"); | device_printf(dev, "sv_attach: Unable to map interrupt\n"); | ||||
goto fail; | goto fail; | ||||
} | } | ||||
sc->bufsz = pcm_getbuffersize(dev, 4096, SV_DEFAULT_BUFSZ, 65536); | sc->bufsz = pcm_getbuffersize(dev, 4096, SV_DEFAULT_BUFSZ, 65536); | ||||
if (bus_dma_tag_create(/*parent*/bus_get_dma_tag(dev), /*alignment*/2, | if (bus_dma_tag_create(/*parent*/bus_get_dma_tag(dev), /*alignment*/2, | ||||
▲ Show 20 Lines • Show All 174 Lines • Show Last 20 Lines |