diff options
author | Andreas Kling <kling@serenityos.org> | 2020-05-31 03:38:54 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-31 03:40:58 +0200 |
commit | ab40cc60d1304cba602edf648a2bda79aed1485c (patch) | |
tree | d76925628905ca935c194a4194fff8a2596e78ca /Kernel | |
parent | e33820b557c4370e631f03921b310621c441ab91 (diff) | |
download | serenity-ab40cc60d1304cba602edf648a2bda79aed1485c.zip |
Kernel: Fix glitched audio output in SB16 driver
We were not setting the DMA transfer mode correctly. I have absolutely
no clue how this could ever have worked, but it did work for months
until it suddenly didn't.
Anyways, this fixes that. The sound is still a little bit glitchy and
that could probably be fixed by using the SB16's auto-initialized mode.
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Devices/SB16.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Devices/SB16.cpp b/Kernel/Devices/SB16.cpp index e2966da334..a6d889bf55 100644 --- a/Kernel/Devices/SB16.cpp +++ b/Kernel/Devices/SB16.cpp @@ -181,7 +181,7 @@ void SB16::dma_start(uint32_t length) { const auto addr = m_dma_region->physical_page(0)->paddr().get(); const u8 channel = 5; // 16-bit samples use DMA channel 5 (on the master DMA controller) - const u8 mode = 0; + const u8 mode = 0x48; // Disable the DMA channel IO::out8(0xd4, 4 + (channel % 4)); |