summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authororion <orion@FreeBSD.org>2002-08-23 20:54:32 +0000
committerorion <orion@FreeBSD.org>2002-08-23 20:54:32 +0000
commit056b90d6f9e4f3183c0e030b4261240fa88d0534 (patch)
treeb536d44e36fb099c077ed4dce05190a6cdda77bd
parent5aae4c8ba0a6ae2d92988170f5c9761f10ac5e3a (diff)
downloadFreeBSD-src-056b90d6f9e4f3183c0e030b4261240fa88d0534.zip
FreeBSD-src-056b90d6f9e4f3183c0e030b4261240fa88d0534.tar.gz
Make sure channel buffer start is associated with channel, otherwise
getptr is broken. Noise reported by Thomas Draney <tmdraney@yahoo.com> who also tested the patch.
-rw-r--r--sys/dev/sound/pci/cmi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/sound/pci/cmi.c b/sys/dev/sound/pci/cmi.c
index 9891e34..973c8f6 100644
--- a/sys/dev/sound/pci/cmi.c
+++ b/sys/dev/sound/pci/cmi.c
@@ -237,11 +237,11 @@ cmpci_regvalue_to_rate(u_int32_t r)
static void
cmi_dma_prog(struct sc_info *sc, struct sc_chinfo *ch, u_int32_t base)
{
- u_int32_t s, i, sz, physbuf;
+ u_int32_t s, i, sz;
- physbuf = vtophys(sndbuf_getbuf(ch->buffer));
+ ch->phys_buf = vtophys(sndbuf_getbuf(ch->buffer));
- cmi_wr(sc, base, physbuf, 4);
+ cmi_wr(sc, base, ch->phys_buf, 4);
sz = (u_int32_t)sndbuf_getsize(ch->buffer);
s = sz / ch->bps - 1;
OpenPOWER on IntegriCloud