feat: audio stack performance improvements

This commit is contained in:
2026-05-19 18:13:37 +02:00
parent 01ed473471
commit 79284083ca
4 changed files with 86 additions and 15 deletions
+7
View File
@@ -274,6 +274,13 @@ namespace Drivers::Audio::IntelHda {
// Returns number of bytes written (may be less than requested if buffer full).
int Write(int handle, const uint8_t* data, uint32_t size);
// Free bytes in the DMA ring that a caller may write right now.
// Returns 0 if the stream is not active. The mixer uses this to size
// each pump so it never produces more than HDA can accept (otherwise
// surplus mixed data would be silently dropped and the stream readers
// would still advance, scrambling playback).
uint32_t GetWriteSpace(int handle);
// Control commands
constexpr int AUDIO_CTL_SET_VOLUME = 0; // value: 0-100
constexpr int AUDIO_CTL_GET_VOLUME = 1;