1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:07:36 +00:00

Kernel: Don't VERIFY that the DMA channel is running on AC'97 interrupt

Fixes #13771; as discussed it's not really a problem to receive an
interrupt while the DMA channel is not running, but we do want to log
it.
This commit is contained in:
kleines Filmröllchen 2022-06-04 22:29:40 +02:00 committed by Idan Horowitz
parent 2c647da0b5
commit 1b25513ed7
2 changed files with 19 additions and 6 deletions

View file

@ -13,6 +13,7 @@
#include <Kernel/Devices/Audio/Controller.h>
#include <Kernel/Devices/CharacterDevice.h>
#include <Kernel/Interrupts/IRQHandler.h>
#include <Kernel/Locking/SpinlockProtected.h>
namespace Kernel {
@ -129,7 +130,10 @@ private:
{
}
bool dma_running() const { return m_dma_running; }
bool dma_running() const
{
return m_dma_running.with([](auto value) { return value; });
}
void handle_dma_stopped();
StringView name() const { return m_name; }
IOAddress reg(Register reg) const { return m_channel_base.offset(reg); }
@ -140,7 +144,7 @@ private:
private:
IOAddress m_channel_base;
AC97& m_device;
bool m_dma_running { false };
SpinlockProtected<bool> m_dma_running { false };
StringView m_name;
};