summaryrefslogtreecommitdiffstats
path: root/src/audio_core/adsp/adsp.h
diff options
context:
space:
mode:
authorKelebek1 <eeeedddccc@hotmail.co.uk>2023-08-31 16:09:15 +0200
committerKelebek1 <eeeedddccc@hotmail.co.uk>2023-09-04 18:12:16 +0200
commitebd19dec99d9809a669f63294745d7c8facc6d31 (patch)
treecd1f34cac0c091c2ffd16c429ac33b8fe133e06e /src/audio_core/adsp/adsp.h
parentMerge pull request #11420 from t895/long-install-fix (diff)
downloadyuzu-ebd19dec99d9809a669f63294745d7c8facc6d31.tar
yuzu-ebd19dec99d9809a669f63294745d7c8facc6d31.tar.gz
yuzu-ebd19dec99d9809a669f63294745d7c8facc6d31.tar.bz2
yuzu-ebd19dec99d9809a669f63294745d7c8facc6d31.tar.lz
yuzu-ebd19dec99d9809a669f63294745d7c8facc6d31.tar.xz
yuzu-ebd19dec99d9809a669f63294745d7c8facc6d31.tar.zst
yuzu-ebd19dec99d9809a669f63294745d7c8facc6d31.zip
Diffstat (limited to 'src/audio_core/adsp/adsp.h')
-rw-r--r--src/audio_core/adsp/adsp.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/audio_core/adsp/adsp.h b/src/audio_core/adsp/adsp.h
new file mode 100644
index 000000000..bd5bcc63b
--- /dev/null
+++ b/src/audio_core/adsp/adsp.h
@@ -0,0 +1,50 @@
+// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include "audio_core/adsp/apps/audio_renderer/audio_renderer.h"
+#include "common/common_types.h"
+
+namespace Core {
+class System;
+} // namespace Core
+
+namespace AudioCore {
+namespace Sink {
+class Sink;
+}
+
+namespace ADSP {
+
+/**
+ * Represents the ADSP embedded within the audio sysmodule.
+ * This is a 32-bit Linux4Tegra kernel from nVidia, which is launched with the sysmodule on boot.
+ *
+ * The kernel will run the apps you write for it, Nintendo have the following:
+ *
+ * Gmix - Responsible for mixing final audio and sending it out to hardware. This is last place all
+ * audio samples end up, and we skip it entirely, since we have very different backends and
+ * mixing is implicitly handled by the OS (but also due to lack of research/simplicity).
+ *
+ * AudioRenderer - Receives command lists generated by the audio render
+ * system on the host, processes them, and sends the samples to Gmix.
+ *
+ * OpusDecoder - Contains libopus, and decodes Opus audio packets into raw pcm data.
+ *
+ * Communication between the host and ADSP is done through mailboxes, and mapping of shared memory.
+ */
+class ADSP {
+public:
+ explicit ADSP(Core::System& system, Sink::Sink& sink);
+ ~ADSP() = default;
+
+ AudioRenderer::AudioRenderer& AudioRenderer();
+
+private:
+ /// AudioRenderer app
+ std::unique_ptr<AudioRenderer::AudioRenderer> audio_renderer{};
+};
+
+} // namespace ADSP
+} // namespace AudioCore