diff options
| author | Ariff Abdullah <ariff@FreeBSD.org> | 2008-04-11 15:26:25 +0000 |
|---|---|---|
| committer | Ariff Abdullah <ariff@FreeBSD.org> | 2008-04-11 15:26:25 +0000 |
| commit | 429cc1009b221987e96cf58ad9e757cbfa6f52e4 (patch) | |
| tree | 4cfb51d1a24714bb554ff26b40331c213dc029bf | |
| parent | 4c061448d16c5b6a5974c1c7c901d9fb9042965b (diff) | |
Notes
| -rw-r--r-- | sys/dev/sound/pcm/dsp.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index e60c0a9f72ed..232a9502d401 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -1393,20 +1393,26 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, int mode, struct thread * case SNDCTL_DSP_SETTRIGGER: if (rdch) { CHN_LOCK(rdch); - rdch->flags &= ~(CHN_F_TRIGGERED | CHN_F_NOTRIGGER); + rdch->flags &= ~CHN_F_NOTRIGGER; if (*arg_i & PCM_ENABLE_INPUT) chn_start(rdch, 1); - else + else { + chn_abort(rdch); + chn_resetbuf(rdch); rdch->flags |= CHN_F_NOTRIGGER; + } CHN_UNLOCK(rdch); } if (wrch) { CHN_LOCK(wrch); - wrch->flags &= ~(CHN_F_TRIGGERED | CHN_F_NOTRIGGER); + wrch->flags &= ~CHN_F_NOTRIGGER; if (*arg_i & PCM_ENABLE_OUTPUT) chn_start(wrch, 1); - else + else { + chn_abort(wrch); + chn_resetbuf(wrch); wrch->flags |= CHN_F_NOTRIGGER; + } CHN_UNLOCK(wrch); } break; |
