From owner-freebsd-bugs Sun Jan 3 02:20:09 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA06026 for freebsd-bugs-outgoing; Sun, 3 Jan 1999 02:20:09 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA06018 for ; Sun, 3 Jan 1999 02:20:07 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id CAA20635; Sun, 3 Jan 1999 02:20:01 -0800 (PST) Received: (from nobody@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA05683; Sun, 3 Jan 1999 02:17:24 -0800 (PST) (envelope-from nobody) Message-Id: <199901031017.CAA05683@hub.freebsd.org> Date: Sun, 3 Jan 1999 02:17:24 -0800 (PST) From: runge@rostock.zgdv.de To: freebsd-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: www-1.0 Subject: i386/9283: ioctl(SNDCTL_DSP_SETFMT) on /dev/audio (pcm) returns wrong value when sampling Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 9283 >Category: i386 >Synopsis: ioctl(SNDCTL_DSP_SETFMT) on /dev/audio (pcm) returns wrong value when sampling >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Jan 3 02:20:00 PST 1999 >Last-Modified: >Originator: Thomas Runge >Organization: >Release: 3.0 RELEASE >Environment: FreeBSD fietje 3.0-RELEASE FreeBSD 3.0-RELEASE #15: Sat Jan 2 17:28:59 CET 1999 coto@fietje:/usr/src/sys/compile/FIETJE i386 >Description: if you configure the audio device (luigis pcm driver) for sampling and set the format via SNDCTL_DSP_SETFMT, the driver returns the wrong format, even if it's set to the right value. This bug even can be found in -current, guessing, it's in all previous versions as well. >How-To-Repeat: open device read-only and try changing the sample format. Check the return value and compare to input. >Fix: in /usr/src/sys/i386/isa/snd/sound.c change this: if (ask_init(d)) *(int *)arg = d->play_fmt ; in line 992 (source of 3.0 RELEASE) to: if (ask_init(d)) { if (d->play_fmt) *(int *)arg = d->play_fmt ; if (d->rec_fmt) *(int *)arg = d->rec_fmt ; } >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message