Don't mess up with CHN_F_TRIGGERED, since it should exclusively
be handled by chn_abort() and chn_start() alone. This should fix few issues with single duplex hardware (mostly) or pre virtual record (RELENG 6) under WINE emulation and possibly others that using SNDCTL_DSP_SETTRIGGER. MFC after: 3 days
This commit is contained in:
parent
dc0aff276c
commit
68d15cd6e6
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user