1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

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:
Seigo Tanimura 1999-11-07 04:15:30 +00:00
parent 9e18a3bdd2
commit 35e6a54a31
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=52950
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: