mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:27:43 +00:00
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.
This commit is contained in:
parent
e33820b557
commit
ab40cc60d1
1 changed files with 1 additions and 1 deletions
|
@ -181,7 +181,7 @@ void SB16::dma_start(uint32_t length)
|
||||||
{
|
{
|
||||||
const auto addr = m_dma_region->physical_page(0)->paddr().get();
|
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 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
|
// Disable the DMA channel
|
||||||
IO::out8(0xd4, 4 + (channel % 4));
|
IO::out8(0xd4, 4 + (channel % 4));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue