Date: Sun, 3 Jan 1999 02:17:24 -0800 (PST) From: runge@rostock.zgdv.de To: freebsd-gnats-submit@FreeBSD.ORG Subject: i386/9283: ioctl(SNDCTL_DSP_SETFMT) on /dev/audio (pcm) returns wrong value when sampling Message-ID: <199901031017.CAA05683@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901031017.CAA05683>
