-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ES8388 vendor & Add I2S Bus driver #14
Conversation
Nice! Can we use the FixedDMA macro instead of encoding these properties into _DSD? The info can be then read from CmResourceTypeDma's fields: https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/ns-wdm-_cm_partial_resource_descriptor First resource could be for TX, the other one for RX. |
RtlZeroMemory(&inputBuffer, sizeof(inputBuffer)); | ||
|
||
inputBuffer.Signature = ACPI_EVAL_INPUT_BUFFER_SIGNATURE_EX; | ||
status = RtlStringCchPrintfA( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since there aren't any format inserts in "_DSD"
, and since you're using sizeof
for the buffer size, Consider RtlStringCbCopyA
.
As a matter of taste, since RtlStringCbCopyA
fails in a generally-safe mode (it truncates the copy and nul-terminates the output buffer), I tend to feel it's ok to ignore the return code from it. The only way it can fail is if you passed invalid parameters (which you don't), and it fails in a safe way even if you do (truncates the output), so checking the result doesn't do much good and just makes the code longer.
{ | ||
UNREFERENCED_PARAMETER(ResourcesRaw); | ||
|
||
BOOLEAN fMmioFound = FALSE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant - this is tracked by fdoCtx->m_MMIO.Base.Base == NULL
|
||
WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(PDO_DEVICE_DATA, PdoGetData) | ||
|
||
extern "C" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think these really need to be extern "C".
Just tried using FixedDMA in _CRS, and it causes the device to Code 12 since we don't implement a HalExt (and probably can't since we need a cyclic DMA buffer for audio) |
Add I2S Bus driver that will be used by the WDM audio driver to read ACPI properties
Supported properties: