mirror of
https://github.com/reactos/reactos.git
synced 2026-05-31 08:17:09 +08:00
[HDAUDBUS_NEW] Enable building the driver
- Add CMakeLists.txt. - Fix GCC and MSVC builds. CORE-15350, CORE-18776
This commit is contained in:
@@ -3,6 +3,6 @@ add_subdirectory(backpln)
|
||||
add_subdirectory(drivers)
|
||||
add_subdirectory(drm)
|
||||
add_subdirectory(filters)
|
||||
add_subdirectory(hdaudbus)
|
||||
add_subdirectory(hdaudbus_new)
|
||||
add_subdirectory(legacy)
|
||||
add_subdirectory(sysaudio)
|
||||
|
||||
24
drivers/wdm/audio/hdaudbus_new/CMakeLists.txt
Normal file
24
drivers/wdm/audio/hdaudbus_new/CMakeLists.txt
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
remove_definitions(-D_WIN32_WINNT=0x502)
|
||||
|
||||
list(APPEND SOURCE
|
||||
adsp.cpp
|
||||
buspdo.cpp
|
||||
fdo.cpp
|
||||
hdac_controller.cpp
|
||||
hdac_stream.cpp
|
||||
hdaudio.cpp
|
||||
nhlt.cpp
|
||||
sgpc.cpp
|
||||
sklhdaudbus.cpp
|
||||
sof-tplg.cpp)
|
||||
|
||||
add_library(hdaudbus MODULE ${SOURCE})
|
||||
set_module_type(hdaudbus kmdfdriver)
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||
target_compile_options(hdaudbus PRIVATE -Wno-write-strings)
|
||||
endif()
|
||||
target_link_libraries(hdaudbus ntoskrnl_vista libcntpr ${PSEH_LIB})
|
||||
add_importlibs(hdaudbus wdfldr ntoskrnl hal)
|
||||
add_cd_file(TARGET hdaudbus DESTINATION reactos/system32/drivers FOR all)
|
||||
add_driver_inf(hdaudbus hdaudbus.inf)
|
||||
@@ -23,7 +23,7 @@ extern "C" {
|
||||
|
||||
#include <wdm.h>
|
||||
#include <wdmguid.h>
|
||||
#include <wdf.h>
|
||||
#include "wdf.h"
|
||||
#include <ntintsafe.h>
|
||||
#include <ntstrsafe.h>
|
||||
#include <hdaudio.h>
|
||||
@@ -36,7 +36,11 @@ extern "C" {
|
||||
#include "hdac_stream.h"
|
||||
#include "hda_verbs.h"
|
||||
|
||||
#ifdef __REACTOS__
|
||||
#define DRIVERNAME "hdaudbus.sys: "
|
||||
#else
|
||||
#define DRIVERNAME "sklhdaudbus.sys: "
|
||||
#endif
|
||||
#define SKLHDAUDBUS_POOL_TAG 'SADH'
|
||||
|
||||
#define VEN_INTEL 0x8086
|
||||
@@ -47,6 +51,12 @@ extern "C" {
|
||||
|
||||
#include "regfuncs.h"
|
||||
|
||||
#ifdef __REACTOS__
|
||||
#define MAXUINT64 ((UINT64)UINT64_MAX)
|
||||
#define MAXULONG64 ((ULONG64)ULONG64_MAX)
|
||||
#define MAXULONG32 ((ULONG32)ULONG_MAX)
|
||||
#endif
|
||||
|
||||
NTSTATUS HDA_WaitForTransfer(
|
||||
PFDO_CONTEXT fdoCtx,
|
||||
UINT16 codecAddr,
|
||||
|
||||
@@ -40,7 +40,10 @@ __in PUNICODE_STRING RegistryPath
|
||||
// Default to NonPagedPoolNx for non paged pool allocations where supported.
|
||||
//
|
||||
|
||||
#ifndef __REACTOS__
|
||||
// FIXME: disabled for now, since it's unimplemented in ReactOS
|
||||
ExInitializeDriverRuntime(DrvRtPoolNxOptIn);
|
||||
#endif
|
||||
|
||||
WDF_DRIVER_CONFIG_INIT(&config, SklHdAudBusEvtDeviceAdd);
|
||||
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
#define SOFTPLG_MAGIC '$SOF'
|
||||
|
||||
#ifdef __REACTOS__
|
||||
// Downgrade unsupported NT6.2+ features.
|
||||
#define NonPagedPoolNx NonPagedPool
|
||||
#define NonPagedPoolNxCacheAligned NonPagedPoolCacheAligned
|
||||
#endif
|
||||
|
||||
typedef struct _SOF_TPLG {
|
||||
UINT32 magic;
|
||||
UINT32 length;
|
||||
|
||||
Reference in New Issue
Block a user