mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-15 04:47:58 -05:00
DSP: Create backing memory for entire DSP RAM
Also move address space mapping out of video_core.
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <array>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include "audio_core/audio_core.h"
|
||||
@ -10,8 +11,8 @@
|
||||
#include "audio_core/null_sink.h"
|
||||
#include "audio_core/sink.h"
|
||||
#include "audio_core/sink_details.h"
|
||||
#include "common/common_types.h"
|
||||
#include "core/core_timing.h"
|
||||
#include "core/hle/kernel/vm_manager.h"
|
||||
#include "core/hle/service/dsp_dsp.h"
|
||||
|
||||
namespace AudioCore {
|
||||
@ -39,20 +40,8 @@ void Init() {
|
||||
CoreTiming::ScheduleEvent(audio_frame_ticks, tick_event);
|
||||
}
|
||||
|
||||
void AddAddressSpace(Kernel::VMManager& address_space) {
|
||||
auto r0_vma = address_space
|
||||
.MapBackingMemory(DSP::HLE::region0_base,
|
||||
reinterpret_cast<u8*>(&DSP::HLE::g_regions[0]),
|
||||
sizeof(DSP::HLE::SharedMemory), Kernel::MemoryState::IO)
|
||||
.MoveFrom();
|
||||
address_space.Reprotect(r0_vma, Kernel::VMAPermission::ReadWrite);
|
||||
|
||||
auto r1_vma = address_space
|
||||
.MapBackingMemory(DSP::HLE::region1_base,
|
||||
reinterpret_cast<u8*>(&DSP::HLE::g_regions[1]),
|
||||
sizeof(DSP::HLE::SharedMemory), Kernel::MemoryState::IO)
|
||||
.MoveFrom();
|
||||
address_space.Reprotect(r1_vma, Kernel::VMAPermission::ReadWrite);
|
||||
std::array<u8, Memory::DSP_RAM_SIZE>& GetDspMemory() {
|
||||
return DSP::HLE::g_dsp_memory.raw_memory;
|
||||
}
|
||||
|
||||
void SelectSink(std::string sink_id) {
|
||||
|
Reference in New Issue
Block a user