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:
tanimura 1999-11-07 04:15:30 +00:00
parent 9c150e9d7e
commit c8d866094f
2 changed files with 6 additions and 6 deletions

View File

@ -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:

View File

@ -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: