@@ -97,6 +97,23 @@ static struct note warn_sound[] = {
};
#endif
+#ifdef CONFIG_AUDIBLE_OOPS
+static struct note oops_sound[] = {
+ { 494, 100 },
+ { 698, 100 },
+ { 0, 100 },
+ { 698, 100 },
+ { 698, 133 },
+ { 659, 133 },
+ { 587, 133 },
+ { 523, 100 },
+ { 330, 100 },
+ { 262, 100 },
+ { 330, 100 },
+ { 262, 100 },
+};
+#endif
+
static long no_blink(int state)
{
return 0;
@@ -575,6 +592,7 @@ void oops_exit(void)
do_oops_enter_exit();
print_oops_end_marker();
kmsg_dump(KMSG_DUMP_OOPS);
+ play(oops_sound, ARRAY_SIZE(oops_sound));
}
struct warn_args {
@@ -1017,6 +1017,16 @@ config AUDIBLE_WARN
the system buzzer and not via any soundcard.
Not available on all platforms.
+config AUDIBLE_OOPS
+ bool "Aural oops"
+ select PLAY_LIB
+ default n
+ help
+ If you say Y here, oops will play a sound just
+ after the stacktrace and registers dump. The sound is played via
+ the system buzzer and not via any soundcard.
+ Not available on all platforms.
+
config SCHED_DEBUG
bool "Collect scheduler debugging info"
depends on DEBUG_KERNEL && PROC_FS
Use the new aural error reporting framework when reporting an oops. The sound is emitted at the end of oops_exit(), to avoid interfering with other oops actions, like stack dump. Signed-off-by: Matteo Croce <mcroce@redhat.com> --- kernel/panic.c | 18 ++++++++++++++++++ lib/Kconfig.debug | 10 ++++++++++ 2 files changed, 28 insertions(+)