summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound/pcm/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/sound/pcm/buffer.c')
-rw-r--r--sys/dev/sound/pcm/buffer.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/dev/sound/pcm/buffer.c b/sys/dev/sound/pcm/buffer.c
index a096b40..8ae35a3 100644
--- a/sys/dev/sound/pcm/buffer.c
+++ b/sys/dev/sound/pcm/buffer.c
@@ -48,6 +48,12 @@ sndbuf_destroy(struct snd_dbuf *b)
free(b, M_DEVBUF);
}
+bus_addr_t
+sndbuf_getbufaddr(struct snd_dbuf *buf)
+{
+ return (buf->buf_addr);
+}
+
static void
sndbuf_setmap(void *arg, bus_dma_segment_t *segs, int nseg, int error)
{
@@ -58,12 +64,14 @@ sndbuf_setmap(void *arg, bus_dma_segment_t *segs, int nseg, int error)
(unsigned long)segs->ds_len);
printf("%p -> %lx\n", b->buf, (unsigned long)vtophys(b->buf));
}
+ b->buf_addr = segs->ds_addr;
}
/*
* Allocate memory for DMA buffer. If the device does not use DMA transfers,
* the driver can call malloc(9) and sndbuf_setup() itself.
*/
+
int
sndbuf_alloc(struct snd_dbuf *b, bus_dma_tag_t dmatag, unsigned int size)
{
OpenPOWER on IntegriCloud