Subject: admin/17446: cmpci: audioctl -w play.channels=3 distorts or mutes sound
To: None <gnats-bugs@gnats.netbsd.org>
From: None <christianbiere@gmx.de>
List: netbsd-bugs
Date: 06/30/2002 14:09:30
>Number: 17446
>Category: admin
>Synopsis: cmpci: audioctl -w play.channels=3 distorts or mutes sound
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: netbsd-admin
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jun 30 14:10:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Christian Biere
>Release: 1.6A
>Organization:
>Environment:
NetBSD localhost 1.6A NetBSD 1.6A (DURON) #0: Wed Jun 26 19:03:57 CEST 2002
root@localhost:/usr/src/sys/arch/i386/compile/DURON i386
>Description:
If I use an invalid number of channels with audioctl -w play.channels=x the sound becomes distorted or muted. IMO an invalid setting should have no effect at all.
>How-To-Repeat:
Start some audio application. mpg123 or whatever.
$ audioctl -w play.channels=4
audioctl: set failed: Invalid argument
There's no sound anymore.
$ audioctl -w play.channels=2
play.channels: -> 2
There's still no sound. I have to restart the application which uses /dev/audio.
>Fix:
In cmpci.c, I see nothing wrong with this:
switch ( p->channels ) {
case 1:
md_format = CMPCI_REG_FORMAT_MONO;
break;
case 2:
md_format = CMPCI_REG_FORMAT_STEREO;
break;
default:
return (EINVAL);
}
Therefore (if I'm correct), the problem must be elsewhere.
>Release-Note:
>Audit-Trail:
>Unformatted: