Subject: port-sparc64/18033: Fix to cs4231 sound driver
To: None <gnats-bugs@gnats.netbsd.org>
From: None <swchung7@hotmail.com>
List: netbsd-bugs
Date: 08/22/2002 13:53:56
>Number: 18033
>Category: port-sparc64
>Synopsis: Fix to volume control problem with cs4231
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: port-sparc64-maintainer
>State: open
>Class: support
>Submitter-Id: net
>Arrival-Date: Wed Aug 21 21:59:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Sung-Won Chung
>Release: NetBSD 1.6F (got from CVS at 16 Aug, 2002)
>Organization:
ECE, Pusan National University
>Environment:
System: NetBSD ultra1 1.6F NetBSD 1.6F (KERNEL) #17: Mon Aug 19 18:22:34 UTC 2002 cimon@ultra1:/home/cimon/kernel/sys/arch/sparc64/compile/KERNEL sparc64
Architecture: sparc64
Machine: sparc64
>Description:
Audio play program cannot control the speaker volume
on Ultra 1 using cs4231 driver.
>How-To-Repeat:
play mp3 file with mpg321 or amp with varying volume.
>Fix:
The reason was that cs4231 driver didn't register
audioNmaster, so user-level ioctl() to control volume
without specifiying index was ignored by
general audio driver.
This patch solved the problem. I tested with mpg321.
Index: cs4231.c
===================================================================
RCS file: /usr/local/cvsroot/nunbora/src/syssrc/sys/dev/ic/cs4231.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 cs4231.c
--- cs4231.c 2002/08/16 14:50:45 1.1.1.1
+++ cs4231.c 2002/08/22 04:31:56
@@ -542,7 +542,7 @@
dip->type = AUDIO_MIXER_VALUE;
dip->mixer_class = CSAUDIO_MONITOR_CLASS;
dip->prev = dip->next = AUDIO_MIXER_LAST;
- strcpy(dip->label.name, AudioNoutput);
+ strcpy(dip->label.name, AudioNmaster);
dip->un.v.num_channels = 2;
strcpy(dip->un.v.units.name, AudioNvolume);
break;
>Release-Note:
>Audit-Trail:
>Unformatted: