File tree Expand file tree Collapse file tree 5 files changed +14
-4
lines changed Expand file tree Collapse file tree 5 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 5
5
*/
6
6
7
7
#include < Kernel/Arch/x86/IO.h>
8
- #include < Kernel/Devices /PCSpeaker.h>
8
+ #include < Kernel/Arch/x86/common /PCSpeaker.h>
9
9
#include < Kernel/Time/PIT.h>
10
10
11
11
void PCSpeaker::tone_on (int frequency)
File renamed without changes.
Original file line number Diff line number Diff line change @@ -59,7 +59,6 @@ set(KERNEL_SOURCES
59
59
Devices/MemoryDevice.cpp
60
60
Devices/NullDevice.cpp
61
61
Devices/PCISerialDevice.cpp
62
- Devices/PCSpeaker.cpp
63
62
Devices/RandomDevice.cpp
64
63
Devices/SelfTTYDevice.cpp
65
64
Devices/SerialDevice.cpp
@@ -335,6 +334,7 @@ if ("${SERENITY_ARCH}" STREQUAL "i686" OR "${SERENITY_ARCH}" STREQUAL "x86_64")
335
334
Arch/x86/common/DebugOutput.cpp
336
335
Arch/x86/common/Delay.cpp
337
336
Arch/x86/common/I8042Reboot.cpp
337
+ Arch/x86/common/PCSpeaker.cpp
338
338
Arch/x86/common/RTC.cpp
339
339
Arch/x86/common/ScopedCritical.cpp
340
340
Arch/x86/common/SmapDisabler.cpp
Original file line number Diff line number Diff line change 5
5
*/
6
6
7
7
#include < Kernel/CommandLine.h>
8
- #include < Kernel/Devices/PCSpeaker.h>
8
+ #if ARCH(I386) || ARCH(X86_64)
9
+ # include < Kernel/Arch/x86/common/PCSpeaker.h>
10
+ #endif
9
11
#include < Kernel/Process.h>
10
12
11
13
namespace Kernel {
@@ -15,12 +17,16 @@ ErrorOr<FlatPtr> Process::sys$beep()
15
17
VERIFY_NO_PROCESS_BIG_LOCK (this );
16
18
if (!kernel_command_line ().is_pc_speaker_enabled ())
17
19
return ENODEV;
20
+ #if ARCH(I386) || ARCH(X86_64)
18
21
PCSpeaker::tone_on (440 );
19
22
auto result = Thread::current ()->sleep (Time::from_nanoseconds (200'000'000 ));
20
23
PCSpeaker::tone_off ();
21
24
if (result.was_interrupted ())
22
25
return EINTR;
23
26
return 0 ;
27
+ #else
28
+ return ENOTIMPL;
29
+ #endif
24
30
}
25
31
26
32
}
Original file line number Diff line number Diff line change 8
8
9
9
#include < AK/StdLibExtras.h>
10
10
#include < Kernel/Arch/Delay.h>
11
+ #if ARCH(I386) || ARCH(X86_64)
12
+ # include < Kernel/Arch/x86/common/PCSpeaker.h>
13
+ #endif
11
14
#include < Kernel/CommandLine.h>
12
15
#include < Kernel/Debug.h>
13
16
#include < Kernel/Devices/DeviceManagement.h>
14
17
#include < Kernel/Devices/HID/HIDManagement.h>
15
- #include < Kernel/Devices/PCSpeaker.h>
16
18
#include < Kernel/Graphics/GraphicsManagement.h>
17
19
#include < Kernel/Heap/kmalloc.h>
18
20
#include < Kernel/Sections.h>
@@ -327,9 +329,11 @@ void VirtualConsole::beep()
327
329
{
328
330
if (!kernel_command_line ().is_pc_speaker_enabled ())
329
331
return ;
332
+ #if ARCH(I386) || ARCH(X86_64)
330
333
PCSpeaker::tone_on (440 );
331
334
microseconds_delay (10000 );
332
335
PCSpeaker::tone_off ();
336
+ #endif
333
337
}
334
338
335
339
void VirtualConsole::set_window_title (StringView)
You can’t perform that action at this time.
0 commit comments