clean up and standardize types across the codebase, unify atomic operations, improve UTF-8 handling throughout the system, remove obsolete input and named queue interfaces, redesign process preparation and creation, tighten IPC and service boundaries, improve error handling and reliability, minor documentation cleanup, fix doom surfaces, fix panic in ini parsing.
This commit is contained in:
1 parent
899225f551
commit
c0ad63c27f
226 files changed
+6562
-4147
No files matched your search
@@ -207,8 +207,8 @@ typedef struct HDA_OUTPUT_STREAM {
|
||||
uint8_t NextCompletionBdl;
|
||||
bool Prepared;
|
||||
bool Running;
|
||||
volatile long PendingPeriodInterrupts;
|
||||
volatile long PendingDmaErrors;
|
||||
volatile int32_t PendingPeriodInterrupts;
|
||||
volatile int32_t PendingDmaErrors;
|
||||
HDA_OUTPUT_RING Rings[HDA_MAX_LOGICAL_ENDPOINTS];
|
||||
uint8_t ActiveRingIndex;
|
||||
IO_DMA_BUFFER* BdlDma;
|
||||
@@ -249,8 +249,8 @@ struct HDA_CONTROLLER {
|
||||
bool SurpriseRemoved;
|
||||
SPINLOCK StateLock;
|
||||
KDPC Dpc;
|
||||
volatile long IsrActive;
|
||||
volatile long DpcActive;
|
||||
volatile int32_t IsrActive;
|
||||
volatile int32_t DpcActive;
|
||||
IO_DMA_ADAPTER* DmaAdapter;
|
||||
IO_DMA_BUFFER* CorbDma;
|
||||
IO_DMA_BUFFER* RirbDma;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// Generic Intel HDA codec discovery and analog render routing.
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "hda.h"
|
||||
|
||||
#include <limits.h>
|
||||
@@ -211,9 +212,9 @@ struct HDA_CODEC_STATE {
|
||||
EVENT* PollFinished;
|
||||
THREAD* WorkThread;
|
||||
THREAD* PollThread;
|
||||
volatile long WorkRunning;
|
||||
volatile long PollRunning;
|
||||
volatile long ShuttingDown;
|
||||
volatile int32_t WorkRunning;
|
||||
volatile int32_t PollRunning;
|
||||
volatile int32_t ShuttingDown;
|
||||
uint64_t PendingUnsolicitedTags;
|
||||
bool PollRequested;
|
||||
bool HavePollingPins;
|
||||
@@ -1586,7 +1587,7 @@ static void HdaCodecEndpointStop(void* providerContext) {
|
||||
// Stores or applies one endpoint hardware gain and mute request.
|
||||
static KSTATUS HdaCodecEndpointSetGain(void* providerContext,
|
||||
int32_t gainMilliDb,
|
||||
uint8_t muted) {
|
||||
bool muted) {
|
||||
HDA_LOGICAL_ENDPOINT* endpoint = (HDA_LOGICAL_ENDPOINT*)providerContext;
|
||||
if (!endpoint || !endpoint->State || !endpoint->HasHardwareGain)
|
||||
return NTLSTATUS_INVALID_PARAMETER;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// Intel High Definition Audio controller transport, command rings, output DMA, and recovery.
|
||||
|
||||
#include <ntlite/atomic.h>
|
||||
#include <stdbool.h>
|
||||
#include "hda.h"
|
||||
|
||||
#include <intrin.h>
|
||||
@@ -1079,7 +1081,7 @@ uint64_t HdaQueryOutputPositionFrames(HDA_CONTROLLER* controller) {
|
||||
void HdaHandleInterrupt(HDA_CONTROLLER* controller) {
|
||||
if (!controller)
|
||||
return;
|
||||
_InterlockedIncrement(&controller->IsrActive);
|
||||
NtlAtomicIncrement32(&controller->IsrActive);
|
||||
if (!controller->Started || controller->Removed || controller->SurpriseRemoved)
|
||||
goto finished;
|
||||
|
||||
@@ -1137,7 +1139,7 @@ void HdaHandleInterrupt(HDA_CONTROLLER* controller) {
|
||||
(void)KeInsertQueueDpc(&controller->Dpc, (void*)0, (void*)0);
|
||||
|
||||
finished:
|
||||
_InterlockedDecrement(&controller->IsrActive);
|
||||
NtlAtomicDecrement32(&controller->IsrActive);
|
||||
}
|
||||
|
||||
// Promotes an error to stream or controller recovery using the one-second threshold.
|
||||
@@ -1166,7 +1168,7 @@ void HdaDpcRoutine(KDPC* dpc, void* context, void* systemArgument1, void* system
|
||||
HDA_CONTROLLER* controller = (HDA_CONTROLLER*)context;
|
||||
if (!controller)
|
||||
return;
|
||||
_InterlockedIncrement(&controller->DpcActive);
|
||||
NtlAtomicIncrement32(&controller->DpcActive);
|
||||
if (controller->Removed || controller->SurpriseRemoved)
|
||||
goto finished;
|
||||
|
||||
@@ -1253,7 +1255,7 @@ void HdaDpcRoutine(KDPC* dpc, void* context, void* systemArgument1, void* system
|
||||
}
|
||||
|
||||
finished:
|
||||
_InterlockedDecrement(&controller->DpcActive);
|
||||
NtlAtomicDecrement32(&controller->DpcActive);
|
||||
}
|
||||
|
||||
// Recovers one isolated stream error without disturbing the codec topology.
|
||||
|
||||
Reference in new issue
Block a user