diff options
| author | 2016-04-24 10:21:10 +0100 | |
|---|---|---|
| committer | 2016-04-27 06:35:06 +0100 | |
| commit | ff6db69c6052f674265c453932a3dc7637c46412 (patch) | |
| tree | 74f174997c4ee9376a77bbe35ef59fbd3be77237 /src/audio_core | |
| parent | DSP/Pipe: There are 8 pipes (diff) | |
| download | yuzu-ff6db69c6052f674265c453932a3dc7637c46412.tar.gz yuzu-ff6db69c6052f674265c453932a3dc7637c46412.tar.xz yuzu-ff6db69c6052f674265c453932a3dc7637c46412.zip | |
DSP_DSP: Updated interrupt implementation
Diffstat (limited to 'src/audio_core')
| -rw-r--r-- | src/audio_core/audio_core.cpp | 7 | ||||
| -rw-r--r-- | src/audio_core/hle/pipe.cpp | 4 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/audio_core/audio_core.cpp b/src/audio_core/audio_core.cpp index 894f46990..0685eaf85 100644 --- a/src/audio_core/audio_core.cpp +++ b/src/audio_core/audio_core.cpp | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | #include "audio_core/audio_core.h" | 5 | #include "audio_core/audio_core.h" |
| 6 | #include "audio_core/hle/dsp.h" | 6 | #include "audio_core/hle/dsp.h" |
| 7 | #include "audio_core/hle/pipe.h" | ||
| 7 | 8 | ||
| 8 | #include "core/core_timing.h" | 9 | #include "core/core_timing.h" |
| 9 | #include "core/hle/kernel/vm_manager.h" | 10 | #include "core/hle/kernel/vm_manager.h" |
| @@ -17,10 +18,8 @@ static constexpr u64 audio_frame_ticks = 1310252ull; ///< Units: ARM11 cycles | |||
| 17 | 18 | ||
| 18 | static void AudioTickCallback(u64 /*userdata*/, int cycles_late) { | 19 | static void AudioTickCallback(u64 /*userdata*/, int cycles_late) { |
| 19 | if (DSP::HLE::Tick()) { | 20 | if (DSP::HLE::Tick()) { |
| 20 | // HACK: We're not signaling the interrups when they should be, but just firing them all off together. | 21 | // TODO(merry): Signal all the other interrupts as appropriate. |
| 21 | // It should be only (interrupt_id = 2, channel_id = 2) that's signalled here. | 22 | DSP_DSP::SignalPipeInterrupt(DSP::HLE::DspPipe::Audio); |
| 22 | // TODO(merry): Understand when the other interrupts are fired. | ||
| 23 | DSP_DSP::SignalAllInterrupts(); | ||
| 24 | } | 23 | } |
| 25 | 24 | ||
| 26 | // Reschedule recurrent event | 25 | // Reschedule recurrent event |
diff --git a/src/audio_core/hle/pipe.cpp b/src/audio_core/hle/pipe.cpp index 7ec97dfda..03280780f 100644 --- a/src/audio_core/hle/pipe.cpp +++ b/src/audio_core/hle/pipe.cpp | |||
| @@ -12,6 +12,8 @@ | |||
| 12 | #include "common/common_types.h" | 12 | #include "common/common_types.h" |
| 13 | #include "common/logging/log.h" | 13 | #include "common/logging/log.h" |
| 14 | 14 | ||
| 15 | #include "core/hle/service/dsp_dsp.h" | ||
| 16 | |||
| 15 | namespace DSP { | 17 | namespace DSP { |
| 16 | namespace HLE { | 18 | namespace HLE { |
| 17 | 19 | ||
| @@ -97,6 +99,8 @@ static void AudioPipeWriteStructAddresses() { | |||
| 97 | for (u16 addr : struct_addresses) { | 99 | for (u16 addr : struct_addresses) { |
| 98 | WriteU16(DspPipe::Audio, addr); | 100 | WriteU16(DspPipe::Audio, addr); |
| 99 | } | 101 | } |
| 102 | // Signal that we have data on this pipe. | ||
| 103 | DSP_DSP::SignalPipeInterrupt(DspPipe::Audio); | ||
| 100 | } | 104 | } |
| 101 | 105 | ||
| 102 | void PipeWrite(DspPipe pipe_number, const std::vector<u8>& buffer) { | 106 | void PipeWrite(DspPipe pipe_number, const std::vector<u8>& buffer) { |