diff options
| author | Mathew Kanner <matk@FreeBSD.org> | 2004-01-20 05:30:09 +0000 |
|---|---|---|
| committer | Mathew Kanner <matk@FreeBSD.org> | 2004-01-20 05:30:09 +0000 |
| commit | 222d2384ef09e52a862da1d6a905b57a2c0571e0 (patch) | |
| tree | ac5a5da8a38b72866df462fdb93b067a28aa42e5 /sys/dev | |
| parent | 556c5b97ea07b72d2c9dab5f4d40c5737479a5eb (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/sound/pcm/dsp.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 546041b11fc4..1bff6630ae27 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -660,10 +660,18 @@ dsp_ioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct thread *td) case SNDCTL_DSP_RESET: DEB(printf("dsp reset\n")); - if (wrch) + if (wrch) { + CHN_LOCK(wrch); chn_abort(wrch); - if (rdch) + chn_resetbuf(wrch); + CHN_UNLOCK(wrch); + } + if (rdch) { + CHN_LOCK(rdch); chn_abort(rdch); + chn_resetbuf(rdch); + CHN_UNLOCK(rdch); + } break; case SNDCTL_DSP_SYNC: |
