From adf2ae2ac912230f5f885d1eae8446c4bcca36c9 Mon Sep 17 00:00:00 2001 From: booto Date: Wed, 13 Aug 2014 00:20:13 +0800 Subject: [PATCH] DSP: Add minor delay to initial AIDMA interrupt When AIDMA begins, the first thing it does is load the source address and length into internal registers. It then triggers the AID interrupt. Some begin the AIDMA process without all the data necessary for the interrupt callback being set up already - they require a few more cycles to set it up (the delay between the DMA being set to begin and the interrupt firing). The value of this delay was approximated by tests on real hardware. --- Source/Core/Core/HW/DSP.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Source/Core/Core/HW/DSP.cpp b/Source/Core/Core/HW/DSP.cpp index 01dce2e1b3..381b4203da 100644 --- a/Source/Core/Core/HW/DSP.cpp +++ b/Source/Core/Core/HW/DSP.cpp @@ -406,8 +406,7 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base) // We make the samples ready as soon as possible void *address = Memory::GetPointer(g_audioDMA.SourceAddress); AudioCommon::SendAIBuffer((short*)address, g_audioDMA.AudioDMAControl.NumBlocks * 8); - - GenerateDSPInterrupt(DSP::INT_AID); + CoreTiming::ScheduleEvent_Threadsafe(80, et_GenerateDSPInterrupt, INT_AID | (1 << 16)); } }) );