summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>1998-10-22 11:20:33 +0000
committerluigi <luigi@FreeBSD.org>1998-10-22 11:20:33 +0000
commitb4eeb12a4c976f8f5ba945b17d84b140b9a404cc (patch)
tree993d30d0aaca57e4dc0b4a936da7b6bae66dff66 /sys/i386
parent4707afb917979014b3dcb6f73bba485dbc342845 (diff)
downloadFreeBSD-src-b4eeb12a4c976f8f5ba945b17d84b140b9a404cc.zip
FreeBSD-src-b4eeb12a4c976f8f5ba945b17d84b140b9a404cc.tar.gz
Fix behaviour of the driver with small files -- due to a stupid
bug sound was not played if the total amount of data written to the device was less than one blocksize Noticed by: NABETANI Masaki and FreeBSD-users-jp
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/isa/snd/dmabuf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/i386/isa/snd/dmabuf.c b/sys/i386/isa/snd/dmabuf.c
index c69435c..6abd8ec 100644
--- a/sys/i386/isa/snd/dmabuf.c
+++ b/sys/i386/isa/snd/dmabuf.c
@@ -4,7 +4,7 @@
* This file implements the new DMA routines for the sound driver.
* AUTO DMA MODE (ISA DMA SIDE).
*
- * Copyright by Luigi Rizzo - 1997
+ * Copyright by Luigi Rizzo - 1997-98
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -180,7 +180,7 @@ dsp_wrintr(snddev_info *d)
* This happens if the size has changed _and_ the new size
* is smaller, or it matches the blocksize.
*/
- if (l != b->dl && (l < b->dl || l == d->play_blocksize) ) {
+ if (l != b->dl && (b->dl == 0 || l<b->dl || l == d->play_blocksize) ) {
/* for any reason, size has changed. Stop and restart */
DEB(printf("wrintr: bsz change from %d to %d, rp %d rl %d\n",
b->dl, l, b->rp, b->rl));
OpenPOWER on IntegriCloud