summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/sound/pcm/channel.c2
-rw-r--r--sys/dev/sound/pcm/dsp.c10
2 files changed, 5 insertions, 7 deletions
diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c
index 6f4893a..ce9344f 100644
--- a/sys/dev/sound/pcm/channel.c
+++ b/sys/dev/sound/pcm/channel.c
@@ -422,7 +422,7 @@ chn_start(struct pcm_channel *c, int force)
CHN_LOCKASSERT(c);
/* if we're running, or if we're prevented from triggering, bail */
- if ((c->flags & CHN_F_TRIGGERED) || (c->flags & CHN_F_NOTRIGGER))
+ if ((c->flags & CHN_F_TRIGGERED) || ((c->flags & CHN_F_NOTRIGGER) && !force))
return EINVAL;
i = (c->direction == PCMDIR_PLAY)? sndbuf_getready(bs) : sndbuf_getfree(bs);
diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c
index d1ae32f..cfc3067 100644
--- a/sys/dev/sound/pcm/dsp.c
+++ b/sys/dev/sound/pcm/dsp.c
@@ -882,20 +882,18 @@ dsp_ioctl(dev_t i_dev, u_long cmd, caddr_t arg, int mode, struct proc *p)
if (rdch) {
CHN_LOCK(rdch);
rdch->flags &= ~(CHN_F_TRIGGERED | CHN_F_NOTRIGGER);
- if (*arg_i & PCM_ENABLE_INPUT) {
- rdch->flags |= CHN_F_TRIGGERED;
+ if (*arg_i & PCM_ENABLE_INPUT)
chn_start(rdch, 1);
- } else
+ else
rdch->flags |= CHN_F_NOTRIGGER;
CHN_UNLOCK(rdch);
}
if (wrch) {
CHN_LOCK(wrch);
wrch->flags &= ~(CHN_F_TRIGGERED | CHN_F_NOTRIGGER);
- if (*arg_i & PCM_ENABLE_OUTPUT) {
- wrch->flags |= CHN_F_TRIGGERED;
+ if (*arg_i & PCM_ENABLE_OUTPUT)
chn_start(wrch, 1);
- } else
+ else
wrch->flags |= CHN_F_NOTRIGGER;
CHN_UNLOCK(wrch);
}
OpenPOWER on IntegriCloud