summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/CMakeLists.txt2
-rw-r--r--src/core/hle/service/audio/audio.cpp2
-rw-r--r--src/core/hle/service/audio/hwopus.cpp29
-rw-r--r--src/core/hle/service/audio/hwopus.h20
4 files changed, 53 insertions, 0 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 51e4088d2..3dff068df 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -126,6 +126,8 @@ add_library(core STATIC
126 hle/service/audio/audren_u.h 126 hle/service/audio/audren_u.h
127 hle/service/audio/codecctl.cpp 127 hle/service/audio/codecctl.cpp
128 hle/service/audio/codecctl.h 128 hle/service/audio/codecctl.h
129 hle/service/audio/hwopus.cpp
130 hle/service/audio/hwopus.h
129 hle/service/bcat/module.cpp 131 hle/service/bcat/module.cpp
130 hle/service/bcat/module.h 132 hle/service/bcat/module.h
131 hle/service/bcat/bcat.cpp 133 hle/service/bcat/bcat.cpp
diff --git a/src/core/hle/service/audio/audio.cpp b/src/core/hle/service/audio/audio.cpp
index 92f910b5f..d231e91e1 100644
--- a/src/core/hle/service/audio/audio.cpp
+++ b/src/core/hle/service/audio/audio.cpp
@@ -8,6 +8,7 @@
8#include "core/hle/service/audio/audrec_u.h" 8#include "core/hle/service/audio/audrec_u.h"
9#include "core/hle/service/audio/audren_u.h" 9#include "core/hle/service/audio/audren_u.h"
10#include "core/hle/service/audio/codecctl.h" 10#include "core/hle/service/audio/codecctl.h"
11#include "core/hle/service/audio/hwopus.h"
11 12
12namespace Service::Audio { 13namespace Service::Audio {
13 14
@@ -17,6 +18,7 @@ void InstallInterfaces(SM::ServiceManager& service_manager) {
17 std::make_shared<AudRecU>()->InstallAsService(service_manager); 18 std::make_shared<AudRecU>()->InstallAsService(service_manager);
18 std::make_shared<AudRenU>()->InstallAsService(service_manager); 19 std::make_shared<AudRenU>()->InstallAsService(service_manager);
19 std::make_shared<CodecCtl>()->InstallAsService(service_manager); 20 std::make_shared<CodecCtl>()->InstallAsService(service_manager);
21 std::make_shared<HwOpus>()->InstallAsService(service_manager);
20} 22}
21 23
22} // namespace Service::Audio 24} // namespace Service::Audio
diff --git a/src/core/hle/service/audio/hwopus.cpp b/src/core/hle/service/audio/hwopus.cpp
new file mode 100644
index 000000000..7790359e9
--- /dev/null
+++ b/src/core/hle/service/audio/hwopus.cpp
@@ -0,0 +1,29 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include "common/logging/log.h"
6#include "core/hle/ipc_helpers.h"
7#include "core/hle/kernel/hle_ipc.h"
8#include "core/hle/service/audio/hwopus.h"
9
10namespace Service::Audio {
11
12void HwOpus::GetWorkBufferSize(Kernel::HLERequestContext& ctx) {
13 NGLOG_WARNING(Service_Audio, "(STUBBED) called");
14 IPC::ResponseBuilder rb{ctx, 3};
15 rb.Push(RESULT_SUCCESS);
16 rb.Push<u32>(0x4000);
17}
18
19HwOpus::HwOpus() : ServiceFramework("hwopus") {
20 static const FunctionInfo functions[] = {
21 {0, nullptr, "Initialize"},
22 {1, &HwOpus::GetWorkBufferSize, "GetWorkBufferSize"},
23 {2, nullptr, "InitializeMultiStream"},
24 {3, nullptr, "GetWorkBufferSizeMultiStream"},
25 };
26 RegisterHandlers(functions);
27}
28
29} // namespace Service::Audio
diff --git a/src/core/hle/service/audio/hwopus.h b/src/core/hle/service/audio/hwopus.h
new file mode 100644
index 000000000..090b8c825
--- /dev/null
+++ b/src/core/hle/service/audio/hwopus.h
@@ -0,0 +1,20 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include "core/hle/service/service.h"
8
9namespace Service::Audio {
10
11class HwOpus final : public ServiceFramework<HwOpus> {
12public:
13 explicit HwOpus();
14 ~HwOpus() = default;
15
16private:
17 void GetWorkBufferSize(Kernel::HLERequestContext& ctx);
18};
19
20} // namespace Service::Audio