Re: [patch 1/1] pc-speaker: add SND_SILENT

From: Vojtech Pavlik
Date: Fri Mar 31 2006 - 02:43:05 EST


On Fri, Mar 31, 2006 at 01:07:34AM +0200, Edgar Toernig wrote:
> Vojtech Pavlik wrote:
> >
> > On Tue, Mar 28, 2006 at 08:43:35PM +0200, Bodo Eggert wrote:
> > > On Tue, 28 Mar 2006, Joseph Fannin wrote:
> > >
> > > > I would think the ideal situation would be to make every ALSA
> > > > device capable of acting as the console bell (defaulting to muted,
> > > > like every other ALSA mixer control). Then only pcspkr would be the
> > > > odd case (though maybe a common one).
> > > >
> > > > I dunno if there's a reasonably easy way to do that (without
> > > > changing every ALSA driver) though.
> > >
> > > I think that should be done using a userspace input device if possible.
> >
> > It certainly is. That way configuring the exact sound it makes would
> > also possible. The latency might be a problem, though.
>
> Latency is no problem. I'm using a userspace daemon to emulate
> the console beeper for about 6 months now and it work's very well.
>
> The daemon listens on /dev/input/eventX and when receiving a

It needs to use /dev/input/uinput, not eventX. SND_TONE events are not
sent to the event devices.

> SND_TONE it opens /dev/dspY (a cheap USB-speaker), produces its
> bing and closes the audio dev after some seconds with no SND_TONE.
>
> Latency isn't noticable and memory footprint is small.

It needs to have the sample ready in memory and not swapped out. Then
the latency will be OK, but if it needs to read it in from the disk, it
may be very noticeable.

> Sure, if ALSA could emit console beeps on any audio device even if
> it is in use I would definitely use it and trash the USB-speaker.
> But the userspace daemon is OK...

> PS:
> <rant>
> It would have been even better if Shuttle had connected the beeper
> output of the IT87 to the beeper input of the ALC650 in the first
> place. But no, this thing is totally silent - no piezo beeper, no
> routing to the sound codec, no POST-beeps, nothing.

Pretty common nowadays.

> Why are manufacturers doing such silly things?
> </rant>


--
Vojtech Pavlik
Director SuSE Labs
-
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/