From 052a47734f137d0f988c2df1d7749b39efdba1ec Mon Sep 17 00:00:00 2001 From: joevt Date: Tue, 14 Nov 2023 17:20:38 -0800 Subject: [PATCH] macio: Add DMA interrupts. --- devices/ioctrl/grandcentral.cpp | 1 + devices/ioctrl/heathrow.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/devices/ioctrl/grandcentral.cpp b/devices/ioctrl/grandcentral.cpp index 9b525b6..af572c6 100644 --- a/devices/ioctrl/grandcentral.cpp +++ b/devices/ioctrl/grandcentral.cpp @@ -58,6 +58,7 @@ GrandCentral::GrandCentral() : PCIDevice("mac-io/grandcentral"), InterruptCtrl() // initialize sound chip and its DMA output channel, then wire them together this->awacs = std::unique_ptr (new AwacsScreamer()); this->snd_out_dma = std::unique_ptr (new DMAChannel("snd_out")); + this->snd_out_dma->register_dma_int(this, this->register_dma_int(IntSrc::DMA_DAVBUS_Tx)); this->awacs->set_dma_out(this->snd_out_dma.get()); this->snd_out_dma->set_callbacks( std::bind(&AwacsScreamer::dma_out_start, this->awacs.get()), diff --git a/devices/ioctrl/heathrow.cpp b/devices/ioctrl/heathrow.cpp index a821c34..5c08e65 100644 --- a/devices/ioctrl/heathrow.cpp +++ b/devices/ioctrl/heathrow.cpp @@ -70,6 +70,7 @@ HeathrowIC::HeathrowIC() : PCIDevice("mac-io/heathrow"), InterruptCtrl() // then wire everything together this->snd_codec = dynamic_cast(gMachineObj->get_comp_by_type(HWCompType::SND_CODEC)); this->snd_out_dma = std::unique_ptr (new DMAChannel("snd_out")); + this->snd_out_dma->register_dma_int(this, this->register_dma_int(IntSrc::DMA_DAVBUS_Tx)); this->snd_codec->set_dma_out(this->snd_out_dma.get()); this->snd_out_dma->set_callbacks( std::bind(&AwacsScreamer::dma_out_start, this->snd_codec),