summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound/pcm/buffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/sound/pcm/buffer.h')
-rw-r--r--sys/dev/sound/pcm/buffer.h38
1 files changed, 29 insertions, 9 deletions
diff --git a/sys/dev/sound/pcm/buffer.h b/sys/dev/sound/pcm/buffer.h
index 930d2e5..d25ceec 100644
--- a/sys/dev/sound/pcm/buffer.h
+++ b/sys/dev/sound/pcm/buffer.h
@@ -26,13 +26,35 @@
* $FreeBSD$
*/
-#define ISA_DMA(b) (sndbuf_getflags((b)) & SNDBUF_F_ISADMA)
+#define SND_DMA(b) (sndbuf_getflags((b)) & SNDBUF_F_DMA)
#define SNDBUF_LOCKASSERT(b)
-#define SNDBUF_F_ISADMA 0x00000001
+#define SNDBUF_F_DMA 0x00000001
#define SNDBUF_F_XRUN 0x00000002
#define SNDBUF_F_RUNNING 0x00000004
+#define SNDBUF_NAMELEN 48
+
+struct snd_dbuf {
+ device_t dev;
+ u_int8_t *buf, *tmpbuf;
+ unsigned int bufsize, maxsize;
+ volatile int dl; /* transfer size */
+ volatile int rp; /* pointers to the ready area */
+ volatile int rl; /* length of ready area */
+ volatile int hp;
+ volatile u_int32_t total, prev_total;
+ int dmachan, dir; /* dma channel */
+ u_int32_t fmt, spd, bps;
+ unsigned int blksz, blkcnt;
+ int xrun;
+ u_int32_t flags;
+ bus_dmamap_t dmamap;
+ bus_dma_tag_t dmatag;
+ struct selinfo sel;
+ char name[SNDBUF_NAMELEN];
+};
+
struct snd_dbuf *sndbuf_create(device_t dev, char *drv, char *desc);
void sndbuf_destroy(struct snd_dbuf *b);
@@ -87,10 +109,8 @@ int sndbuf_feed(struct snd_dbuf *from, struct snd_dbuf *to, struct pcm_channel *
u_int32_t sndbuf_getflags(struct snd_dbuf *b);
void sndbuf_setflags(struct snd_dbuf *b, u_int32_t flags, int on);
-int sndbuf_isadmasetup(struct snd_dbuf *b, struct resource *drq);
-int sndbuf_isadmasetdir(struct snd_dbuf *b, int dir);
-void sndbuf_isadma(struct snd_dbuf *b, int go);
-int sndbuf_isadmaptr(struct snd_dbuf *b);
-void sndbuf_isadmabounce(struct snd_dbuf *b);
-
-
+int sndbuf_dmasetup(struct snd_dbuf *b, struct resource *drq);
+int sndbuf_dmasetdir(struct snd_dbuf *b, int dir);
+void sndbuf_dma(struct snd_dbuf *b, int go);
+int sndbuf_dmaptr(struct snd_dbuf *b);
+void sndbuf_dmabounce(struct snd_dbuf *b);
OpenPOWER on IntegriCloud