diff options
author | cg <cg@FreeBSD.org> | 2001-09-29 07:57:07 +0000 |
---|---|---|
committer | cg <cg@FreeBSD.org> | 2001-09-29 07:57:07 +0000 |
commit | 3113c29f9549f5a7c16cc00242d500baddb6c12a (patch) | |
tree | 6559337f7a3f52a77b76a5b766d52f978eb671da /sys/dev/sound/isa/mss.c | |
parent | 5d69c42a56c5adbe4c103a3d603b419a8b6c00b4 (diff) | |
download | FreeBSD-src-3113c29f9549f5a7c16cc00242d500baddb6c12a.zip FreeBSD-src-3113c29f9549f5a7c16cc00242d500baddb6c12a.tar.gz |
allow the hardware buffer size to be controlled with hints
release isa dma channels on unload (ad1816, ess, sb8)
Diffstat (limited to 'sys/dev/sound/isa/mss.c')
-rw-r--r-- | sys/dev/sound/isa/mss.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/dev/sound/isa/mss.c b/sys/dev/sound/isa/mss.c index 917a0ed..5c2596a 100644 --- a/sys/dev/sound/isa/mss.c +++ b/sys/dev/sound/isa/mss.c @@ -1658,7 +1658,7 @@ static int mss_doattach(device_t dev, struct mss_info *mss) { int pdma, rdma, flags = device_get_flags(dev); - char status[SND_STATUSLEN]; + char status[SND_STATUSLEN], status2[SND_STATUSLEN]; mss->lock = snd_mtxcreate(device_get_nameunit(dev)); mss->bufsize = pcm_getbuffersize(dev, 4096, MSS_DEFAULT_BUFSZ, 65536); @@ -1718,10 +1718,14 @@ mss_doattach(device_t dev, struct mss_info *mss) device_printf(dev, "unable to create dma tag\n"); goto no; } - snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld drq %d", - rman_get_start(mss->io_base), rman_get_start(mss->irq), pdma); - if (pdma != rdma) snprintf(status + strlen(status), - SND_STATUSLEN - strlen(status), ":%d", rdma); + + if (pdma != rdma) + snprintf(status2, SND_STATUSLEN, ":%d", rdma); + else + status2[0] = '\0'; + + snprintf(status, SND_STATUSLEN, "at io 0x%lx irq %ld drq %d%s bufsz %u", + rman_get_start(mss->io_base), rman_get_start(mss->irq), pdma, status2, mss->bufsize); if (pcm_register(dev, mss, 1, 1)) goto no; pcm_addchan(dev, PCMDIR_REC, &msschan_class, mss); |