Subject: kern/14819: changing ym /dev/audio encoding is unreliable
To: None <gnats-bugs@gnats.netbsd.org>
From: None <collver@linuxfreemail.com>
List: netbsd-bugs
Date: 12/02/2001 23:17:13
>Number:         14819
>Category:       kern
>Synopsis:       changing ym /dev/audio encoding is unreliable
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 02 23:15:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        NetBSD 1.5.2
>Organization:
>Environment:
System: NetBSD glen 1.5.2 NetBSD 1.5.2 (GLEN) #0: Fri Nov 23 10:42:08 PST 2001 root@glen:/usr/src/sys/arch/i386/compile/GLEN i386


>Description:
	I am using an OPL3-SA3 card with the ym driver.  When I open /dev/audio
	and set the encoding/precision/rate, sometimes the settings don't
	actually take effect.  The ioctl does not return an error, and
	audioctl reports the settings that ought to be in place.  But the
	audio sounds terrible.

	If I use "audioctl -w play=$(audioctl play|cut -d = -f 2)" in the
	middle of incorrect playback, the audio starts playing correctly.

	I discovered this problem when all my SDL applications stopped
	working when I switched from my SoundBlaster to my OPL3-SA3 card.

>How-To-Repeat:
	Code to demonstrate the problem:
		http://amaterasu.math.orst.edu:8080/~sharpej/ym-test.c
		http://amaterasu.math.orst.edu:8080/~sharpej/sine.raw

	on my machine, using ym-test.c:
	example 1 sometimes plays a sine wave, sometimes plays hideous static
	example 2 always plays hideous static
	examples 3 and 4 always play a sine wave

>Fix:
	A workaround is to configure software to use /dev/sound
	instead of /dev/audio
>Release-Note:
>Audit-Trail:
>Unformatted: