nosound module

Ingo Molnar (mingo@pc5829.hil.siemens.at)
Fri, 10 Jan 1997 15:01:56 +0100 (MET)


On Fri, 10 Jan 1997, Hirling Endre wrote:

> I didn't want to go deeper in this topic but I've got many replies
> advising hardware solutions. It would be easy to find out myself, but
> that's not my machine and it would make the owner angry if I open his
> machine. So I'm interested in software solutions only :)

dont know wether some1 has coded this up yet, but this small 1 minute
module should disable >all< beeper sound on the Linux machine. [currently
anyone can change the bell pitch value back to the original one ...]

Just compile it and do 'insmod nosound.o' as root. Sounds should be back
working after 'rmmod nosound'.

modules dont work in 2.1.20, so i havent tested it. Let me know if it
works or not.

-- mingo

-------------------------------------------------------------->
#include <linux/module.h>

extern void (*kd_mksound)(unsigned int hz, unsigned int ticks);
extern void _kd_mksound(unsigned int hz, unsigned int ticks);

static void our_zerosound(unsigned int hz, unsigned int ticks)
{
}

int init_module(void)
{
kd_mksound=our_zerosound;
return 1;
}

void cleanup_module(void)
{
kd_mksound=_kd_mksound;
}