Lines Matching refs:gus
1 /* $NetBSD: gus.c,v 1.119 2021/02/06 07:16:18 isaki Exp $ */
40 * from the GUS SDK?) A 486/33 isn't quite fast enough to keep
49 * For more detailed information, see the GUS developers' kit
59 * The GUS Max has a slightly strange set of connections between the CS4231
91 __KERNEL_RCSID(0, "$NetBSD: gus.c,v 1.119 2021/02/06 07:16:18 isaki Exp $");
132 * Software state of a single "voice" on the GUS
147 * Address of the voice data into the GUS's DRAM. 20 bits each
156 * linear volume values for the GUS's volume ramp. 0-511 (9 bits).
167 * Software state of GUS
192 int sc_flags; /* Various flags about the GUS */
194 #define GUS_LOCKED 0x02 /* GUS is busy doing multi-phase DMA */
196 #define GUS_PLAYING 0x08 /* GUS is playing a voice */
197 #define GUS_DMAOUT_ACTIVE 0x10 /* GUS is busy doing audio DMA */
198 #define GUS_DMAIN_ACTIVE 0x20 /* GUS is busy sampling */
199 #define GUS_OPEN 0x100 /* GUS is open */
200 int sc_dsize; /* Size of GUS DRAM */
202 u_char sc_revision; /* Board revision of GUS */
214 short sc_nbufs; /* how many on-GUS bufs per-channel */
442 CFATTACH_DECL_NEW(gus, sizeof(struct gus_softc),
446 * A mapping from IRQ/DRQ values to the values used in the GUS's internal
459 * A list of valid base addresses for the GUS
468 * Maximum frequency values of the GUS based on the number of currently active
469 * voices. Since the GUS samples a voice every 1.6 us, the maximum frequency
496 * by the GF1 chip on the GUS. From GUS SDK vol1.c.
567 #define GUS_MEM_OFFSET 32 /* Offset into GUS memory to begin of buffer */
569 #define GUS_MEM_FOR_BUFFERS 131072 /* use this many bytes on-GUS */
631 "gus",
683 printf("gus: invalid irq %d, card not probed\n",
690 printf("gus: invalid drq %d, card not probed\n",
697 printf("gus: invalid second DMA channel (%d), card "
734 * Test to see if a particular I/O base is valid for the GUS. Return true
761 * Reset GUS to an initial state before we do anything.
806 * Setup the GUS for use; called shortly after probe
904 * Program the IRQ and DMA channels on the GUS. Note that we hardwire
905 * the GUS to only use one IRQ channel, but we give the user the
1033 /* A GUS MAX should always have a CODEC installed */
1150 printf("gus: deinterleave %d > %d\n", size, sc->sc_blocksize);
1153 DPRINTF(("gus: deinterleave %d < %d\n", size,
1376 * GUS for simple playback/record
1501 * If we got a DMA transfer complete from the GUS DRAM, then deal
1696 * interrupt more than once; according to the GUS SDK we are supposed
1798 * no more GUS buffers to use for DMA, the DMA
1942 DPRINTF(("gus: bufcnt 0 on continuing voice?\n"));
2015 * Send/receive data into GUS's DRAM using DMA.
2051 * Make sure the GUS _isn't_ setup for DMA
2076 * Tell the GUS to start doing DMA
2089 * Start a voice playing on the GUS.
2154 DMAPRINTF(("gus voice playing=%x\n", sc->sc_flags));
2161 * Tell the GUS about it. Note that we're doing volume ramping here
2436 * We use sc_nbufs * blocksize bytes of storage in the on-board GUS
2504 * Set the sample rate of the recording frequency. Formula is from the GUS
2521 realrate = 9878400/(16*(rate+2)); /* formula from GUS docs */
2672 * Get current GUS playback address.
2693 DPRINTF(("gus voice %d curaddr %ld end_addr %ld\n",
2720 * Write a value into the GUS's DRAM
2746 * Read a value from the GUS's DRAM
2941 /* enable line in and mic in the GUS mixer; the codec chip
3123 * Make sure the GUS _isn't_ setup for DMA
3164 * Make sure the GUS _isn't_ setup for DMA
3985 * level. Levels as suggested by GUS SDK code.
4013 /* ... and enabled by the GUS master mix control */