diff options
Diffstat (limited to 'src/audio_core/adsp/adsp.h')
| -rw-r--r-- | src/audio_core/adsp/adsp.h | 50 |
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 | |||
| 9 | namespace Core { | ||
| 10 | class System; | ||
| 11 | } // namespace Core | ||
| 12 | |||
| 13 | namespace AudioCore { | ||
| 14 | namespace Sink { | ||
| 15 | class Sink; | ||
| 16 | } | ||
| 17 | |||
| 18 | namespace 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 | */ | ||
| 37 | class ADSP { | ||
| 38 | public: | ||
| 39 | explicit ADSP(Core::System& system, Sink::Sink& sink); | ||
| 40 | ~ADSP() = default; | ||
| 41 | |||
| 42 | AudioRenderer::AudioRenderer& AudioRenderer(); | ||
| 43 | |||
| 44 | private: | ||
| 45 | /// AudioRenderer app | ||
| 46 | std::unique_ptr<AudioRenderer::AudioRenderer> audio_renderer{}; | ||
| 47 | }; | ||
| 48 | |||
| 49 | } // namespace ADSP | ||
| 50 | } // namespace AudioCore | ||