Subject: admin/17446: cmpci: audioctl -w play.channels=3 distorts or mutes sound
To: None <>
From: None <>
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
>Originator:     Christian Biere
>Release:        1.6A
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
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.
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.
In cmpci.c, I see nothing wrong with this:

  switch ( p->channels ) {
  case 1:
   md_format = CMPCI_REG_FORMAT_MONO;
  case 2:
   return (EINVAL); 

Therefore (if I'm correct), the problem must be elsewhere.