Date: Sun, 17 Oct 1999 17:01:39 +0200 (CEST) From: pantzer@ludd.luth.se To: FreeBSD-gnats-submit@freebsd.org Subject: i386/14372: The audio ioctl SNDCTL_DSP_SETFMT affects the stereo setting Message-ID: <199910171501.RAA00509@skalman.campus.luth.se>
next in thread | raw e-mail | index | archive | help
>Number: 14372
>Category: i386
>Synopsis: The audio ioctl SNDCTL_DSP_SETFMT affects the stereo setting
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Oct 17 08:10:01 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator: Mattias Pantzare
>Release: FreeBSD 4.0-CURRENT i386
>Organization:
>Environment:
FreeBSD-current from 991017.
Soundcad supported by pcm.
>Description:
splay plays mp3 at low speed. The problem is that it tries to set stereo
but gets mono.
SNDCTL_DSP_SETFMT now resets the AFMT_STERO bit. This was not the case in earlier kernels (from 990901 for example)
>How-To-Repeat:
Run splay.
>Fix:
Index: dsp.c
===================================================================
RCS file: /host/queeg.ludd/FreeBSD-mirror/anoncvs/cvs//src/sys/dev/pcm/dsp.c,v
retrieving revision 1.5
diff -c -r1.5 dsp.c
*** dsp.c 1999/09/28 21:43:35 1.5
--- dsp.c 1999/10/17 14:58:18
***************
*** 387,395 ****
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;
break;
case SNDCTL_DSP_SUBDIVIDE:
--- 387,395 ----
case SNDCTL_DSP_SETFMT: /* sets _one_ format */
splx(s);
! 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 & ~AFMT_STEREO) : (rdch->format & ~AFMT_STEREO);
break;
case SNDCTL_DSP_SUBDIVIDE:
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199910171501.RAA00509>
