1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:08:12 +00:00

Kernel: Add CommandLine option to disable or enable the PC speaker

By default, we disable the PC speaker as it's quite annoying when using
the text mode console.
This commit is contained in:
Liav A 2022-01-22 12:29:55 +02:00 committed by Linus Groh
parent 8dbbef9b5c
commit 69f054616d
5 changed files with 19 additions and 0 deletions

View file

@ -7,6 +7,7 @@
*/
#include <AK/StdLibExtras.h>
#include <Kernel/CommandLine.h>
#include <Kernel/Debug.h>
#include <Kernel/Devices/DeviceManagement.h>
#include <Kernel/Devices/HID/HIDManagement.h>
@ -321,6 +322,8 @@ void VirtualConsole::flush_dirty_lines()
void VirtualConsole::beep()
{
if (!kernel_command_line().is_pc_speaker_enabled())
return;
PCSpeaker::tone_on(440);
IO::delay(10000);
PCSpeaker::tone_off();