Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Dec 2009 15:07:34 -0800
From:      Gary Kline <kline@thought.org>
To:        Ian Smith <smithi@nimnet.asn.au>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: clicky driver
Message-ID:  <20091226230734.GD47231@thought.org>
In-Reply-To: <20091227001029.N28370@sola.nimnet.asn.au>
References:  <20091226120028.0A8FC10657A0@hub.freebsd.org> <20091227001029.N28370@sola.nimnet.asn.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Dec 27, 2009 at 01:19:49AM +1100, Ian Smith wrote:
> On Fri, 25 Dec 2009 20:23:22 -0800 Gary Kline <kline@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@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


	Thanks!  I just listened to the opening few notes of Star Trek [!]
	But very faint and I don't know if the dinky BEL is a chip or a
	real speaker.  

	Anybody know how I can redirect the beep to my speakers?  I miss
	the confirmation that vi/vim puts out. 
> 
> 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?


	Probably help to be a dog!  --That reminds me of what my parents
	generation were saying about mine [with its loud music].  That we'd
	all be nerve-deaf by age 55.--  Teh computer does beep as an error
	sound.  How adjustable it is other than just beeping, dunno.


> 
> Some laptops use the sound'card' for speaker, and provide a mixer level.

	Should be a way to send the beep to my desktop speakers, then,
	right?  I've got volume and power, treble/bass.


> 
>  > 	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:


	Def !fun, but not rocket science either.  I'll poke around at this
	stuff.
> 
> % find /sys/ -name "speaker*" -o -name "spkr*"


	I've found spkr.c; still there after all these months, :)

	thanks again,

	gary

	PS:  this might be interesting: I just tried to get 

	% xset c 50 

	and

	%  xset on 

	on my Ubuntu Thinkpad.  Zip.   At least here I've got the code!

> 
> cheers, Ian

-- 
 Gary Kline  kline@thought.org  http://www.thought.org  Public Service Unix
        http://jottings.thought.org   http://transfinite.thought.org
    The 7.79a release of Jottings: http://jottings.thought.org/index.php




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091226230734.GD47231>