Re: howto get a melodic system beep?

From: Jan Engelhardt
Date: Sun Dec 16 2007 - 18:29:22 EST



On Dec 16 2007 23:37, Jan Engelhardt wrote:
>On Dec 16 2007 23:25, Harald Dunkel wrote:
>>
>> Hi folks,
>>
>> Is there a way to replace the system beep by something more
>> melodic?
>>
>> I remember some 10 years ago there was a patch for the kernel
>> to call an external "beep daemon" playing an audio file instead
>> (no kidding). But it never worked very well. Sometimes there
>> was a huge delay, and some programs were not very nice to the
>> system beep.
>>
>> My X-mas wish would be to get an improvement here.

In drivers/input/misc/pcspkr.c, pcspkr_event() in the SND_BELL case,
you could add a reroute so that SND_BELL events are passed to
userspace (think /dev/input/pcspkr). Delays are of course possible,
and it really depends on how the scheduler does its job (read: you
might want to renice your userspace part).
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/