Subject: kern/14206: cmpci doesn't like mixerctl -w inputs.pc_speaker
To: None <gnats-bugs@gnats.netbsd.org>
From: Stephen Ma <stephenm@employees.org>
List: netbsd-bugs
Date: 10/09/2001 21:59:47
>Number:         14206
>Category:       kern
>Synopsis:       cmpci doesn't like mixerctl -w inputs.pc_speaker
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 09 22:00:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Stephen Ma
>Release:        NetBSD-current 20011005
>Organization:
	People's Front for the correct spelling of the word "Organisation"
>Environment:
System: NetBSD khemlani 1.5Y NetBSD 1.5Y (KHEMLANI) #70: Fri Oct 5 23:33:39 PDT 2001 stephenm@khemlani:/usr/src/sys/arch/i386/compile/KHEMLANI i386
Architecture: i386
Machine: i386

[...]
cmpci0 at pci0 dev 5 function 0: C-Media Electronics Inc CMI8738/C3DX
PCI Audio Device (rev. 0x10)
cmpci0: interrupting at irq 10
audio0 at cmpci0: full duplex, mmap, independent
[...]

>Description:
	mixerctl -w inputs.pc_speaker=0 returns "invalid format.", rather
than setting the speaker input gain to 0. Only happens for cmpci audio
devices. Works fine on ess audio.
>How-To-Repeat:
	mixerctl -w inputs.pc_speaker=0
>Fix:
--- /v1/netbsd/src/sys/dev/pci/cmpci.c	Wed Oct  3 04:28:14 2001
+++ cmpci.c	Mon Oct  8 22:07:45 2001
@@ -1675,12 +1675,12 @@
 	switch (cp->dev) {
 	case CMPCI_MIC_VOL:
 	case CMPCI_LINE_IN_VOL:
+	case CMPCI_PCSPEAKER:
 		if (cp->un.value.num_channels != 1)
 			return EINVAL;
 		/* fall into */
 	case CMPCI_TREBLE:
 	case CMPCI_BASS:
-	case CMPCI_PCSPEAKER:
 	case CMPCI_INPUT_GAIN:
 	case CMPCI_OUTPUT_GAIN:
 	case CMPCI_VOICE_VOL:

>Release-Note:
>Audit-Trail:
>Unformatted: