NetBSD Problem Report #18033

Received: (qmail 19990 invoked by uid 605); 22 Aug 2002 04:58:32 -0000
Message-Id: <200208220453.g7M4rtj07929@voyager.cimon.com>
Date: Thu, 22 Aug 2002 13:53:56 +0900 (KST)
From: swchung7@hotmail.com
Sender: gnats-bugs-owner@netbsd.org
Reply-To: swchung7@hotmail.com
To: gnats-bugs@gnats.netbsd.org
Subject: Fix to cs4231 sound driver
X-Send-Pr-Version: 3.95

>Number:         18033
>Category:       port-sparc64
>Synopsis:       Fix to volume control problem with cs4231
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    martin
>State:          closed
>Class:          support
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 22 04:59:00 +0000 2002
>Closed-Date:    Thu Aug 22 10:03:19 +0000 2002
>Last-Modified:  Thu Aug 22 10:03:19 +0000 2002
>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:
State-Changed-From-To: open->analyzed 
State-Changed-By: martin 
State-Changed-When: Thu Aug 22 01:49:45 PDT 2002 
State-Changed-Why:  
Will commit this after some minor nits are cleared 
Responsible-Changed-From-To: port-sparc64-maintainer->martin 
Responsible-Changed-By: martin 
Responsible-Changed-When: Thu Aug 22 01:50:48 PDT 2002 
Responsible-Changed-Why:  
I'll handle it. 
State-Changed-From-To: analyzed->closed 
State-Changed-By: martin 
State-Changed-When: Thu Aug 22 03:02:55 PDT 2002 
State-Changed-Why:  
Fix commited, thanks! 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.