AudioCore: Refactor DSP interrupt handling (#7026)

This commit is contained in:
SachinVin 2023-10-04 19:14:59 +05:30 committed by GitHub
parent 0ce956ba00
commit 72ff0c5337
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 61 additions and 97 deletions

View file

@ -14,7 +14,7 @@
#include "core/memory.h"
namespace Service::DSP {
class DSP_DSP;
enum class InterruptType : u32;
} // namespace Service::DSP
namespace AudioCore {
@ -85,8 +85,9 @@ public:
/// Returns a reference to the array backing DSP memory
virtual std::array<u8, Memory::DSP_RAM_SIZE>& GetDspMemory() = 0;
/// Sets the dsp class that we trigger interrupts for
virtual void SetServiceToInterrupt(std::weak_ptr<Service::DSP::DSP_DSP> dsp) = 0;
/// Sets the handler for the interrupts we trigger
virtual void SetInterruptHandler(
std::function<void(Service::DSP::InterruptType type, DspPipe pipe)> handler) = 0;
/// Loads the DSP program
virtual void LoadComponent(std::span<const u8> buffer) = 0;