diff options
author | cg <cg@FreeBSD.org> | 2000-04-17 16:57:12 +0000 |
---|---|---|
committer | cg <cg@FreeBSD.org> | 2000-04-17 16:57:12 +0000 |
commit | d3deb9312dc047ed5d02d354dabf1e227f70076c (patch) | |
tree | 60c0b7d6c1cbb6e60eee35a501fd040b88e7be00 /sys/dev/sound/pci/t4dwave.c | |
parent | 672d6047334454b7330149d021cfe16f6596a0d6 (diff) | |
download | FreeBSD-src-d3deb9312dc047ed5d02d354dabf1e227f70076c.zip FreeBSD-src-d3deb9312dc047ed5d02d354dabf1e227f70076c.tar.gz |
make drivers start at beginning of buffer when triggered - improves mmap.
not all tested.
not sure about aureal.c or csapcm.c
Diffstat (limited to 'sys/dev/sound/pci/t4dwave.c')
-rw-r--r-- | sys/dev/sound/pci/t4dwave.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/sound/pci/t4dwave.c b/sys/dev/sound/pci/t4dwave.c index 1d8659a..135641f 100644 --- a/sys/dev/sound/pci/t4dwave.c +++ b/sys/dev/sound/pci/t4dwave.c @@ -487,10 +487,15 @@ trchan_trigger(void *data, int go) { struct tr_chinfo *ch = data; struct tr_info *tr = ch->parent; + if (go == PCMTRIG_EMLDMAWR) return 0; if (ch->index >= 0) { - if (go == PCMTRIG_START) tr_startch(tr, ch->index); - else tr_stopch(tr, ch->index); + if (go == PCMTRIG_START) { + tr_rdch(tr, ch->index, ch); + ch->cso = 0; + tr_wrch(tr, ch->index, ch); + tr_startch(tr, ch->index); + } else tr_stopch(tr, ch->index); } else { u_int32_t i = tr_rd(tr, TR_REG_SBCTRL, 1) & ~7; tr_wr(tr, TR_REG_SBCTRL, i | (go == PCMTRIG_START)? 1 : 0, 1); |