Conserve stereo mode in ioctl SNDCTL_DSP_SETFMT.
PR: 14372 Submitted by: Mattias Pantzare <pantzer@ludd.luth.se>, Ville-Pertti Keinonen <will@iki.fi>
This commit is contained in:
parent
9e18a3bdd2
commit
35e6a54a31
@ -387,9 +387,9 @@ dsp_ioctl(snddev_info *d, int chan, u_long cmd, caddr_t arg)
|
||||
|
||||
case SNDCTL_DSP_SETFMT: /* sets _one_ format */
|
||||
splx(s);
|
||||
if (wrch) chn_setformat(wrch, *arg_i);
|
||||
if (rdch) chn_setformat(rdch, *arg_i);
|
||||
*arg_i = wrch? wrch->format : rdch->format;
|
||||
if (wrch) chn_setformat(wrch, (*arg_i) | (wrch->format & AFMT_STEREO));
|
||||
if (rdch) chn_setformat(rdch, (*arg_i) | (rdch->format & AFMT_STEREO));
|
||||
*arg_i = (wrch? wrch->format: rdch->format) & ~AFMT_STEREO;
|
||||
break;
|
||||
|
||||
case SNDCTL_DSP_SUBDIVIDE:
|
||||
|
@ -387,9 +387,9 @@ dsp_ioctl(snddev_info *d, int chan, u_long cmd, caddr_t arg)
|
||||
|
||||
case SNDCTL_DSP_SETFMT: /* sets _one_ format */
|
||||
splx(s);
|
||||
if (wrch) chn_setformat(wrch, *arg_i);
|
||||
if (rdch) chn_setformat(rdch, *arg_i);
|
||||
*arg_i = wrch? wrch->format : rdch->format;
|
||||
if (wrch) chn_setformat(wrch, (*arg_i) | (wrch->format & AFMT_STEREO));
|
||||
if (rdch) chn_setformat(rdch, (*arg_i) | (rdch->format & AFMT_STEREO));
|
||||
*arg_i = (wrch? wrch->format: rdch->format) & ~AFMT_STEREO;
|
||||
break;
|
||||
|
||||
case SNDCTL_DSP_SUBDIVIDE:
|
||||
|
Loading…
Reference in New Issue
Block a user