Sun Jul 15 22:22:22 CEST 2018

beep beep m beep beep yeah

Starting with NetBSD-6.0, my ASUS EeePc 1000H netbooks lost their sysbeep(4) console beeps, i.e. those simple speaker beeps you should get when you request an echo ^G on the shell, mistreat vi(1), or shutdown the system and have options BEEP_ONHALT in your kernel.

During the recent pkgsrcCon, I learned that I am not the only one missing the bell. Here are my current findings on this matter.

This bell problem is pretty specific to this platform. The EeePc has a pair of pretty decent speakers hooked to its Intel AC97 audio system. There is no seperate, classic piezo speaker for the beeps.

Here, sysbeep autoconfigures as follows:

pcppi1 at acpi0 (SPKR, PNP0800): io 0x61
sysbeep0 at pcppi1
spkr0 at pcppi1: PC Speaker

The spkr0 (speaker(4), /dev/speaker) allows for simple melodies. It stopped working likewise: echo 'ceg>c' > /dev/speaker will run for the appropriate time (3 seconds) but silently.

NetBSD-7 on an LX series IGEL-Terminal which has just a classic piezo speaker for the beeps and requires external speakers/headphones hooked to the audio0 at auvia0 at pci0 VIA Technologies VT8237 AC'97 Audio card. sysbeep is:

pcppi1 at acpi0 (SPKR, PNP0800): io 0x61
midi0 at pcppi1: PC speaker
sysbeep0 at pcppi1

(And yes, midi0 works, too, in its own charming way. Too bad that spkr0 is not part of the GENERIC kernel...)

If I remember things correctly, NetBSD-5.x on the EeePc would do both "the bell" and the soundcard correctly (e.g., play MP3 files on the audio(4) device).

TDOD-1: I should try to find an 5.x Install CDROM and see how sysbeep used to autoconfigure there.

NetBSD-6.x would operate the audio(4) device if present in the kernel, but that would silence the sysbeep. Without audio, the sysbeep would be OK. A tough decision to make. IIRC, there was the choice to use either azalia(4) or hdaudio(4) as the underlying device driver for audio(4) on the EeePC, and both worked for audio but silenced the sysbeep.

TODO-2: I should hookup a 7-release USB drive to the netbook to see how things work (or fail to work) for that NetBSD version.

NetBSD-8.0 (just tagged) comes with a revised the sound architecture. In particular, it is now possible to configure the speaker(4) to the audio system. From the speaker(4) man page:

options VAUDIOSPEAKER
spkr0   at audio?

The corresponding cvs log entries:

----------------------------
revision 1.1145
date: 2016-12-13 21:42:18 +0100;  author: christos;  state: Exp;  lines: +4 -5;
wildcard speaker attachments, now that we can handle many of them.
----------------------------
revision 1.1144
date: 2016-12-11 00:03:24 +0100;  author: christos;  state: Exp;  lines: +2 -3;
remove VAUDIOSPEAKER for now, will be done differently.
----------------------------
revision 1.1143
date: 2016-12-09 03:24:17 +0100;  author: christos;  state: Exp;  lines: +2 -3;
PCPPISPEAKER
----------------------------
revision 1.1142
date: 2016-12-08 12:31:10 +0100;  author: nat;  state: Exp;  lines: +6 -2;
Add a synthesized pc beeper and keyboard bell for platforms with an audio
device.
----------------------------

The NetBSD-8.0 Release GENERIC kernel config provides just commented spkr lines:

#spkr*  at pcppi?               # PC speaker
#spkr*  at audio?               # PC speaker (synthesized)

Nevertheless, spkr0 autoconfigures to audio0 (and thence to hdafg0 to hdaudio0) and works just great in 8.0, out of the box. I can now hear the echo 'ceg>c' > /dev/speaker C major chord loud and clear.

However, the beeper is still explicitly to pcppi? configured, so we get

sysbeep0 at pcppi1 at acpi0 (SPKR, PNP0800): io 0x61

and that is still silent. Using boot -c into userconf and disabling the pcppi1 at acpi0 gave a sysbeep0 at pcppi0 at isa0 as intended but no bell, either.

The revision 1.1142 commit message suggests a possible audio? attachment, an attempt with an sysbeep0 at audio? proved otherwise, though.

Summary: as of now, no beeps.


Posted by neitzel | Permanent link | File under: done, bsd