Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Sep 2001 00:46:34 +0000
From:      Tony Finch <dot@dotat.at>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   kern/30541: [PATCH] old pccard beep depends on value of HZ
Message-ID:  <E15hKeI-0001aC-00@hand.dotat.at>

next in thread | raw e-mail | index | archive | help


>Number:         30541
>Category:       kern
>Synopsis:       [PATCH] old pccard beep depends on value of HZ
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 12 16:50:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Tony Finch
>Release:        FreeBSD 4.4-RC i386
>Organization:
dotat labs
>Environment:
System: FreeBSD hand.dotat.at 4.4-RC FreeBSD 4.4-RC #4: Sat Sep 1 19:06:27 GMT 2001 fanf@hand.dotat.at:/FreeBSD/obj/FreeBSD/releng4/sys/SHARP i386
>Description:
The timing of pccard event sounds depends on HZ.
>How-To-Repeat:
Change HZ to (say) 1000.
>Fix:

Index: sys/pccard/pccard_beep.c
===================================================================
RCS file: /home/ncvs/src/sys/pccard/pccard_beep.c,v
retrieving revision 1.3.2.3
diff -u -r1.3.2.3 pccard_beep.c
--- sys/pccard/pccard_beep.c	2001/06/05 19:11:34	1.3.2.3
+++ sys/pccard/pccard_beep.c	2001/08/28 22:22:10
@@ -73,8 +73,10 @@
 	melody = (struct tone *)arg;
 
 	if (melody->pitch != 0) {
-		sysbeep(melody->pitch, melody->duration);
-		timeout(pccard_beep_sub, melody + 1, melody->duration);
+		sysbeep(melody->pitch,
+		    melody->duration * hz / 100);
+		timeout(pccard_beep_sub, melody + 1,
+		    melody->duration * hz / 100);
 	} else 
 		allow_beep = BEEP_ON;
 }
@@ -87,8 +89,10 @@
 
 	if (allow_beep == BEEP_ON && melody->pitch != 0) {
 		allow_beep = BEEP_OFF;
-		sysbeep(melody->pitch, melody->duration);
-		timeout(pccard_beep_sub, melody + 1, melody->duration);
+		sysbeep(melody->pitch,
+		    melody->duration * hz / 100);
+		timeout(pccard_beep_sub, melody + 1,
+		    melody->duration * hz / 100);
 	}
 }
 
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E15hKeI-0001aC-00>