Skip to content

Introduce the aural error reporting framework

Matteo Croce linux-sound lkml platform-driver-x86 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4aural error reporting frameworkarch/x86/lib/Makefile arch/x86/lib/play.c include/linux/play.h +1 more+115 -00 replies
2/4panic: use the aural error reporting framework to report panicskernel/panic.c lib/Kconfig.debug+35 -00 replies
3/4bug: use the aural error reporting framework to report warningskernel/panic.c lib/Kconfig.debug+28 -00 replies
4/4oops: use the aural error reporting framework to report oopseskernel/panic.c lib/Kconfig.debug+28 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] Introduce the aural error reporting framework

The Linux kernel has had verbal error reporting since the beginning. Different error conditions trigger different error messages, with different severity: from a simple warning to the most feared kernel panic.

While this detailed error reporting is much helpful to developers or end users, there are some cases in which it's impossible to notice that an error happened.
The most common case is headless devices, such as home servers without an attached display, or routers without an exposed serial port. Needless to say, logging into the machine via SSH is not an option after such a severe error.
In other cases the monitor might be attached, but the system is unable to display the error, probably because there is an X server running and the KMS switch fails. Or simply the user is visually impaired.

These are all cases when the aural errors framework comes to help. This framework adds to the kernel a generic library to play sounds, which can be used to report errors or generic events.

As the sound card driver could, and most probably will, become unusable during a kernel crash, the sounds are played via the system buzzer which has been around since the dawn of time.
The buzzer driver is simple, requires just a few register writes to work, the hardware is extremely cheap and is already present on most machines.

The first patch introduces the framework functions, the other three make use of it in, respectively, kernel panic, warning and oops. The last patch, not to be merged, creates a procfs handler useful to test the error reporting.

Matteo Croce (4):
aural error reporting framework
panic: use the aural error reporting framework to report panics
bug: use the aural error reporting framework to report warnings
oops: use the aural error reporting framework to report oopses

 arch/x86/lib/Makefile |  1 +
 arch/x86/lib/play.c   | 75 +++++++++++++++++++++++++++++++++++++++++++
 include/linux/play.h  | 34 ++++++++++++++++++++
 kernel/panic.c        | 61 +++++++++++++++++++++++++++++++++++
 lib/Kconfig.debug     | 35 ++++++++++++++++++++
 5 files changed, 206 insertions(+)
 create mode 100644 arch/x86/lib/play.c
 create mode 100644 include/linux/play.h
Signature · 1 line
2.20.1