summaryrefslogtreecommitdiff
path: root/src/audio_core/adsp/adsp.h
diff options
context:
space:
mode:
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 @@
1// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#pragma once
5
6#include "audio_core/adsp/apps/audio_renderer/audio_renderer.h"
7#include "common/common_types.h"
8
9namespace Core {
10class System;
11} // namespace Core
12
13namespace AudioCore {
14namespace Sink {
15class Sink;
16}
17
18namespace ADSP {
19
20/**
21 * Represents the ADSP embedded within the audio sysmodule.
22 * This is a 32-bit Linux4Tegra kernel from nVidia, which is launched with the sysmodule on boot.
23 *
24 * The kernel will run the apps you write for it, Nintendo have the following:
25 *
26 * Gmix - Responsible for mixing final audio and sending it out to hardware. This is last place all
27 * audio samples end up, and we skip it entirely, since we have very different backends and
28 * mixing is implicitly handled by the OS (but also due to lack of research/simplicity).
29 *
30 * AudioRenderer - Receives command lists generated by the audio render
31 * system on the host, processes them, and sends the samples to Gmix.
32 *
33 * OpusDecoder - Contains libopus, and decodes Opus audio packets into raw pcm data.
34 *
35 * Communication between the host and ADSP is done through mailboxes, and mapping of shared memory.
36 */
37class ADSP {
38public:
39 explicit ADSP(Core::System& system, Sink::Sink& sink);
40 ~ADSP() = default;
41
42 AudioRenderer::AudioRenderer& AudioRenderer();
43
44private:
45 /// AudioRenderer app
46 std::unique_ptr<AudioRenderer::AudioRenderer> audio_renderer{};
47};
48
49} // namespace ADSP
50} // namespace AudioCore