lkml.org 
[lkml]   [1997]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectGive X11 a Voice PATCH for 2.1.49
On Wed, 13 Aug 1997, Bob Tracy - TDS wrote:

> The PCMCIA cardmgr utility no longer generates beeps as of 2.1.49.
> Something in the last patch set seems to have affected
> ioctl(fd, KDMKTONE, arg). A quick check of the return value from
> ioctl() doesn't indicate any errors occurring.

The following little fix will give Your's X11 session a voice back, and of
course the above mentioned PCMCIA cardmgr too:-). Some grepping in the
XFree server sources and, after localization of the ioctrl in effect, in
the kernel sources revealed that this got lost somehow during the recent
patches.

BTW. Why did somebody feel the innocent need to remove it in some of the
recent kernels? Na na na....

diff -urN linux-2.1.49-orig/drivers/char/vt.c linux-2.1.49-patched/drivers/char/vt.c
--- linux-2.1.49-orig/drivers/char/vt.c Wed Aug 13 18:11:31 1997
+++ linux-2.1.49-patched/drivers/char/vt.c Wed Aug 13 18:57:12 1997
@@ -504,7 +504,8 @@
* If the time is zero, turn off sound ourselves.
*/
ticks = HZ * ((arg >> 16) & 0xffff) / 1000;
- count = ticks ? arg : 0;
+ if ((arg & 0xffff) == 0 ) arg |= 1;
+ count = ticks ? (1193180 / (arg & 0xffff)) : 0;
kd_mksound(count, ticks);
return 0;
}
Marcin
====================================================================
Langunages: Polish, German, English (in THAT order of precedence).
Homepage: http://sub994.sub.uni-goettingen.de
http://sub994.sub.uni-goettingen.de/polish.html

\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.030 / U:0.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site