clicky driver
Ian Smith
smithi at nimnet.asn.au
Sat Dec 26 14:19:53 UTC 2009
On Fri, 25 Dec 2009 20:23:22 -0800 Gary Kline <kline at thought.org> wrote:
> On Sat, Dec 26, 2009 at 01:10:45AM +0000, Chris Whitehouse wrote:
> > Gary Kline wrote:
> > >>On Fri, 25 Dec 2009 13:37:13 -0800, Gary Kline <kline at thought.org> wrote:
> > >>> at first I'm lookings for a "cots" (commericial, off-the-shelf)
> > >>> solution. The XO has stereo speakers and so do the notebooks.
> > >>> I am thinking of the 'PC speaker'; something that would sound for
> > >>> around a 25th/second, very low and with at least some loudness
> > >>> control.
> >
> > Hi Gary,
> >
> > someone posted recently about the play-string language for /dev/speaker,
> > see speaker(4). Could you do something with that?
> >
> > btw thanks to whoever posted the play-string code for frere jaques -
> > cracked me up :)
> >
> > Chris
Yeah :) I play little tunelets on certain battery power events, when
some IP gets blacklisted by some logtailing script, things like that.
> Wow; the stuff I've never heard about:-) --I just tried spkrtest
> and have no /dev/speaker.
# kldload speaker
device speaker isn't in kernel GENERIC. If it doesn't work immediately,
try adding speaker_load="YES" to /boot/loader.conf .. this assumes that
your box _has_ a working speaker, eg beeps once while booting?
Some laptops use the sound'card' for speaker, and provide a mixer level.
> The short answer [Guess] is no, I dont think so. If getting the
> keys to have an auditory feedback with beeps or shorter clicks were
> that easy, it would have been done after 15 years. Even Linux
> lacks this--and I'd bet Minux too.
>
> What I've got to do is pick up where I kwit ten years ago with the
> kernel driver code and drop the the code to make the speaker-audio
> create tiny, brief clicks, preferably low, thunky sounds like ye
> ancient IBM Selectrics.
You can do quite a lot with various tempos, intervals and frequencies;
see speaker(4) and play around. Making a short click or thunk! should
be easy enough, but spkrtest and echoing playstrings >/dev/speaker are
userland processes; I've no idea how much 'fun' it would be to invoke
/dev/speaker ioctls from the kbd drivers. But if you're really keen:
% find /sys/ -name "speaker*" -o -name "spkr*"
cheers, Ian
More information about the freebsd-questions
mailing list