46 { 0, 1,
"line", 1, 1 },
47 { 6, 7,
"phone", 1, 0 },
48 { 8, 9,
"aes", 1, 1 },
49 { 10, 11,
"s/pdif", 1, 1 },
50 { 12, 16,
"adat", 1, 1 },
53 { 14, 18,
"adat", 1, 1 },
56 { 13, 15,
"adat", 1, 1 },
57 { 17, 19,
"adat", 1, 1 },
63 { 0, 1,
"aes", 1, 1 },
64 { 2, 3,
"s/pdif", 1, 1 },
65 { 4, 5,
"adat", 1, 1 },
66 { 6, 7,
"adat", 1, 1 },
67 { 8, 9,
"adat", 1, 1 },
68 { 10, 11,
"adat", 1, 1 },
71 { 12, 13,
"adat", 1, 1 },
72 { 14, 15,
"adat", 1, 1 },
73 { 16, 17,
"adat", 1, 1 },
74 { 18, 19,
"adat", 1, 1 },
77 { 20, 21,
"adat", 1, 1 },
78 { 22, 23,
"adat", 1, 1 },
79 { 24, 25,
"adat", 1, 1 },
80 { 26, 27,
"adat", 1, 1 },
81 { 28, 29,
"adat", 1, 1 },
82 { 30, 31,
"adat", 1, 1 },
83 { 32, 33,
"adat", 1, 1 },
84 { 34, 35,
"adat", 1, 1 },
106 if ((err = device_get_children(sc->
dev, &devlist, &devcount)) != 0)
109 for (i = 0; i < devcount; i++) {
110 scp = device_get_ivars(devlist[i]);
116 free(devlist, M_TEMP);
130 device_printf(sc->
dev,
"hdspe_dmapsetmap()\n");
140 sc->
cs = bus_alloc_resource_any(sc->
dev, SYS_RES_MEMORY,
141 &sc->
csid, RF_ACTIVE);
144 device_printf(sc->
dev,
"Unable to map SYS_RES_MEMORY.\n");
148 sc->
cst = rman_get_bustag(sc->
cs);
149 sc->
csh = rman_get_bushandle(sc->
cs);
153 sc->
irq = bus_alloc_resource_any(sc->
dev, SYS_RES_IRQ, &sc->
irqid,
154 RF_ACTIVE | RF_SHAREABLE);
157 bus_setup_intr(sc->
dev, sc->
irq, INTR_MPSAFE | INTR_TYPE_AV,
159 device_printf(sc->
dev,
"Unable to alloc interrupt resource.\n");
164 if (bus_dma_tag_create(bus_get_dma_tag(sc->
dev),
167 BUS_SPACE_MAXADDR_32BIT,
178 device_printf(sc->
dev,
"Unable to create dma tag.\n");
185 if (bus_dmamem_alloc(sc->
dmat, (
void **)&sc->
pbuf, BUS_DMA_WAITOK,
187 device_printf(sc->
dev,
"Can't alloc pbuf.\n");
193 device_printf(sc->
dev,
"Can't load pbuf.\n");
198 if (bus_dmamem_alloc(sc->
dmat, (
void **)&sc->
rbuf, BUS_DMA_WAITOK,
200 device_printf(sc->
dev,
"Can't alloc rbuf.\n");
206 device_printf(sc->
dev,
"Can't load rbuf.\n");
243 device_set_desc(
dev,
"RME HDSPe AIO");
246 device_set_desc(
dev,
"RME HDSPe RayDAT");
302 device_printf(
dev,
"hdspe_attach()\n");
305 sc = device_get_softc(
dev);
310 pci_enable_busmaster(
dev);
328 device_printf(
dev,
"Unable to allocate system resources.\n");
336 scp = malloc(
sizeof(
struct sc_pcminfo), M_DEVBUF, M_NOWAIT | M_ZERO);
337 scp->
hc = &chan_map[i];
339 scp->
dev = device_add_child(
dev,
"pcm", -1);
340 device_set_ivars(scp->
dev, scp);
345 return (bus_generic_attach(
dev));
352 bus_dmamap_unload(sc->
dmat, sc->
rmap);
353 bus_dmamap_unload(sc->
dmat, sc->
pmap);
365 sc = device_get_softc(
dev);
367 device_printf(
dev,
"Can't detach: softc is null.\n");
371 err = device_delete_children(
dev);
378 bus_teardown_intr(
dev, sc->
irq, sc->
ih);
380 bus_dma_tag_destroy(sc->
dmat);
382 bus_release_resource(
dev, SYS_RES_IRQ, 0, sc->
irq);
384 bus_release_resource(
dev, SYS_RES_MEMORY,
PCIR_BAR(0), sc->
cs);
static void hdspe_dmapsetmap(void *arg, bus_dma_segment_t *segs, int nseg, int error)
static int hdspe_init(struct sc_info *sc)
static device_method_t hdspe_methods[]
static driver_t hdspe_driver
static void hdspe_intr(void *p)
static struct hdspe_channel chan_map_aio[]
static struct hdspe_channel chan_map_rd[]
static int hdspe_alloc_resources(struct sc_info *sc)
SND_DECLARE_FILE("$FreeBSD$")
static void hdspe_dmafree(struct sc_info *sc)
DRIVER_MODULE(snd_hdspe, pci, hdspe_driver, hdspe_devclass, 0, 0)
static int hdspe_detach(device_t dev)
static devclass_t hdspe_devclass
static int hdspe_probe(device_t dev)
static void hdspe_map_dmabuf(struct sc_info *sc)
static int hdspe_attach(device_t dev)
#define HDSPE_SPEED_DEFAULT
#define PCI_REVISION_RAYDAT
#define HDSPE_INTERRUPT_ACK
#define HDSPE_CONTROL_REG
#define hdspe_write_1(sc, regno, data)
#define HDSPE_FREQ_MASK_DEFAULT
#define HDSPE_PAGE_ADDR_BUF_OUT
#define hdspe_write_4(sc, regno, data)
#define PCI_DEVICE_XILINX_HDSPE
#define HDSPM_CLOCK_MODE_MASTER
#define HDSPE_AUDIO_IRQ_PENDING
#define PCI_VENDOR_XILINX
#define HDSPE_SETTINGS_REG
#define hdspe_read_1(sc, regno)
#define HDSPE_PAGE_ADDR_BUF_IN
#define hdspe_encode_latency(x)
void * snd_mtxcreate(const char *desc, const char *type)
void snd_mtxfree(void *m)
uint32_t settings_register
struct hdspe_channel * hc
uint32_t(* ih)(struct sc_pcminfo *scp)