mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-23 11:18:54 +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:
parent
9e18a3bdd2
commit
35e6a54a31
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=52950
@ -387,9 +387,9 @@ dsp_ioctl(snddev_info *d, int chan, u_long cmd, caddr_t arg)
|
|||||||
|
|
||||||
case SNDCTL_DSP_SETFMT: /* sets _one_ format */
|
case SNDCTL_DSP_SETFMT: /* sets _one_ format */
|
||||||
splx(s);
|
splx(s);
|
||||||
if (wrch) chn_setformat(wrch, *arg_i);
|
if (wrch) chn_setformat(wrch, (*arg_i) | (wrch->format & AFMT_STEREO));
|
||||||
if (rdch) chn_setformat(rdch, *arg_i);
|
if (rdch) chn_setformat(rdch, (*arg_i) | (rdch->format & AFMT_STEREO));
|
||||||
*arg_i = wrch? wrch->format : rdch->format;
|
*arg_i = (wrch? wrch->format: rdch->format) & ~AFMT_STEREO;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SNDCTL_DSP_SUBDIVIDE:
|
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 */
|
case SNDCTL_DSP_SETFMT: /* sets _one_ format */
|
||||||
splx(s);
|
splx(s);
|
||||||
if (wrch) chn_setformat(wrch, *arg_i);
|
if (wrch) chn_setformat(wrch, (*arg_i) | (wrch->format & AFMT_STEREO));
|
||||||
if (rdch) chn_setformat(rdch, *arg_i);
|
if (rdch) chn_setformat(rdch, (*arg_i) | (rdch->format & AFMT_STEREO));
|
||||||
*arg_i = wrch? wrch->format : rdch->format;
|
*arg_i = (wrch? wrch->format: rdch->format) & ~AFMT_STEREO;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SNDCTL_DSP_SUBDIVIDE:
|
case SNDCTL_DSP_SUBDIVIDE:
|
||||||
|
Loading…
Reference in New Issue
Block a user