├── HDA.def ├── gitignore ├── HDA.aps ├── hda.ncb ├── hda.opt ├── hdadrv.aps ├── objchk └── i386 │ ├── HDA.pdb │ ├── HDA.sys │ ├── hda.res │ ├── adapter.obj │ ├── common.obj │ ├── ichwave.obj │ ├── mintopo.obj │ ├── minwave.obj │ ├── echo.msg │ ├── cl.rsp │ └── HDA.map ├── objfre └── i386 │ ├── HDA.pdb │ ├── HDA.sys │ ├── hda.res │ ├── adapter.obj │ ├── common.obj │ ├── mintopo.obj │ ├── minwave.obj │ ├── echo.msg │ ├── cl.rsp │ └── HDA.map ├── HDA.rc ├── sources ├── hda.dsw ├── hdadrv.rc ├── BUILD INSTRUCTIONS.txt ├── makefile ├── obj └── _objects.mac ├── LICENSE.txt ├── LICENSE ├── BleskOS Sound Driver ├── pc_speaker.h ├── include.c ├── include.h ├── pc_speaker.c ├── main.h ├── ac97.h ├── hda.h ├── main.c └── ac97.c ├── README.md ├── hda.plg ├── debug.h ├── readme.htm ├── CHANGELOG.txt ├── hda.dsp ├── mintopo.h ├── minwave.h ├── hdaudio.h ├── common.h ├── HDA.inf └── tables.h /HDA.def: -------------------------------------------------------------------------------- 1 | LIBRARY HDA.sys 2 | 3 | -------------------------------------------------------------------------------- /gitignore: -------------------------------------------------------------------------------- 1 | buildchk.* 2 | buildfre.* 3 | -------------------------------------------------------------------------------- /HDA.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrew-hoffman/WDMHDA/HEAD/HDA.aps -------------------------------------------------------------------------------- /hda.ncb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrew-hoffman/WDMHDA/HEAD/hda.ncb -------------------------------------------------------------------------------- /hda.opt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrew-hoffman/WDMHDA/HEAD/hda.opt -------------------------------------------------------------------------------- /hdadrv.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrew-hoffman/WDMHDA/HEAD/hdadrv.aps -------------------------------------------------------------------------------- /objchk/i386/HDA.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrew-hoffman/WDMHDA/HEAD/objchk/i386/HDA.pdb -------------------------------------------------------------------------------- /objchk/i386/HDA.sys: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrew-hoffman/WDMHDA/HEAD/objchk/i386/HDA.sys -------------------------------------------------------------------------------- /objchk/i386/hda.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrew-hoffman/WDMHDA/HEAD/objchk/i386/hda.res -------------------------------------------------------------------------------- /objfre/i386/HDA.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrew-hoffman/WDMHDA/HEAD/objfre/i386/HDA.pdb -------------------------------------------------------------------------------- /objfre/i386/HDA.sys: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrew-hoffman/WDMHDA/HEAD/objfre/i386/HDA.sys -------------------------------------------------------------------------------- /objfre/i386/hda.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrew-hoffman/WDMHDA/HEAD/objfre/i386/hda.res -------------------------------------------------------------------------------- /objchk/i386/adapter.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrew-hoffman/WDMHDA/HEAD/objchk/i386/adapter.obj -------------------------------------------------------------------------------- /objchk/i386/common.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrew-hoffman/WDMHDA/HEAD/objchk/i386/common.obj -------------------------------------------------------------------------------- /objchk/i386/ichwave.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrew-hoffman/WDMHDA/HEAD/objchk/i386/ichwave.obj -------------------------------------------------------------------------------- /objchk/i386/mintopo.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrew-hoffman/WDMHDA/HEAD/objchk/i386/mintopo.obj -------------------------------------------------------------------------------- /objchk/i386/minwave.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrew-hoffman/WDMHDA/HEAD/objchk/i386/minwave.obj -------------------------------------------------------------------------------- /objfre/i386/adapter.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrew-hoffman/WDMHDA/HEAD/objfre/i386/adapter.obj -------------------------------------------------------------------------------- /objfre/i386/common.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrew-hoffman/WDMHDA/HEAD/objfre/i386/common.obj -------------------------------------------------------------------------------- /objfre/i386/mintopo.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrew-hoffman/WDMHDA/HEAD/objfre/i386/mintopo.obj -------------------------------------------------------------------------------- /objfre/i386/minwave.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrew-hoffman/WDMHDA/HEAD/objfre/i386/minwave.obj -------------------------------------------------------------------------------- /HDA.rc: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1997,1998 Microsoft Corporation. All Rights Reserved. */ 2 | 3 | #include 4 | 5 | #include 6 | 7 | #define VER_FILETYPE VFT_DRV 8 | #define VER_FILESUBTYPE VFT2_DRV_SOUND 9 | #define VER_FILEDESCRIPTION_STR "HD Audio Adapter Driver" 10 | #define VER_INTERNALNAME_STR "HDA.sys" 11 | #define VER_ORIGINALFILENAME_STR "HDA.sys" 12 | 13 | #include "common.ver" 14 | 15 | 16 | -------------------------------------------------------------------------------- /objfre/i386/echo.msg: -------------------------------------------------------------------------------- 1 | cl -nologo -Ii386\ -I. -I..\inc -Ic:\NTDDK\inc -Ic:\NTDDK\inc -Ic:\NTDDK\inc\ddk -Ic:\NTDDK\inc\ddk\wdm -Ic:\NTDDK\private\inc -Ic:\NTDDK\inc -D_X86_=1 -Di386=1 -DSTD_CALL -DCONDITION_HANDLING=1 -DNT_UP=1 -DNT_INST=0 -DWIN32=100 -D_NT1X_=100 -DWINNT=1 -D_WIN32_WINNT=0x0500 -DWINVER=0x0500 -D_WIN32_IE=0x0501 -DWIN32_LEAN_AND_MEAN=1 -DDEVL=1 -DFPO=1 -DNDEBUG -D_DLL=1 -D_WIN32 -DUNICODE -D_UNICODE -DUNDER_NT /c /Zel /Zp8 /Gy -cbstring -W3 -WX /Gz /QIfdiv- /QIf /QI0f /GB /Gi- /Gm- /GX- /GR- /GF /Oxs /Oy -FIc:\NTDDK\inc\warning.h .\minwave.cpp 2 | -------------------------------------------------------------------------------- /objchk/i386/echo.msg: -------------------------------------------------------------------------------- 1 | cl -nologo -Ii386\ -I. -I..\inc -Ic:\NTDDK\inc -Ic:\NTDDK\inc -Ic:\NTDDK\inc\ddk -Ic:\NTDDK\inc\ddk\wdm -Ic:\NTDDK\private\inc -Ic:\NTDDK\inc -D_X86_=1 -Di386=1 -DSTD_CALL -DCONDITION_HANDLING=1 -DNT_UP=1 -DNT_INST=0 -DWIN32=100 -D_NT1X_=100 -DWINNT=1 -D_WIN32_WINNT=0x0500 -DWINVER=0x0500 -D_WIN32_IE=0x0501 -DWIN32_LEAN_AND_MEAN=1 -DDBG=1 -DDEVL=1 -DFPO=0 -DNDEBUG -D_DLL=1 -DUNICODE -D_UNICODE -DUNDER_NT /c /Zel /Zp8 /Gy -cbstring -W3 -WX /Gz /QIfdiv- /QIf /QI0f /GB /Gi- /Gm- /GX- /GR- /GF -Z7 /Od /Oi /Oy- -FIc:\NTDDK\inc\warning.h .\minwave.cpp 2 | -------------------------------------------------------------------------------- /sources: -------------------------------------------------------------------------------- 1 | # Copyright (c) 1995-1999 Microsoft Corporation. All rights reserved. 2 | 3 | TARGETNAME=HDA 4 | TARGETTYPE=DRIVER 5 | TARGETPATH=obj 6 | 7 | TARGETLIBS= \ 8 | $(SDK_LIB_PATH)\portcls.lib\ 9 | $(SDK_LIB_PATH)\libcntpr.lib\ 10 | ..\lib\*\stdunk.lib 11 | 12 | INCLUDES=..\inc 13 | 14 | MSC_WARNING_LEVEL=-W3 -WX 15 | 16 | C_DEFINES=-D_WIN32 -DUNICODE -D_UNICODE -DUNDER_NT 17 | LINKER_FLAGS=-map 18 | 19 | SOURCES=\ 20 | adapter.cpp \ 21 | common.cpp \ 22 | mintopo.cpp \ 23 | minwave.cpp \ 24 | HDA.rc 25 | -------------------------------------------------------------------------------- /hda.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "adapter"=.\adapter.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Global: 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<3> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | -------------------------------------------------------------------------------- /hdadrv.rc: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Copyright (c) 1998-1999 Microsoft Corporation. All Rights Reserved. 3 | ** 4 | ** Portions Copyright (c) 1998-1999 Intel Corporation 5 | ** 6 | ********************************************************************************/ 7 | 8 | #include 9 | 10 | #include 11 | 12 | #define VER_FILETYPE VFT_DRV 13 | #define VER_FILESUBTYPE VFT2_DRV_SOUND 14 | #define VER_FILEDESCRIPTION_STR "HD Audio Driver (WDM)" 15 | #define VER_INTERNALNAME_STR "wdmhda.sys" 16 | #define VER_ORIGINALFILENAME_STR "wdmhda.sys" 17 | 18 | #define VER_LEGALCOPYRIGHT_YEARS "1998-2025" 19 | #define VER_LEGALCOPYRIGHT_STR "Sirius Cybernetics Corp. Share and Enjoy" VER_LEGALCOPYRIGHT_YEARS 20 | 21 | #include "common.ver" 22 | 23 | -------------------------------------------------------------------------------- /BUILD INSTRUCTIONS.txt: -------------------------------------------------------------------------------- 1 | Build Instructions 2 | 3 | 1. Create a Windows 98se or 2000 VM 4 | 2. Install Visual C++ 6.0 (No service packs) with all options 5 | 3. Install Windows 2000 DDK with all options except Alpha code selected 6 | 4. Copy the source tree to C:\NTDDK\src\wdm\audio\hdac 7 | 5. Open a "Checked Build Environment" or "Free Build Environment" command prompt 8 | (Start > Programs > Development Kits > Windows 2000 DDK) 9 | checked builds include debug prints and extra memory bounds checking. 10 | 6. CD to the C:\NTDDK\src\wdm\audio directory and run "build -cZ" 11 | this will build all the sample audio drivers as well but we need stdunk.cpp and the headers from them 12 | After the first build, you can build in the hdac directory. 13 | 14 | HDA.SYS will be built in the "objfre" or "objchk" folders. Install it with hda.inf 15 | 16 | to use a kernel debugger see https://bikodbg.com/blog/2021/08/win98-ddk/ -------------------------------------------------------------------------------- /objfre/i386/cl.rsp: -------------------------------------------------------------------------------- 1 | -Ii386\ 2 | -I. 3 | -I..\inc 4 | -Ic:\NTDDK\inc 5 | -Ic:\NTDDK\inc 6 | -Ic:\NTDDK\inc\ddk 7 | -Ic:\NTDDK\inc\ddk\wdm 8 | -Ic:\NTDDK\private\inc 9 | -Ic:\NTDDK\inc 10 | -D_X86_=1 11 | -Di386=1 12 | 13 | -DSTD_CALL 14 | -DCONDITION_HANDLING=1 15 | -DNT_UP=1 16 | 17 | -DNT_INST=0 18 | -DWIN32=100 19 | -D_NT1X_=100 20 | -DWINNT=1 21 | -D_WIN32_WINNT=0x0500 22 | -DWINVER=0x0500 23 | -D_WIN32_IE=0x0501 24 | 25 | 26 | 27 | -DWIN32_LEAN_AND_MEAN=1 28 | -DDEVL=1 29 | -DFPO=1 30 | 31 | 32 | 33 | -DNDEBUG 34 | -D_DLL=1 35 | -D_WIN32 36 | -DUNICODE 37 | -D_UNICODE 38 | -DUNDER_NT 39 | 40 | 41 | 42 | 43 | /c 44 | /Zel 45 | /Zp8 46 | /Gy 47 | -cbstring 48 | -W3 49 | -WX 50 | /Gz 51 | 52 | /QIfdiv- 53 | /QIf 54 | /QI0f 55 | /GB 56 | /Gi- 57 | /Gm- 58 | /GX- 59 | 60 | /GR- 61 | /GF 62 | 63 | /Oxs 64 | /Oy 65 | 66 | 67 | -FIc:\NTDDK\inc\warning.h 68 | 69 | -------------------------------------------------------------------------------- /objchk/i386/cl.rsp: -------------------------------------------------------------------------------- 1 | -Ii386\ 2 | -I. 3 | -I..\inc 4 | -Ic:\NTDDK\inc 5 | -Ic:\NTDDK\inc 6 | -Ic:\NTDDK\inc\ddk 7 | -Ic:\NTDDK\inc\ddk\wdm 8 | -Ic:\NTDDK\private\inc 9 | -Ic:\NTDDK\inc 10 | -D_X86_=1 11 | -Di386=1 12 | 13 | -DSTD_CALL 14 | -DCONDITION_HANDLING=1 15 | -DNT_UP=1 16 | 17 | -DNT_INST=0 18 | -DWIN32=100 19 | -D_NT1X_=100 20 | -DWINNT=1 21 | -D_WIN32_WINNT=0x0500 22 | -DWINVER=0x0500 23 | -D_WIN32_IE=0x0501 24 | 25 | 26 | 27 | -DWIN32_LEAN_AND_MEAN=1 28 | -DDBG=1 29 | -DDEVL=1 30 | -DFPO=0 31 | 32 | 33 | 34 | -DNDEBUG 35 | -D_DLL=1 36 | 37 | -DUNICODE 38 | -D_UNICODE 39 | -DUNDER_NT 40 | 41 | 42 | 43 | 44 | /c 45 | /Zel 46 | /Zp8 47 | /Gy 48 | -cbstring 49 | -W3 50 | -WX 51 | /Gz 52 | 53 | /QIfdiv- 54 | /QIf 55 | /QI0f 56 | /GB 57 | /Gi- 58 | /Gm- 59 | /GX- 60 | 61 | /GR- 62 | /GF 63 | -Z7 64 | /Od 65 | /Oi 66 | /Oy- 67 | 68 | 69 | -FIc:\NTDDK\inc\warning.h 70 | 71 | -------------------------------------------------------------------------------- /makefile: -------------------------------------------------------------------------------- 1 | ############################################################################# 2 | # 3 | # Copyright (C) Microsoft Corporation 1998-1999 4 | # All Rights Reserved. 5 | # 6 | # Makefile for wdm\audio\HDA 7 | # 8 | ############################################################################# 9 | 10 | ## Define WIN95_BUILD to build in the memphis 11 | ## build enviroment 12 | 13 | !IFDEF WIN95_BUILD 14 | 15 | ROOT = ..\..\..\..\.. 16 | 17 | IS_32 = TRUE 18 | IS_OEM = TRUE 19 | DEVICEDIR = hdac 20 | COMMONMKFILE = $(DEVICEDIR).mk 21 | DEPENDTARGETS = debug 22 | 23 | !include $(ROOT)\dev\master.mk 24 | 25 | ## NT BUILD ENVIROMENT 26 | !ELSE 27 | 28 | # 29 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 30 | # file to this component. This file merely indirects to the real make file 31 | # that is shared by all the components of NT. 32 | # 33 | !INCLUDE $(NTMAKEENV)\makefile.def 34 | 35 | !ENDIF 36 | -------------------------------------------------------------------------------- /obj/_objects.mac: -------------------------------------------------------------------------------- 1 | ALPHA_OBJECTS= \ 2 | $(_OBJ_DIR)\alpha\hda.res \ 3 | $(_OBJ_DIR)\alpha\adapter.obj \ 4 | $(_OBJ_DIR)\alpha\common.obj \ 5 | $(_OBJ_DIR)\alpha\mintopo.obj \ 6 | $(_OBJ_DIR)\alpha\minwave.obj 7 | 8 | PASS0_ALPHA_OBJECTS= 9 | 10 | AXP64_OBJECTS= \ 11 | $(_OBJ_DIR)\axp64\hda.res \ 12 | $(_OBJ_DIR)\axp64\adapter.obj \ 13 | $(_OBJ_DIR)\axp64\common.obj \ 14 | $(_OBJ_DIR)\axp64\mintopo.obj \ 15 | $(_OBJ_DIR)\axp64\minwave.obj 16 | 17 | PASS0_AXP64_OBJECTS= 18 | 19 | 386_OBJECTS= \ 20 | $(_OBJ_DIR)\i386\hda.res \ 21 | $(_OBJ_DIR)\i386\adapter.obj \ 22 | $(_OBJ_DIR)\i386\common.obj \ 23 | $(_OBJ_DIR)\i386\mintopo.obj \ 24 | $(_OBJ_DIR)\i386\minwave.obj 25 | 26 | PASS0_386_OBJECTS= 27 | 28 | IA64_OBJECTS= \ 29 | $(_OBJ_DIR)\ia64\hda.res \ 30 | $(_OBJ_DIR)\ia64\adapter.obj \ 31 | $(_OBJ_DIR)\ia64\common.obj \ 32 | $(_OBJ_DIR)\ia64\mintopo.obj \ 33 | $(_OBJ_DIR)\ia64\minwave.obj 34 | 35 | PASS0_IA64_OBJECTS= 36 | 37 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | Copyright (c) 1998 - 1999 Intel, 1998-2012 Microsoft, 2023-2025 BleskOS developers 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 5 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 Andrew Hoffman 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /BleskOS Sound Driver/pc_speaker.h: -------------------------------------------------------------------------------- 1 | //BleskOS 2 | 3 | /* 4 | * MIT License 5 | * Copyright (c) 2023-2025 BleskOS developers 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 7 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 | */ 10 | 11 | void pc_speaker_beep(word_t frequency); 12 | void pc_speaker_mute(void); -------------------------------------------------------------------------------- /BleskOS Sound Driver/include.c: -------------------------------------------------------------------------------- 1 | //BleskOS 2 | 3 | /* 4 | * MIT License 5 | * Copyright (c) 2023-2025 BleskOS developers 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 7 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 | */ 10 | 11 | #include "pc_speaker.c" 12 | #include "ac97.c" 13 | #include "hda.c" 14 | #include "main.c" -------------------------------------------------------------------------------- /BleskOS Sound Driver/include.h: -------------------------------------------------------------------------------- 1 | //BleskOS 2 | 3 | /* 4 | * MIT License 5 | * Copyright (c) 2023-2025 BleskOS developers 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 7 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 | */ 10 | 11 | #include "pc_speaker.h" 12 | #include "ac97.h" 13 | #include "hda.h" 14 | #include "main.h" -------------------------------------------------------------------------------- /BleskOS Sound Driver/pc_speaker.c: -------------------------------------------------------------------------------- 1 | //BleskOS 2 | 3 | /* 4 | * MIT License 5 | * Copyright (c) 2023-2025 BleskOS developers 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 7 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 | */ 10 | 11 | void pc_speaker_beep(word_t frequency) { 12 | // divide 13 | frequency = (1193182 / frequency); 14 | 15 | // program PIT to frequency 16 | outb(0x43, 0xB6); 17 | outb(0x42, (frequency & 0xFF)); 18 | outb(0x42, (frequency >> 8)); 19 | 20 | // turn on PC speaker 21 | if((inb(0x61) & 0x3) != 0x3) { 22 | outb(0x61, (inb(0x61) | 0x3)); 23 | } 24 | } 25 | 26 | void pc_speaker_mute(void) { 27 | outb(0x61, (inb(0x61) & ~0x3)); 28 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WDMHDA 2 | HD Audio driver for Windows 98SE / ME 3 | 4 | This project is a High Definition Audio aka Azalia codec and controller driver for all versions of Windows with WDM support which is Windows 98SE and ME (and possibly 98FE and 2000 as well, but not tested there yet.) 5 | 6 | Current status is a MVP Proof of Concept that functions in VMware and VirtualBox, and on Intel controllers with a Realtek ALC2xx; further development is needed to support more real hardware. Testing and feedback from anyone who can run this on bare metal with a [kernel debugger](https://bikodbg.com/blog/2021/08/win98-ddk/) will be appreciated. May experience possible horrible screeching and popping noises or static, and possible hard freezes when the driver is loaded or unloaded. If you want to use this in some kind of business critical production I would highly recommend either a Sound Blaster Live, CMI8738 or any $2 USB Audio dongle instead. (Seriously, almost all of the cheapest USB dongles work perfectly in 98se/Me. If you're using QuickInstall 0.9.6 you will need to add the wdma_usb.inf file back to C:\Windows\Inf though) 7 | 8 | Windows 9x may need to be patched to function at all on modern hardware even when virtualized. See [JHRobotics' Patcher9x project](github.com/JHRobotics/patcher9x) and [Sweetlow's patch for memory resource conflict issues](https://msfn.org/board/topic/186768-bug-fix-vmmvxd-on-handling-4gib-addresses-and-description-of-problems-with-resource-manager-on-newer-bioses/). 9 | 10 | Current Limitations: 11 | - Only supports 8000-48000hz 16-bit sample rate (up to 192khz 24-bit and 32-bit could technically be added but what's the point for 9x?) 12 | - Output only, recording not supported 13 | - Single audio stream, no hardware mixing 14 | - Volume control is only implemented for the main mix output and it does nothing on VMWare/Virtualbox 15 | - Jack detection and retasking is not supported 16 | - Only initializes the first codec detected on the link (extra codec in laptop docking stations won't work) 17 | - Freezes, fails to start or outputs horrible noises on a lot of real hardware. No guarantees. 18 | 19 | Source Code from [Microsoft's driver samples](https://github.com/microsoftarchive/msdn-code-gallery-microsoft/tree/master/Official%20Windows%20Driver%20Kit%20Sample/Windows%20Driver%20Kit%20(WDK)%208.1%20Samples/%5BC%2B%2B%5D-windows-driver-kit-81-cpp/WDK%208.1%20C%2B%2B%20Samples/AC97%20Driver%20Sample/C%2B%2B) 20 | 21 | and [BleskOS](https://github.com/VendelinSlezak/BleskOS/blob/master/source/drivers/sound/hda.c) 22 | used under MIT license. 23 | 24 | See also [Dogbert's open source CMI driver](https://codesite-archive.appspot.com/archive/p/cmediadrivers/). 25 | 26 | for build instructions see Build Instructions.txt 27 | -------------------------------------------------------------------------------- /hda.plg: -------------------------------------------------------------------------------- 1 | 2 | 3 |
 4 | 

Build Log

5 |

6 | --------------------Configuration: adapter - Win32 Debug-------------------- 7 |

8 |

Command Lines

9 | Creating temporary file "C:\WINDOWS\TEMP\RSP3270.TMP" with contents 10 | [ 11 | /nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"Debug/" /Fp"Debug/hda.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c 12 | "C:\NTDDK\src\wdm\audio\hda\adapter.cpp" 13 | "C:\NTDDK\src\wdm\audio\hda\common.cpp" 14 | "C:\NTDDK\src\wdm\audio\hda\ichwave.cpp" 15 | "C:\NTDDK\src\wdm\audio\hda\mintopo.cpp" 16 | "C:\NTDDK\src\wdm\audio\hda\minwave.cpp" 17 | "C:\NTDDK\src\wdm\audio\hda\prophnd.cpp" 18 | ] 19 | Creating command line "cl.exe @C:\WINDOWS\TEMP\RSP3270.TMP" 20 | Creating temporary file "C:\WINDOWS\TEMP\RSP3271.TMP" with contents 21 | [ 22 | kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/hda.pdb" /debug /machine:I386 /out:"Debug/hda.exe" /pdbtype:sept 23 | .\Debug\adapter.obj 24 | .\Debug\common.obj 25 | .\Debug\ichwave.obj 26 | .\Debug\mintopo.obj 27 | .\Debug\minwave.obj 28 | .\Debug\prophnd.obj 29 | ] 30 | Creating command line "link.exe @C:\WINDOWS\TEMP\RSP3271.TMP" 31 |

Output Window

32 | Compiling... 33 | adapter.cpp 34 | c:\ntddk\src\wdm\audio\hda\shared.h(13) : fatal error C1083: Cannot open include file: 'portcls.h': No such file or directory 35 | common.cpp 36 | c:\ntddk\src\wdm\audio\hda\shared.h(13) : fatal error C1083: Cannot open include file: 'portcls.h': No such file or directory 37 | ichwave.cpp 38 | c:\ntddk\src\wdm\audio\hda\shared.h(13) : fatal error C1083: Cannot open include file: 'portcls.h': No such file or directory 39 | mintopo.cpp 40 | c:\ntddk\src\wdm\audio\hda\shared.h(13) : fatal error C1083: Cannot open include file: 'portcls.h': No such file or directory 41 | minwave.cpp 42 | c:\ntddk\src\wdm\audio\hda\shared.h(13) : fatal error C1083: Cannot open include file: 'portcls.h': No such file or directory 43 | prophnd.cpp 44 | c:\ntddk\src\wdm\audio\hda\shared.h(13) : fatal error C1083: Cannot open include file: 'portcls.h': No such file or directory 45 | Error executing cl.exe. 46 | Creating command line "bscmake.exe /nologo /o"Debug/hda.bsc" .\Debug\adapter.sbr .\Debug\common.sbr .\Debug\ichwave.sbr .\Debug\mintopo.sbr .\Debug\minwave.sbr .\Debug\prophnd.sbr" 47 | Creating browse info file... 48 | BSCMAKE: error BK1506 : cannot open file '.\Debug\adapter.sbr': No such file or directory 49 | Error executing bscmake.exe. 50 |

Output Window

51 | 52 | 53 | 54 |

Results

55 | hda.exe - 7 error(s), 0 warning(s) 56 |
57 | 58 | 59 | -------------------------------------------------------------------------------- /debug.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Copyright (c) 1998-1999 Microsoft Corporation. All Rights Reserved. 3 | ** 4 | ** Portions Copyright (c) 1998-1999 Intel Corporation 5 | ** 6 | ********************************************************************************/ 7 | 8 | #ifndef _DEBUG_H_ 9 | #define _DEBUG_H_ 10 | 11 | // 12 | // Modified version of ksdebug.h to support runtime debug level changes. 13 | // 14 | const int DBG_NONE = 0x00000000; 15 | const int DBG_PRINT = 0x00000001; // Blabla. Function entries for example 16 | const int DBG_WARNING = 0x00000002; // warning level 17 | const int DBG_ERROR = 0x00000004; // this doesn't generate a breakpoint 18 | 19 | // specific debug output; you don't have to enable DBG_PRINT for this. 20 | const int DBG_STREAM = 0x00000010; // Enables stream output. 21 | const int DBG_POWER = 0x00000020; // Enables power management output. 22 | const int DBG_DMA = 0x00000040; // Enables DMA engine output. 23 | const int DBG_REGS = 0x00000080; // Enables register outout. 24 | const int DBG_PROBE = 0x00000100; // Enables hardware probing output. 25 | const int DBG_SYSINFO = 0x00000200; // Enables system info output. 26 | const int DBG_VSR = 0x00000400; // Enables variable sample rate output. 27 | const int DBG_PROPERTY = 0x00000800; // Enables property handler output 28 | const int DBG_PINS = 0x10000000; // Enables dump of created pins in topology 29 | const int DBG_NODES = 0x20000000; // Enables dump of created nodes in topology 30 | const int DBG_CONNS = 0x40000000; // Enables dump of the connections in topology 31 | 32 | const int DBG_ALL = 0xFFFFFFFF; 33 | 34 | // 35 | // The default statements that will print are warnings (DBG_WARNING) and 36 | // errors (DBG_ERROR). 37 | // 38 | const int DBG_DEFAULT = 0x000007F7; // warnings, errors, info, let's see. 39 | 40 | 41 | // 42 | // Define global debug variable. 43 | // 44 | #ifdef DEFINE_DEBUG_VARS 45 | #if (DBG) 46 | unsigned long ulDebugOut = DBG_DEFAULT; 47 | #endif 48 | 49 | #else // !DEFINED_DEBUG_VARS 50 | #if (DBG) 51 | extern unsigned long ulDebugOut; 52 | #endif 53 | #endif 54 | 55 | 56 | // 57 | // Define the print statement. 58 | // 59 | #if defined(__cplusplus) 60 | extern "C" { 61 | #endif // #if defined(__cplusplus) 62 | 63 | // 64 | // DBG is 1 in checked builds 65 | // 66 | #if (DBG) 67 | #define DOUT(lvl, strings) \ 68 | if ((lvl) & ulDebugOut) \ 69 | { \ 70 | DbgPrint(STR_MODULENAME); \ 71 | DbgPrint##strings; \ 72 | DbgPrint("\n"); \ 73 | } 74 | 75 | #define BREAK() \ 76 | DbgBreakPoint() 77 | 78 | #else // if (!DBG) 79 | #define DOUT(lvl, strings) 80 | #define BREAK() 81 | #endif // !DBG 82 | 83 | 84 | #if defined(__cplusplus) 85 | } 86 | #endif // #if defined(__cplusplus) 87 | 88 | 89 | 90 | #endif 91 | -------------------------------------------------------------------------------- /BleskOS Sound Driver/main.h: -------------------------------------------------------------------------------- 1 | //BleskOS 2 | 3 | /* 4 | * MIT License 5 | * Copyright (c) 2023-2025 BleskOS developers 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 7 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 | */ 10 | 11 | /* TODO: rewrite drivers to add output and input sources to these structures */ 12 | struct audio_output_t { 13 | dword_t output_number; 14 | dword_t device_number; 15 | void (*activate_audio_output)(dword_t device_number, dword_t output_number); 16 | 17 | dword_t gain; 18 | 19 | dword_t present; 20 | dword_t removable; 21 | byte_t (*check_presence)(dword_t device_number, dword_t output_number); 22 | }; 23 | struct audio_input_t { 24 | dword_t input_number; 25 | dword_t device_number; 26 | void (*activate_audio_input)(dword_t device_number, dword_t input_number); 27 | 28 | dword_t gain; 29 | 30 | dword_t present; 31 | dword_t removable; 32 | byte_t (*check_presence)(dword_t device_number, dword_t output_number); 33 | }; 34 | 35 | #define SOUND_CARD_DRIVER_AC97 0 36 | #define SOUND_CARD_DRIVER_HDA 1 37 | 38 | #define MAX_NUMBER_OF_SOUND_CARDS 10 39 | struct sound_card_info_t { 40 | byte_t driver; 41 | word_t vendor_id; 42 | word_t device_id; 43 | word_t io_base; 44 | word_t io_base_2; 45 | dword_t mmio_base; 46 | }__attribute__((packed)); 47 | struct sound_card_info_t sound_cards_info[MAX_NUMBER_OF_SOUND_CARDS]; 48 | byte_t number_of_sound_cards; 49 | #define NO_SOUND_CARD 0xFF 50 | byte_t selected_sound_card; 51 | byte_t selected_sound_card_driver_type; 52 | 53 | byte_t sound_volume = 0; 54 | dword_t sound_sample_rate = 0, sound_memory = 0, sound_length = 0, sound_position = 0; 55 | 56 | #define SIZE_OF_PCM_DATA_BUFFER 4*48000*4 //four seconds for 2 channels with 16 bit samples 57 | #define SOUND_BUFFER_0 0 58 | #define SOUND_BUFFER_1 1 59 | struct sound_buffer_refilling_info_t { 60 | byte_t *source_data_pointer; 61 | dword_t source_data_length; 62 | void (*fill_buffer)(byte_t *buffer); 63 | dword_t buffer_size; 64 | byte_t *buffer_0_pointer; 65 | byte_t *buffer_1_pointer; 66 | byte_t actually_playing_buffer: 4; 67 | byte_t last_filled_buffer: 4; 68 | dword_t played_bytes_by_finished_buffers; 69 | dword_t played_bytes; 70 | dword_t size_of_full_pcm_output_in_bytes; 71 | }__attribute__((packed)); 72 | 73 | struct sound_buffer_refilling_info_t *sound_buffer_refilling_info; 74 | byte_t *pcm_data; 75 | 76 | void initalize_sound_card(void); 77 | void sound_set_volume(byte_t volume); 78 | byte_t is_supported_sound_format(byte_t channels, byte_t bits_per_channel, dword_t sample_rate); 79 | 80 | dword_t sound_get_actual_stream_position(void); 81 | void play_sound_with_refilling_buffer(byte_t *source_data_pointer, dword_t source_data_length, dword_t size_of_full_pcm_output_in_bytes, dword_t sample_rate, dword_t size_of_buffer, void (*fill_buffer)(byte_t *buffer)); 82 | void task_refill_sound_buffer(void); 83 | void stop_sound(void); -------------------------------------------------------------------------------- /readme.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | SoundBlaster16 7 | 8 | 9 | 10 |

SoundBlaster16

11 |
12 |

[This is preliminary 13 | documentation and subject to change.]

14 | 15 |

SUMMARY

16 | This sample driver demonstrates the basics of writing a 17 | WDM audio driver, and can be used to write your own WDM driver. It will work with any SoundBlaster 16-compatible audio card, but may not use all of the functionality. Please see both the "Driver Issues" section below and the comments in the driver, which will help you add functionality like Power Management to your driver. 18 | 19 |

BUILDING THE SAMPLE

21 | To build this sample, enter the free or checked build environment and run build from the \\Ntddk\Src\Audio directory, rather than the Sb16 subdirectory. This sample links with Stdunk.lib, which is also built if you run build from \\Ntddk\Src\Audio.

22 | 23 | The .inf included in the \\98ddk\Src\Audio\Sb16 directory (Mssb16.inf) can be used to install the sample driver after it has been built. Simply copy the .inf and the driver binary to a floppy disk. Then install the sample from the floppy. Once the driver has been installed successfully with the .inf, simply drop updated driver binaries into \Windows\System32\Drivers on the target machine and reboot to test the new driver.

24 | 25 |

DRIVER ISSUES

27 | Developers should be aware of the following issues when testing or otherwise using this sample driver.

28 | 29 | 1. This driver does not support the AWE portion of AWE-capable devices such as the AWE32 or AWE64. Since the sample driver does not service the AWE devnode, it does not initialize the AWE devnode. As a result, MIDI played back using the FM synth will not be audible. This is not a bug with the FMSynth miniport or other aspect of the sample driver. It is simply a result of not initializing the AWE devnode.

30 | 31 | 2. Under some circumstances, wave audio may hang up when the rendering stream is frequently stopped and started. This intermittent problem is specific to the SB hardware.

32 | 33 | 3. This sample driver does not properly support Vibra class devices.

34 | 35 |

CODE TOUR

36 |

File Manifest

37 |
File		Description
38 | 
39 | Adapter.cpp	Connects the driver with the system
40 | Common.cpp	Common object used by all miniports
41 | Common.h 	Header file for the common object
42 | Makefile	Standard Windows NT makefile
43 | Mintopo.cpp	Implementation of the topology miniport
44 | Mintopo.h	Header file for the topology miniport
45 | Minwave.cpp	Implementation of the wave cyclic miniport and the stream object
46 | Minwave.h	Header file for the wave cyclic miniport and the stream object
47 | Mssb16.inf	Setup information
48 | Readme.htm	The documentation for this driver (this file)
49 | Sb16.rc		Resource file containing version information
50 | Sources		Dependency information for compiling
51 | Tables.h	Topology and property tables
52 | 
53 | 

Top of page

54 | 55 | 57 | 58 |
56 |

59 | 60 |

© Microsoft Corporation 1999

61 | 62 | 63 | -------------------------------------------------------------------------------- /CHANGELOG.txt: -------------------------------------------------------------------------------- 1 | ## WDMHDA Alpha-011 2025-12-13 2 | 3 | Fixes stupid IRQ sharing bug. Should fix freezes on some platforms where the audio controller shares an interrupt with USB. Also rewrote interrupt service routine to handle all streams and not to try to service the stream for non-stream interrupts. 4 | 5 | 6 | ## WDMHDA Alpha-010 2025-12-11 7 | 8 | Fixes out of bounds read (maybe leading to crash) bug when saving mixer settings to registry that was in the original SB16 driver. 9 | 10 | 11 | ## WDMHDA Alpha-009 2025-12-10 12 | 13 | - Set data format before powering up each node in codec, this fixes horrible distortion on Realtek ALC2xx 14 | - Add controller-specific PCI configuration writes that are necessary for many systems 15 | - Fix the mixer controls enough to allow the master volume slider to work on real hardware. On VMWare and Virtualbox it still doesn't do anything but I think that's by design for the VM, you can use the Wave volume slider in the mixer or the host's volume control. 16 | 17 | I now consider this driver functional enough to post about on retro hardware forums for further testing. 18 | 19 | 20 | ## WDMHDA Alpha-008 2025-11-23 21 | 22 | Fixes: 23 | 24 | - Fix double-free if device was disabled in Device Manager 25 | - Add variable sample rates but only the range of 8-48 khz for now. Still locked to 16-bit stereo but Windows can upconvert for anything that opens an 8 bit or mono channel. 26 | - Fix fundamental CORB/RIRB communication error that was leaving the pointers misaligned if the codec did not respond. 27 | 28 | Known Bugs: 29 | 30 | - Severe USB & Performance issues when sharing an IRQ with a USB controller 31 | - Realtek codecs: Left channel sounds fine but right channel is extremely overamplified and distorted 32 | 33 | 34 | ## WDMHDA Alpha-007 2025-11-19 35 | 36 | Added PCI Configuration Register writes for controller-specific quirks. 37 | 38 | 39 | ## WDMHDA Alpha-006 2025-11-05 40 | 41 | Still trying to get this working on real hardware. Now including the debug build in the ZIP file, the hda.sys file in that folder may be copied into C:\Windows\System32\Drivers after installation to get full debug log output. 42 | 43 | - Check STATESTS register to see if some codecs attach, 44 | - Wait the required amount of time for codec init, 45 | - Don't try to continue into codec init with a STATUS_UNSUCCESSFUL. 46 | 47 | 48 | ## WDMHDA Alpha-005 2025-10-31 49 | 50 | - Add codec reset command listed in Realtek datasheet 51 | - Tweak delays, timings, and buffer sizes to align with spec. 52 | - Now packaging the release build instead of the debug build to reduce slowdown from debug-log spam. 53 | 54 | 55 | ## WDMHDA Alpha-004 2025-10-29 56 | 57 | Now supports immediate command interface to the codec, and now functions in VMWare as well as VirtualBox. Will test on some real hardware but don't get your hopes up. I still get occasional hard freezes for reasons I don't understand yet. 58 | 59 | 60 | ## WDMHDA Alpha 003 Pre-release 2025-10-27 61 | 62 | Fixed more bugs around interrupts and timeouts. Probably doesn't work on real hardware but at least shouldn't freeze instantly anymore 63 | 64 | 65 | ## WDMHDA Alpha 002 Pre-release 2025-10-21 66 | 67 | Maybe fixed interrupt issue, some minor polish changes 68 | 69 | 70 | ## WDMHDA Alpha 001 Pre-release 2025-10-20 71 | 72 | Alpha release. No guarantees whatsoever. Only tested in VirtualBox! Only works at 16-bit 44100 Hz! Winamp produces horrible screeching noises sometimes! Also the release build doesn't produce sound so this is a debug build. For best results, run with a kernel debugger attached so you can tell why it doesn't work and why everything is frozen. You might get sound, or it might wipe your hard drive and unleash the nasal demons. If it doesn't work for you i would like to see the debug logs to figure out why. 73 | 74 | No readme and no instructions are provided for this. If you don;t know how to install windows driver binaries through Device Manager this is not the way to learn. 75 | -------------------------------------------------------------------------------- /BleskOS Sound Driver/ac97.h: -------------------------------------------------------------------------------- 1 | //BleskOS 2 | 3 | /* 4 | * MIT License 5 | * Copyright (c) 2023-2025 BleskOS developers 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 7 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 | */ 10 | 11 | #define MAX_NUMBER_OF_AC97_SOUND_CARDS 4 12 | struct ac97_info_t { 13 | struct pci_device_info_t pci; 14 | 15 | word_t nam_base; 16 | word_t nabm_base; 17 | word_t extended_capabilities; 18 | 19 | dword_t headphone_output_present; 20 | dword_t free_entry; 21 | dword_t selected_output; 22 | dword_t aux_out_number_of_volume_steps; 23 | 24 | struct ac97_buffer_entry_t *buffer_memory_pointer; 25 | dword_t sound_memory; 26 | dword_t number_of_samples_in_one_channel; 27 | }; 28 | 29 | // TODO: rewrite this 30 | dword_t selected_ac97_card; 31 | 32 | #define AC97_BUFFER_NOT_FILLED 1 33 | #define AC97_BUFFER_FILLED 0 34 | 35 | #define AC97_NAM_IO_RESET 0x00 36 | #define AC97_NAM_IO_CAPABILITES 0x00 37 | #define AC97_CAPABILITY_HEADPHONE_OUTPUT 0x10 38 | #define AC97_NAM_IO_MASTER_VOLUME 0x02 39 | #define AC97_NAM_IO_AUX_OUT_VOLUME 0x04 40 | #define AC97_NAM_IO_PCM_OUT_VOLUME 0x18 41 | #define AC97_NAM_IO_EXTENDED_CAPABILITIES 0x28 42 | #define AC97_EXTENDED_CAPABILITY_VARIABLE_SAMPLE_RATE 0x1 43 | #define AC97_NAM_IO_EXTENDED_FEATURES_CONTROL 0x2A 44 | #define AC97_NAM_IO_VARIABLE_SAMPLE_RATE_FRONT_DAC 0x2C 45 | #define AC97_NAM_IO_VARIABLE_SAMPLE_RATE_SURR_DAC 0x2E 46 | #define AC97_NAM_IO_VARIABLE_SAMPLE_RATE_LFE_DAC 0x30 47 | #define AC97_NAM_IO_VARIABLE_SAMPLE_RATE_LR_ADC 0x32 48 | #define AC97_NAM_IO_JACK_SENSE 0x72 49 | 50 | #define AC97_NABM_IO_PCM_OUTPUT_BUFFER_BASE_ADDRESS 0x10 51 | #define AC97_NABM_IO_PCM_OUTPUT_CURRENTLY_PROCESSED_ENTRY 0x14 52 | #define AC97_NABM_IO_PCM_OUTPUT_LAST_VALID_ENTRY 0x15 53 | #define AC97_NABM_IO_PCM_OUTPUT_STATUS 0x16 54 | #define AC97_NABM_IO_PCM_OUTPUT_CURRENT_ENTRY_POSITION 0x18 55 | #define AC97_NABM_IO_PCM_OUTPUT_CONTROL 0x1B 56 | #define AC97_NABM_IO_GLOBAL_CONTROL 0x2C 57 | 58 | #define AC97_NABM_IO_PCM_INPUT_CONTROL 0x0B 59 | #define AC97_NABM_IO_MICROPHONE_INPUT_CONTROL 0x2B 60 | 61 | #define AC97_SPEAKER_OUTPUT 0 62 | #define AC97_HEADPHONE_OUTPUT 1 63 | 64 | #define AC97_SPEAKER_OUTPUT_NUMBER_OF_VOLUME_STEPS 31 65 | 66 | struct ac97_buffer_entry_t { 67 | dword_t sample_memory; 68 | word_t number_of_samples; 69 | word_t reserved: 14; 70 | byte_t last_buffer_entry: 1; 71 | byte_t interrupt_on_completion: 1; 72 | }__attribute__((packed)); 73 | 74 | void ac97_add_new_pci_device(struct pci_device_info_t device); 75 | 76 | void initalize_ac97_sound_card(dword_t sound_card_number); 77 | byte_t ac97_is_headphone_connected(void); 78 | void ac97_set_volume_in_register(dword_t offset, byte_t number_of_volume_steps, byte_t volume); 79 | void ac97_set_output(byte_t output); 80 | void ac97_set_volume(byte_t volume); 81 | byte_t ac97_is_supported_sample_rate(word_t sample_rate); 82 | void ac97_set_sample_rate(word_t sample_rate); 83 | void ac97_check_headphone_connection_change(void); 84 | void ac97_play_pcm_data_in_loop(dword_t sample_rate); 85 | void task_ac97_play_buffer_in_loop(void); 86 | dword_t ac97_get_actual_stream_position(void); 87 | void ac97_stop_sound(void); -------------------------------------------------------------------------------- /hda.dsp: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Project File - Name="adapter" - Package Owner=<4> 2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00 3 | # ** DO NOT EDIT ** 4 | 5 | # TARGTYPE "Win32 (x86) Console Application" 0x0103 6 | 7 | CFG=adapter - Win32 Debug 8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE, 9 | !MESSAGE use the Export Makefile command and run 10 | !MESSAGE 11 | !MESSAGE NMAKE /f "hda.mak". 12 | !MESSAGE 13 | !MESSAGE You can specify a configuration when running NMAKE 14 | !MESSAGE by defining the macro CFG on the command line. For example: 15 | !MESSAGE 16 | !MESSAGE NMAKE /f "hda.mak" CFG="adapter - Win32 Debug" 17 | !MESSAGE 18 | !MESSAGE Possible choices for configuration are: 19 | !MESSAGE 20 | !MESSAGE "adapter - Win32 Release" (based on "Win32 (x86) Console Application") 21 | !MESSAGE "adapter - Win32 Debug" (based on "Win32 (x86) Console Application") 22 | !MESSAGE 23 | 24 | # Begin Project 25 | # PROP AllowPerConfigDependencies 0 26 | # PROP Scc_ProjName "" 27 | # PROP Scc_LocalPath "" 28 | CPP=cl.exe 29 | RSC=rc.exe 30 | 31 | !IF "$(CFG)" == "adapter - Win32 Release" 32 | 33 | # PROP BASE Use_MFC 0 34 | # PROP BASE Use_Debug_Libraries 0 35 | # PROP BASE Output_Dir "Release" 36 | # PROP BASE Intermediate_Dir "Release" 37 | # PROP BASE Target_Dir "" 38 | # PROP Use_MFC 0 39 | # PROP Use_Debug_Libraries 0 40 | # PROP Output_Dir "Release" 41 | # PROP Intermediate_Dir "Release" 42 | # PROP Target_Dir "" 43 | # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c 44 | # ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c 45 | # ADD BASE RSC /l 0x409 /d "NDEBUG" 46 | # ADD RSC /l 0x409 /d "NDEBUG" 47 | BSC32=bscmake.exe 48 | # ADD BASE BSC32 /nologo 49 | # ADD BSC32 /nologo 50 | LINK32=link.exe 51 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 52 | # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 53 | 54 | !ELSEIF "$(CFG)" == "adapter - Win32 Debug" 55 | 56 | # PROP BASE Use_MFC 0 57 | # PROP BASE Use_Debug_Libraries 1 58 | # PROP BASE Output_Dir "Debug" 59 | # PROP BASE Intermediate_Dir "Debug" 60 | # PROP BASE Target_Dir "" 61 | # PROP Use_MFC 0 62 | # PROP Use_Debug_Libraries 1 63 | # PROP Output_Dir "Debug" 64 | # PROP Intermediate_Dir "Debug" 65 | # PROP Target_Dir "" 66 | # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c 67 | # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c 68 | # ADD BASE RSC /l 0x409 /d "_DEBUG" 69 | # ADD RSC /l 0x409 /d "_DEBUG" 70 | BSC32=bscmake.exe 71 | # ADD BASE BSC32 /nologo 72 | # ADD BSC32 /nologo 73 | LINK32=link.exe 74 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept 75 | # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept 76 | 77 | !ENDIF 78 | 79 | # Begin Target 80 | 81 | # Name "adapter - Win32 Release" 82 | # Name "adapter - Win32 Debug" 83 | # Begin Source File 84 | 85 | SOURCE=.\ac97reg.h 86 | # End Source File 87 | # Begin Source File 88 | 89 | SOURCE=.\adapter.cpp 90 | # End Source File 91 | # Begin Source File 92 | 93 | SOURCE=.\adapter.h 94 | # End Source File 95 | # Begin Source File 96 | 97 | SOURCE=.\common.cpp 98 | # End Source File 99 | # Begin Source File 100 | 101 | SOURCE=.\common.h 102 | # End Source File 103 | # Begin Source File 104 | 105 | SOURCE=.\debug.h 106 | # End Source File 107 | # Begin Source File 108 | 109 | SOURCE=.\guids.h 110 | # End Source File 111 | # Begin Source File 112 | 113 | SOURCE=.\hdaudio.h 114 | # End Source File 115 | # Begin Source File 116 | 117 | SOURCE=.\ichreg.h 118 | # End Source File 119 | # Begin Source File 120 | 121 | SOURCE=.\ichwave.cpp 122 | # End Source File 123 | # Begin Source File 124 | 125 | SOURCE=.\ichwave.h 126 | # End Source File 127 | # Begin Source File 128 | 129 | SOURCE=.\mintopo.cpp 130 | # End Source File 131 | # Begin Source File 132 | 133 | SOURCE=.\mintopo.h 134 | # End Source File 135 | # Begin Source File 136 | 137 | SOURCE=.\minwave.cpp 138 | # End Source File 139 | # Begin Source File 140 | 141 | SOURCE=.\minwave.h 142 | # End Source File 143 | # Begin Source File 144 | 145 | SOURCE=.\prophnd.cpp 146 | # End Source File 147 | # Begin Source File 148 | 149 | SOURCE=.\shared.h 150 | # End Source File 151 | # End Target 152 | # End Project 153 | -------------------------------------------------------------------------------- /mintopo.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * mintopo.h - HDA topology miniport private definitions 3 | ***************************************************************************** 4 | * Copyright (c) 1997-1999 Microsoft Corporation. All Rights Reserved. 5 | */ 6 | 7 | #ifndef _HDATOPO_PRIVATE_H_ 8 | #define _HDATOPO_PRIVATE_H_ 9 | 10 | #include "stdunk.h" 11 | #include "common.h" 12 | 13 | #define ELTS_IN_ARRAY(a) (sizeof(a) / sizeof((a)[0])) 14 | 15 | 16 | 17 | 18 | 19 | /***************************************************************************** 20 | * Classes 21 | */ 22 | 23 | /***************************************************************************** 24 | * CMiniportTopologyHDA 25 | ***************************************************************************** 26 | * HDA topology miniport. This object is associated with the device and is 27 | * created when the device is started. The class inherits IMiniportTopology 28 | * so it can expose this interface and CUnknown so it automatically gets 29 | * reference counting and aggregation support. 30 | */ 31 | class CMiniportTopologyHDA 32 | : public IMiniportTopology, 33 | public CUnknown 34 | { 35 | private: 36 | PADAPTERCOMMON AdapterCommon; // Adapter common object. 37 | PPORTTOPOLOGY Port; // Callback interface. 38 | PUCHAR PortBase; // Base port address. 39 | 40 | BOOLEAN BoardNotResponsive; // Indicates dead hardware. 41 | 42 | /************************************************************************* 43 | * CMiniportTopologyHDA methods 44 | * 45 | * These are private member functions used internally by the object. See 46 | * MINIPORT.CPP for specific descriptions. 47 | */ 48 | NTSTATUS ProcessResources 49 | ( 50 | IN PRESOURCELIST ResourceList 51 | ); 52 | BYTE ReadBitsFromMixer 53 | ( 54 | BYTE Reg, 55 | BYTE Bits, 56 | BYTE Shift 57 | ); 58 | void WriteBitsToMixer 59 | ( 60 | BYTE Reg, 61 | BYTE Bits, 62 | BYTE Shift, 63 | BYTE Value 64 | ); 65 | 66 | public: 67 | /************************************************************************* 68 | * The following two macros are from STDUNK.H. DECLARE_STD_UNKNOWN() 69 | * defines inline IUnknown implementations that use CUnknown's aggregation 70 | * support. NonDelegatingQueryInterface() is declared, but it cannot be 71 | * implemented generically. Its definition appears in MINIPORT.CPP. 72 | * DEFINE_STD_CONSTRUCTOR() defines inline a constructor which accepts 73 | * only the outer unknown, which is used for aggregation. The standard 74 | * create macro (in MINIPORT.CPP) uses this constructor. 75 | */ 76 | DECLARE_STD_UNKNOWN(); 77 | DEFINE_STD_CONSTRUCTOR(CMiniportTopologyHDA); 78 | 79 | ~CMiniportTopologyHDA(); 80 | 81 | /************************************************************************* 82 | * IMiniport methods 83 | */ 84 | STDMETHODIMP 85 | GetDescription 86 | ( OUT PPCFILTER_DESCRIPTOR * OutFilterDescriptor 87 | ); 88 | STDMETHODIMP 89 | DataRangeIntersection 90 | ( IN ULONG PinId 91 | , IN PKSDATARANGE DataRange 92 | , IN PKSDATARANGE MatchingDataRange 93 | , IN ULONG OutputBufferLength 94 | , OUT PVOID ResultantFormat OPTIONAL 95 | , OUT PULONG ResultantFormatLength 96 | ) 97 | { 98 | return STATUS_NOT_IMPLEMENTED; 99 | } 100 | 101 | /************************************************************************* 102 | * IMiniportTopology methods 103 | */ 104 | STDMETHODIMP Init 105 | ( 106 | IN PUNKNOWN UnknownAdapter, 107 | IN PRESOURCELIST ResourceList, 108 | IN PPORTTOPOLOGY Port 109 | ); 110 | 111 | /************************************************************************* 112 | * Friends 113 | */ 114 | friend 115 | NTSTATUS 116 | PropertyHandler_OnOff 117 | ( 118 | IN PPCPROPERTY_REQUEST PropertyRequest 119 | ); 120 | friend 121 | NTSTATUS 122 | PropertyHandler_Level 123 | ( 124 | IN PPCPROPERTY_REQUEST PropertyRequest 125 | ); 126 | friend 127 | NTSTATUS 128 | PropertyHandler_SuperMixCaps 129 | ( 130 | IN PPCPROPERTY_REQUEST PropertyRequest 131 | ); 132 | friend 133 | NTSTATUS 134 | PropertyHandler_SuperMixTable 135 | ( 136 | IN PPCPROPERTY_REQUEST PropertyRequest 137 | ); 138 | friend 139 | NTSTATUS 140 | PropertyHandler_CpuResources 141 | ( 142 | IN PPCPROPERTY_REQUEST PropertyRequest 143 | ); 144 | }; 145 | 146 | #include "tables.h" 147 | 148 | 149 | 150 | 151 | 152 | #endif 153 | -------------------------------------------------------------------------------- /BleskOS Sound Driver/hda.h: -------------------------------------------------------------------------------- 1 | //BleskOS 2 | 3 | /* 4 | * MIT License 5 | * Copyright (c) 2023-2025 BleskOS developers 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 7 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 | */ 10 | 11 | #define MAX_NUMBER_OF_HDA_SOUND_CARDS 4 12 | struct hda_info_t { 13 | struct pci_device_info_t pci; 14 | 15 | dword_t base; 16 | dword_t input_stream_base; 17 | dword_t output_stream_base; 18 | dword_t communication_type; 19 | dword_t codec_number; 20 | dword_t is_initalized_useful_output; 21 | dword_t selected_output_node; 22 | 23 | dword_t *corb_mem; 24 | dword_t corb_pointer; 25 | dword_t corb_number_of_entries; 26 | dword_t *rirb_mem; 27 | dword_t rirb_pointer; 28 | dword_t rirb_number_of_entries; 29 | 30 | dword_t *output_buffer_list; 31 | dword_t sound_length; 32 | dword_t bytes_on_output_for_stopping_sound; 33 | dword_t length_of_node_path; 34 | 35 | dword_t afg_node_sample_capabilities; 36 | dword_t afg_node_stream_format_capabilities; 37 | dword_t afg_node_input_amp_capabilities; 38 | dword_t afg_node_output_amp_capabilities; 39 | 40 | dword_t audio_output_node_number; 41 | dword_t audio_output_node_sample_capabilities; 42 | dword_t audio_output_node_stream_format_capabilities; 43 | 44 | dword_t output_amp_node_number; 45 | dword_t output_amp_node_capabilities; 46 | 47 | dword_t second_audio_output_node_number; 48 | dword_t second_audio_output_node_sample_capabilities; 49 | dword_t second_audio_output_node_stream_format_capabilities; 50 | dword_t second_output_amp_node_number; 51 | dword_t second_output_amp_node_capabilities; 52 | 53 | dword_t pin_output_node_number; 54 | dword_t pin_headphone_node_number; 55 | }; 56 | 57 | // TODO: rewrite this 58 | dword_t selected_hda_card; 59 | 60 | #define HDA_UNINITALIZED 0 61 | #define HDA_CORB_RIRB 1 62 | #define HDA_PIO 2 63 | 64 | #define HDA_WIDGET_AUDIO_OUTPUT 0x0 65 | #define HDA_WIDGET_AUDIO_INPUT 0x1 66 | #define HDA_WIDGET_AUDIO_MIXER 0x2 67 | #define HDA_WIDGET_AUDIO_SELECTOR 0x3 68 | #define HDA_WIDGET_PIN_COMPLEX 0x4 69 | #define HDA_WIDGET_POWER_WIDGET 0x5 70 | #define HDA_WIDGET_VOLUME_KNOB 0x6 71 | #define HDA_WIDGET_BEEP_GENERATOR 0x7 72 | #define HDA_WIDGET_VENDOR_DEFINED 0xF 73 | 74 | #define HDA_PIN_LINE_OUT 0x0 75 | #define HDA_PIN_SPEAKER 0x1 76 | #define HDA_PIN_HEADPHONE_OUT 0x2 77 | #define HDA_PIN_CD 0x3 78 | #define HDA_PIN_SPDIF_OUT 0x4 79 | #define HDA_PIN_DIGITAL_OTHER_OUT 0x5 80 | #define HDA_PIN_MODEM_LINE_SIDE 0x6 81 | #define HDA_PIN_MODEM_HANDSET_SIDE 0x7 82 | #define HDA_PIN_LINE_IN 0x8 83 | #define HDA_PIN_AUX 0x9 84 | #define HDA_PIN_MIC_IN 0xA 85 | #define HDA_PIN_TELEPHONY 0xB 86 | #define HDA_PIN_SPDIF_IN 0xC 87 | #define HDA_PIN_DIGITAL_OTHER_IN 0xD 88 | #define HDA_PIN_RESERVED 0xE 89 | #define HDA_PIN_OTHER 0xF 90 | 91 | #define HDA_OUTPUT_NODE 0x1 92 | #define HDA_INPUT_NODE 0x2 93 | 94 | void hda_add_new_pci_device(struct pci_device_info_t device); 95 | 96 | void hda_initalize_sound_card(dword_t sound_card_number); 97 | dword_t hda_send_verb(dword_t codec, dword_t node, dword_t verb, dword_t command); 98 | 99 | byte_t hda_get_node_type(dword_t codec, dword_t node); 100 | word_t hda_get_node_connection_entry(dword_t codec, dword_t node, dword_t connection_entry_number); 101 | void hda_set_node_gain(dword_t codec, dword_t node, dword_t node_type, dword_t capabilities, dword_t gain); 102 | void hda_enable_pin_output(dword_t codec, dword_t pin_node); 103 | void hda_disable_pin_output(dword_t codec, dword_t pin_node); 104 | byte_t hda_is_headphone_connected(void); 105 | 106 | void hda_initalize_codec(dword_t sound_card_number, dword_t codec_number); 107 | void hda_initalize_audio_function_group(dword_t sound_card_number, dword_t afg_node_number); 108 | void hda_initalize_output_pin(dword_t sound_card_number, dword_t pin_node_number); 109 | void hda_initalize_audio_output(dword_t sound_card_number, dword_t audio_output_node_number); 110 | void hda_initalize_audio_mixer(dword_t sound_card_number, dword_t audio_mixer_node_number); 111 | void hda_initalize_audio_selector(dword_t sound_card_number, dword_t audio_selector_node_number); 112 | 113 | void hda_set_volume(dword_t sound_card_number, dword_t volume); 114 | void hda_check_headphone_connection_change(void); 115 | 116 | byte_t hda_is_supported_channel_size(dword_t sound_card_number, byte_t size); 117 | byte_t hda_is_supported_sample_rate(dword_t sound_card_number, dword_t sample_rate); 118 | word_t hda_return_sound_data_format(dword_t sample_rate, dword_t channels, dword_t bits_per_sample); 119 | void hda_play_pcm_data_in_loop(dword_t sound_card_number, dword_t sample_rate); 120 | void hda_stop_sound(dword_t sound_card_number); 121 | dword_t hda_get_actual_stream_position(dword_t sound_card_number); -------------------------------------------------------------------------------- /minwave.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * minwave.h - HDA wave miniport private definitions 3 | ***************************************************************************** 4 | * Copyright (c) 1997-1999 Microsoft Corporation. All Rights Reserved. 5 | */ 6 | 7 | #ifndef _HDAWAVE_PRIVATE_H_ 8 | #define _HDAWAVE_PRIVATE_H_ 9 | 10 | #include "stdunk.h" 11 | #include "common.h" 12 | 13 | 14 | 15 | 16 | 17 | /***************************************************************************** 18 | * Classes 19 | */ 20 | 21 | /***************************************************************************** 22 | * CMiniportWaveCyclicHDA 23 | ***************************************************************************** 24 | * HDA wave miniport. This object is associated with the device and is 25 | * created when the device is started. The class inherits IMiniportWaveCyclic 26 | * so it can expose this interface and CUnknown so it automatically gets 27 | * reference counting and aggregation support. 28 | */ 29 | class CMiniportWaveCyclicHDA 30 | : public IMiniportWaveCyclic, 31 | public CUnknown 32 | { 33 | private: 34 | PADAPTERCOMMON AdapterCommon; // Adapter common object. 35 | PPORTWAVECYCLIC Port; // Callback interface. 36 | PUCHAR PortBase; // Base port address. 37 | 38 | ULONG NotificationInterval; // In milliseconds. 39 | ULONG SamplingFrequency; // Frames per second. 40 | 41 | BOOLEAN AllocatedCapture; // Capture in use. 42 | BOOLEAN AllocatedRender; // Render in use. 43 | BOOLEAN Allocated8Bit; // 8-bit DMA in use. 44 | BOOLEAN Allocated16Bit; // 16-bit DMA in use. 45 | 46 | PDMACHANNEL DmaChannel; 47 | PADAPTER_OBJECT AdapterObject; 48 | 49 | PSERVICEGROUP ServiceGroup; // For notification. 50 | KMUTEX SampleRateSync; // Sync for sample rate changes. 51 | 52 | /************************************************************************* 53 | * CMiniportWaveCyclicHDA methods 54 | * 55 | * These are private member functions used internally by the object. See 56 | * MINIPORT.CPP for specific descriptions. 57 | */ 58 | BOOLEAN ConfigureDevice 59 | ( 60 | IN ULONG Interrupt, 61 | IN ULONG DMA8Bit, 62 | IN ULONG DMA16Bit 63 | ); 64 | NTSTATUS ProcessResources 65 | ( 66 | IN PRESOURCELIST ResourceList 67 | ); 68 | NTSTATUS ValidateFormat 69 | ( 70 | IN PKSDATAFORMAT Format 71 | ); 72 | 73 | public: 74 | /************************************************************************* 75 | * The following two macros are from STDUNK.H. DECLARE_STD_UNKNOWN() 76 | * defines inline IUnknown implementations that use CUnknown's aggregation 77 | * support. NonDelegatingQueryInterface() is declared, but it cannot be 78 | * implemented generically. Its definition appears in MINIPORT.CPP. 79 | * DEFINE_STD_CONSTRUCTOR() defines inline a constructor which accepts 80 | * only the outer unknown, which is used for aggregation. The standard 81 | * create macro (in MINIPORT.CPP) uses this constructor. 82 | */ 83 | DECLARE_STD_UNKNOWN(); 84 | DEFINE_STD_CONSTRUCTOR(CMiniportWaveCyclicHDA); 85 | 86 | ~CMiniportWaveCyclicHDA(); 87 | 88 | /************************************************************************* 89 | * This macro is from PORTCLS.H. It lists all the interface's functions. 90 | */ 91 | IMP_IMiniportWaveCyclic; 92 | 93 | /************************************************************************* 94 | * Friends 95 | * 96 | * The miniport stream class is a friend because it needs to access the 97 | * private member variables of this class. 98 | */ 99 | friend class CMiniportWaveCyclicStreamHDA; 100 | }; 101 | 102 | /***************************************************************************** 103 | * CMiniportWaveCyclicStreamHDA 104 | ***************************************************************************** 105 | * HDA wave miniport stream. This object is associated with a streaming pin 106 | * and is created when a pin is created on the filter. The class inherits 107 | * IMiniportWaveCyclicStream so it can expose this interface and CUnknown so 108 | * it automatically gets reference counting and aggregation support. 109 | */ 110 | class CMiniportWaveCyclicStreamHDA 111 | : public IMiniportWaveCyclicStream, 112 | public CUnknown 113 | { 114 | private: 115 | CMiniportWaveCyclicHDA * Miniport; // Miniport that created us. 116 | ULONG Channel; // Index into channel list. 117 | BOOLEAN Capture; // Capture or render. 118 | BOOLEAN Format16Bit; // 16- or 8-bit samples. 119 | BOOLEAN FormatStereo; // Two or one channel. 120 | KSSTATE State; // Stop, pause, run. 121 | PDMACHANNEL DmaChannel; // DMA channel to use. 122 | BOOLEAN RestoreInputMixer; // Restore input mixer. 123 | UCHAR InputMixerLeft; // Cache for left input mixer. 124 | 125 | public: 126 | /************************************************************************* 127 | * The following two macros are from STDUNK.H. DECLARE_STD_UNKNOWN() 128 | * defines inline IUnknown implementations that use CUnknown's aggregation 129 | * support. NonDelegatingQueryInterface() is declared, but it cannot be 130 | * implemented generically. Its definition appears in MINIPORT.CPP. 131 | * DEFINE_STD_CONSTRUCTOR() defines inline a constructor which accepts 132 | * only the outer unknown, which is used for aggregation. The standard 133 | * create macro (in MINIPORT.CPP) uses this constructor. 134 | */ 135 | DECLARE_STD_UNKNOWN(); 136 | DEFINE_STD_CONSTRUCTOR(CMiniportWaveCyclicStreamHDA); 137 | 138 | ~CMiniportWaveCyclicStreamHDA(); 139 | 140 | /************************************************************************* 141 | * This macro is from PORTCLS.H. It lists all the interface's functions. 142 | */ 143 | IMP_IMiniportWaveCyclicStream; 144 | 145 | NTSTATUS 146 | Init 147 | ( 148 | IN CMiniportWaveCyclicHDA * Miniport, 149 | IN ULONG Channel, 150 | IN BOOLEAN Capture, 151 | IN PKSDATAFORMAT DataFormat, 152 | OUT PDMACHANNEL DmaChannel 153 | ); 154 | }; 155 | 156 | 157 | 158 | 159 | 160 | #endif -------------------------------------------------------------------------------- /BleskOS Sound Driver/main.c: -------------------------------------------------------------------------------- 1 | //BleskOS 2 | 3 | /* 4 | * MIT License 5 | * Copyright (c) 2023-2025 BleskOS developers 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 7 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 | */ 10 | 11 | void initalize_sound_card(void) { 12 | //found usable sound card and initalize it 13 | selected_sound_card = NO_SOUND_CARD; 14 | if(components->p_sound_card == 0) { 15 | return; 16 | } 17 | 18 | for(dword_t i = 0; i < components->n_ac97; i++) { 19 | initalize_ac97_sound_card(i); 20 | 21 | // TODO: 22 | selected_sound_card = i; 23 | selected_sound_card_driver_type = SOUND_CARD_DRIVER_AC97; 24 | break; 25 | } 26 | 27 | for(dword_t i = 0; i < components->n_hda; i++) { 28 | hda_initalize_sound_card(i); 29 | 30 | // TODO: 31 | selected_sound_card = i; 32 | selected_sound_card_driver_type = SOUND_CARD_DRIVER_HDA; 33 | if(components->hda[i].is_initalized_useful_output == STATUS_TRUE) { 34 | break; 35 | } 36 | } 37 | 38 | //set sound 39 | sound_set_volume(30); 40 | 41 | //allocate memory for playing sound 42 | sound_buffer_refilling_info = (struct sound_buffer_refilling_info_t *) (malloc(sizeof(struct sound_buffer_refilling_info_t))); 43 | pcm_data = (byte_t *) (malloc(SIZE_OF_PCM_DATA_BUFFER)); 44 | } 45 | 46 | void sound_set_volume(byte_t volume) { 47 | //set volume on sound card 48 | if(selected_sound_card != NO_SOUND_CARD) { 49 | if(selected_sound_card_driver_type==SOUND_CARD_DRIVER_AC97) { 50 | ac97_set_volume(volume); 51 | } 52 | else if(selected_sound_card_driver_type==SOUND_CARD_DRIVER_HDA) { 53 | hda_set_volume(selected_sound_card, volume); 54 | } 55 | } 56 | 57 | //update global variable 58 | sound_volume = volume; 59 | } 60 | 61 | byte_t is_supported_sound_format(byte_t channels, byte_t bits_per_channel, dword_t sample_rate) { 62 | if(selected_sound_card==NO_SOUND_CARD) { 63 | return STATUS_ERROR; 64 | } 65 | 66 | if(selected_sound_card_driver_type==SOUND_CARD_DRIVER_AC97) { 67 | if(channels==2 && bits_per_channel==16) { 68 | return ac97_is_supported_sample_rate(sample_rate); 69 | } 70 | else { 71 | return STATUS_ERROR; 72 | } 73 | } 74 | else if(selected_sound_card_driver_type==SOUND_CARD_DRIVER_HDA) { 75 | if(channels==2 && hda_is_supported_channel_size(selected_sound_card, bits_per_channel)==STATUS_GOOD && hda_is_supported_sample_rate(selected_sound_card, sample_rate)==STATUS_GOOD) { 76 | return STATUS_GOOD; 77 | } 78 | else { 79 | return STATUS_ERROR; 80 | } 81 | } 82 | 83 | return STATUS_ERROR; 84 | } 85 | 86 | void play_sound_with_refilling_buffer(byte_t *source_data_pointer, dword_t source_data_length, dword_t size_of_full_pcm_output_in_bytes, dword_t sample_rate, dword_t size_of_buffer, void (*fill_buffer)(byte_t *buffer)) { 87 | //set info about sound 88 | sound_buffer_refilling_info->source_data_pointer = source_data_pointer; 89 | sound_buffer_refilling_info->source_data_length = source_data_length; 90 | sound_buffer_refilling_info->fill_buffer = fill_buffer; 91 | sound_buffer_refilling_info->buffer_size = size_of_buffer; 92 | sound_buffer_refilling_info->buffer_0_pointer = (byte_t *) pcm_data; 93 | sound_buffer_refilling_info->buffer_1_pointer = (byte_t *) ((dword_t)pcm_data+size_of_buffer); 94 | sound_buffer_refilling_info->actually_playing_buffer = SOUND_BUFFER_0; 95 | sound_buffer_refilling_info->last_filled_buffer = SOUND_BUFFER_0; 96 | sound_buffer_refilling_info->played_bytes_by_finished_buffers = 0; 97 | sound_buffer_refilling_info->played_bytes = 0; 98 | sound_buffer_refilling_info->size_of_full_pcm_output_in_bytes = size_of_full_pcm_output_in_bytes; 99 | 100 | //clear buffer 101 | clear_memory((dword_t)pcm_data, SIZE_OF_PCM_DATA_BUFFER); 102 | 103 | //load pcm data to first buffer 104 | (*fill_buffer)(pcm_data); 105 | 106 | //play pcm data buffer in endless loop 107 | if(selected_sound_card!=NO_SOUND_CARD) { 108 | if(selected_sound_card_driver_type==SOUND_CARD_DRIVER_AC97) { 109 | ac97_play_pcm_data_in_loop(sample_rate); 110 | } 111 | else if(selected_sound_card_driver_type==SOUND_CARD_DRIVER_HDA) { 112 | hda_play_pcm_data_in_loop(selected_sound_card, sample_rate); 113 | } 114 | } 115 | 116 | //add task for refilling buffer 117 | create_task(task_refill_sound_buffer, TASK_TYPE_PERIODIC_INTERRUPT, 10); 118 | } 119 | 120 | dword_t sound_get_actual_stream_position(void) { 121 | if(selected_sound_card!=NO_SOUND_CARD) { 122 | if(selected_sound_card_driver_type==SOUND_CARD_DRIVER_AC97) { 123 | return ac97_get_actual_stream_position(); 124 | } 125 | else if(selected_sound_card_driver_type==SOUND_CARD_DRIVER_HDA) { 126 | return hda_get_actual_stream_position(selected_sound_card); 127 | } 128 | } 129 | } 130 | 131 | void task_refill_sound_buffer(void) { 132 | // SOUND_BUFFER_0 starts at ((dword_t)pcm_data) and ends at ((dword_t)pcm_data + sound_buffer_refilling_info->buffer_size) 133 | // SOUND_BUFFER_1 starts at ((dword_t)pcm_data + sound_buffer_refilling_info->buffer_size) and ends at ((dword_t)pcm_data + sound_buffer_refilling_info->buffer_size + sound_buffer_refilling_info->buffer_size) 134 | // sound card plays memory from ((dword_t)pcm_data) with length (sound_buffer_refilling_info->buffer_size*2) in loop 135 | // so by reading actual stream position we can determine which buffer is sound card actually playing 136 | // fill_buffer(byte_t *memory) fills byte_t *memory with sound_buffer_refilling_info->buffer_size bytes of new PCM data and it also moves sound_buffer_refilling_info->source_data_pointer and sound_buffer_refilling_info->source_data_length 137 | 138 | //calculate how many bytes were played 139 | if(sound_buffer_refilling_info->actually_playing_buffer==SOUND_BUFFER_0) { 140 | if(sound_get_actual_stream_position()buffer_size) { 141 | sound_buffer_refilling_info->played_bytes = (sound_buffer_refilling_info->played_bytes_by_finished_buffers+sound_get_actual_stream_position()); 142 | } 143 | else { 144 | sound_buffer_refilling_info->played_bytes_by_finished_buffers += sound_buffer_refilling_info->buffer_size; 145 | sound_buffer_refilling_info->played_bytes = (sound_buffer_refilling_info->played_bytes_by_finished_buffers+sound_get_actual_stream_position()-sound_buffer_refilling_info->buffer_size); 146 | sound_buffer_refilling_info->actually_playing_buffer = SOUND_BUFFER_1; 147 | } 148 | } 149 | else { 150 | if(sound_get_actual_stream_position()>=sound_buffer_refilling_info->buffer_size) { 151 | sound_buffer_refilling_info->played_bytes = (sound_buffer_refilling_info->played_bytes_by_finished_buffers+sound_get_actual_stream_position()-sound_buffer_refilling_info->buffer_size); 152 | } 153 | else { 154 | sound_buffer_refilling_info->played_bytes_by_finished_buffers += sound_buffer_refilling_info->buffer_size; 155 | sound_buffer_refilling_info->played_bytes = (sound_buffer_refilling_info->played_bytes_by_finished_buffers+sound_get_actual_stream_position()); 156 | sound_buffer_refilling_info->actually_playing_buffer = SOUND_BUFFER_0; 157 | } 158 | } 159 | 160 | //if is everything played, stop sound 161 | if(sound_buffer_refilling_info->played_bytes>=sound_buffer_refilling_info->size_of_full_pcm_output_in_bytes) { 162 | stop_sound(); 163 | sound_buffer_refilling_info->played_bytes = sound_buffer_refilling_info->size_of_full_pcm_output_in_bytes; 164 | } 165 | 166 | //update values of actually played audio file 167 | audio_calculate_time_of_sound_data_offset(actually_played_audio_file, actually_played_audio_file->offset_to_start_of_playing+sound_buffer_refilling_info->played_bytes); 168 | 169 | //fill buffer with new data 170 | if(sound_buffer_refilling_info->actually_playing_buffer==sound_buffer_refilling_info->last_filled_buffer) { 171 | if(sound_buffer_refilling_info->last_filled_buffer==SOUND_BUFFER_0) { 172 | sound_buffer_refilling_info->fill_buffer((byte_t *)((dword_t)pcm_data+sound_buffer_refilling_info->buffer_size)); 173 | sound_buffer_refilling_info->last_filled_buffer = SOUND_BUFFER_1; 174 | } 175 | else { 176 | sound_buffer_refilling_info->fill_buffer(pcm_data); 177 | sound_buffer_refilling_info->last_filled_buffer = SOUND_BUFFER_0; 178 | } 179 | asm("wbinvd"); //flush processor cache to RAM to be sure sound card will read correct data 180 | } 181 | } 182 | 183 | void stop_sound(void) { 184 | if(selected_sound_card!=NO_SOUND_CARD) { 185 | destroy_task(task_refill_sound_buffer); 186 | 187 | if(selected_sound_card_driver_type==SOUND_CARD_DRIVER_AC97) { 188 | ac97_stop_sound(); 189 | } 190 | else if(selected_sound_card_driver_type==SOUND_CARD_DRIVER_HDA) { 191 | hda_stop_sound(selected_sound_card); 192 | } 193 | } 194 | } 195 | -------------------------------------------------------------------------------- /hdaudio.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | ** Copyright (c) 2025 HD Audio Driver Project. All Rights Reserved. 3 | ** 4 | ** Ported from BleskOS HD Audio Driver to Windows Driver Model 5 | ** 6 | ********************************************************************************/ 7 | 8 | #ifndef _HDAUDIO_H_ 9 | #define _HDAUDIO_H_ 10 | 11 | #include 12 | #include 13 | #include "debug.h" 14 | #include "shared.h" 15 | 16 | /***************************************************************************** 17 | * Defines for HD Audio 18 | *****************************************************************************/ 19 | 20 | // Maximum number of HDA sound cards supported 21 | #define MAX_NUMBER_OF_HDA_SOUND_CARDS 4 22 | 23 | // Communication types 24 | #define HDA_UNINITALIZED 0 25 | #define HDA_CORB_RIRB 1 26 | #define HDA_PIO 2 27 | 28 | // Widget types 29 | #define HDA_WIDGET_AUDIO_OUTPUT 0x0 30 | #define HDA_WIDGET_AUDIO_INPUT 0x1 31 | #define HDA_WIDGET_AUDIO_MIXER 0x2 32 | #define HDA_WIDGET_AUDIO_SELECTOR 0x3 33 | #define HDA_WIDGET_PIN_COMPLEX 0x4 34 | #define HDA_WIDGET_POWER_WIDGET 0x5 35 | #define HDA_WIDGET_VOLUME_KNOB 0x6 36 | #define HDA_WIDGET_BEEP_GENERATOR 0x7 37 | #define HDA_WIDGET_VENDOR_DEFINED 0xF 38 | 39 | // Pin definitions 40 | #define HDA_PIN_LINE_OUT 0x0 41 | #define HDA_PIN_SPEAKER 0x1 42 | #define HDA_PIN_HEADPHONE_OUT 0x2 43 | #define HDA_PIN_CD 0x3 44 | #define HDA_PIN_SPDIF_OUT 0x4 45 | #define HDA_PIN_DIGITAL_OTHER_OUT 0x5 46 | #define HDA_PIN_MODEM_LINE_SIDE 0x6 47 | #define HDA_PIN_MODEM_HANDSET_SIDE 0x7 48 | #define HDA_PIN_LINE_IN 0x8 49 | #define HDA_PIN_AUX 0x9 50 | #define HDA_PIN_MIC_IN 0xA 51 | #define HDA_PIN_TELEPHONY 0xB 52 | #define HDA_PIN_SPDIF_IN 0xC 53 | #define HDA_PIN_DIGITAL_OTHER_IN 0xD 54 | #define HDA_PIN_RESERVED 0xE 55 | #define HDA_PIN_OTHER 0xF 56 | 57 | // Node types 58 | #define HDA_OUTPUT_NODE 0x1 59 | #define HDA_INPUT_NODE 0x2 60 | 61 | /***************************************************************************** 62 | * HD Audio register definitions 63 | *****************************************************************************/ 64 | 65 | // HD Audio controller registers will be defined here 66 | // These would be ported from the BleskOS driver implementation 67 | 68 | /***************************************************************************** 69 | * Structures 70 | *****************************************************************************/ 71 | 72 | // PCI device info structure (WDM style) 73 | typedef struct _PCI_DEVICE_INFO { 74 | ULONG VendorId; 75 | ULONG DeviceId; 76 | ULONG BusNumber; 77 | ULONG DeviceFunction; 78 | PVOID MappedResources; 79 | } PCI_DEVICE_INFO, *PPCI_DEVICE_INFO; 80 | 81 | // HD Audio info structure (WDM style) 82 | typedef struct _HDA_DEVICE_EXTENSION { 83 | // PCI device information 84 | PCI_DEVICE_INFO PciInfo; 85 | 86 | // Base addresses and stream information 87 | ULONG Base; 88 | ULONG InputStreamBase; 89 | ULONG OutputStreamBase; 90 | ULONG CommunicationType; 91 | ULONG CodecNumber; 92 | ULONG IsInitalizedUsefulOutput; 93 | ULONG SelectedOutputNode; 94 | 95 | // CORB/RIRB buffers 96 | PULONG CorbMem; 97 | ULONG CorbPointer; 98 | ULONG CorbNumberOfEntries; 99 | PULONG RirbMem; 100 | ULONG RirbPointer; 101 | ULONG RirbNumberOfEntries; 102 | 103 | // Output buffer information 104 | PULONG OutputBufferList; 105 | ULONG SoundLength; 106 | ULONG BytesOnOutputForStoppingSound; 107 | ULONG LengthOfNodePath; 108 | 109 | // AFG (Audio Function Group) node capabilities 110 | ULONG AfgNodeSampleCapabilities; 111 | ULONG AfgNodeStreamFormatCapabilities; 112 | ULONG AfgNodeInputAmpCapabilities; 113 | ULONG AfgNodeOutputAmpCapabilities; 114 | 115 | // Audio output nodes 116 | ULONG AudioOutputNodeNumber; 117 | ULONG AudioOutputNodeSampleCapabilities; 118 | ULONG AudioOutputNodeStreamFormatCapabilities; 119 | 120 | ULONG OutputAmpNodeNumber; 121 | ULONG OutputAmpNodeCapabilities; 122 | 123 | // Secondary audio output nodes 124 | ULONG SecondAudioOutputNodeNumber; 125 | ULONG SecondAudioOutputNodeSampleCapabilities; 126 | ULONG SecondAudioOutputNodeStreamFormatCapabilities; 127 | ULONG SecondOutputAmpNodeNumber; 128 | ULONG SecondOutputAmpNodeCapabilities; 129 | 130 | // Pin nodes 131 | ULONG PinOutputNodeNumber; 132 | ULONG PinHeadphoneNodeNumber; 133 | 134 | // Resources 135 | PDEVICE_OBJECT PhysicalDeviceObject; 136 | PDEVICE_OBJECT FunctionalDeviceObject; 137 | PADAPTERCOMMON AdapterCommon; 138 | 139 | // Synchronization 140 | KSPIN_LOCK HardwareLock; 141 | 142 | // Current state information 143 | BOOLEAN PowerState; 144 | BOOLEAN HeadphoneConnected; 145 | 146 | // Selected card 147 | ULONG SelectedHdaCard; 148 | } HDA_DEVICE_EXTENSION, *PHDA_DEVICE_EXTENSION; 149 | 150 | /***************************************************************************** 151 | * Interface Definitions 152 | *****************************************************************************/ 153 | 154 | /***************************************************************************** 155 | * IHdaCodec 156 | ***************************************************************************** 157 | * Interface for HD Audio codec operations. 158 | */ 159 | DECLARE_INTERFACE_(IHdaCodec, IUnknown) 160 | { 161 | STDMETHOD_(NTSTATUS, Init) 162 | ( THIS_ 163 | IN PRESOURCELIST ResourceList, 164 | IN PDEVICE_OBJECT DeviceObject 165 | ) PURE; 166 | 167 | STDMETHOD_(NTSTATUS, SendVerb) 168 | ( THIS_ 169 | IN ULONG Codec, 170 | IN ULONG Node, 171 | IN ULONG Verb, 172 | IN ULONG Command, 173 | OUT PULONG Response 174 | ) PURE; 175 | 176 | STDMETHOD_(UCHAR, GetNodeType) 177 | ( THIS_ 178 | IN ULONG Codec, 179 | IN ULONG Node 180 | ) PURE; 181 | 182 | STDMETHOD_(USHORT, GetNodeConnectionEntry) 183 | ( THIS_ 184 | IN ULONG Codec, 185 | IN ULONG Node, 186 | IN ULONG ConnectionEntryNumber 187 | ) PURE; 188 | 189 | STDMETHOD_(NTSTATUS, SetNodeGain) 190 | ( THIS_ 191 | IN ULONG Codec, 192 | IN ULONG Node, 193 | IN ULONG NodeType, 194 | IN ULONG Capabilities, 195 | IN ULONG Gain 196 | ) PURE; 197 | 198 | STDMETHOD_(NTSTATUS, EnablePinOutput) 199 | ( THIS_ 200 | IN ULONG Codec, 201 | IN ULONG PinNode 202 | ) PURE; 203 | 204 | STDMETHOD_(NTSTATUS, DisablePinOutput) 205 | ( THIS_ 206 | IN ULONG Codec, 207 | IN ULONG PinNode 208 | ) PURE; 209 | 210 | STDMETHOD_(BOOLEAN, IsHeadphoneConnected) 211 | ( THIS_ 212 | void 213 | ) PURE; 214 | 215 | STDMETHOD_(NTSTATUS, InitializeCodec) 216 | ( THIS_ 217 | IN ULONG SoundCardNumber, 218 | IN ULONG CodecNumber 219 | ) PURE; 220 | 221 | STDMETHOD_(NTSTATUS, InitializeAudioFunctionGroup) 222 | ( THIS_ 223 | IN ULONG SoundCardNumber, 224 | IN ULONG AfgNodeNumber 225 | ) PURE; 226 | 227 | STDMETHOD_(NTSTATUS, InitializeOutputPin) 228 | ( THIS_ 229 | IN ULONG SoundCardNumber, 230 | IN ULONG PinNodeNumber 231 | ) PURE; 232 | 233 | STDMETHOD_(NTSTATUS, InitializeAudioOutput) 234 | ( THIS_ 235 | IN ULONG SoundCardNumber, 236 | IN ULONG AudioOutputNodeNumber 237 | ) PURE; 238 | 239 | STDMETHOD_(NTSTATUS, SetVolume) 240 | ( THIS_ 241 | IN ULONG SoundCardNumber, 242 | IN ULONG Volume 243 | ) PURE; 244 | 245 | STDMETHOD_(NTSTATUS, CheckHeadphoneConnectionChange) 246 | ( THIS_ 247 | void 248 | ) PURE; 249 | 250 | STDMETHOD_(BOOLEAN, IsSupportedChannelSize) 251 | ( THIS_ 252 | IN ULONG SoundCardNumber, 253 | IN UCHAR Size 254 | ) PURE; 255 | 256 | STDMETHOD_(BOOLEAN, IsSupportedSampleRate) 257 | ( THIS_ 258 | IN ULONG SoundCardNumber, 259 | IN ULONG SampleRate 260 | ) PURE; 261 | 262 | STDMETHOD_(USHORT, GetSoundDataFormat) 263 | ( THIS_ 264 | IN ULONG SampleRate, 265 | IN ULONG Channels, 266 | IN ULONG BitsPerSample 267 | ) PURE; 268 | 269 | STDMETHOD_(NTSTATUS, PlayPcmDataInLoop) 270 | ( THIS_ 271 | IN ULONG SoundCardNumber, 272 | IN ULONG SampleRate 273 | ) PURE; 274 | 275 | STDMETHOD_(NTSTATUS, StopSound) 276 | ( THIS_ 277 | IN ULONG SoundCardNumber 278 | ) PURE; 279 | 280 | STDMETHOD_(ULONG, GetActualStreamPosition) 281 | ( THIS_ 282 | IN ULONG SoundCardNumber 283 | ) PURE; 284 | }; 285 | 286 | typedef IHdaCodec *PHDACODEC; 287 | 288 | /***************************************************************************** 289 | * Function Prototypes 290 | *****************************************************************************/ 291 | 292 | /***************************************************************************** 293 | * NewHdaCodec() 294 | ***************************************************************************** 295 | * Create a new HD Audio codec object. 296 | */ 297 | NTSTATUS NewHdaCodec 298 | ( 299 | OUT PUNKNOWN * Unknown, 300 | IN REFCLSID, 301 | IN PUNKNOWN UnknownOuter OPTIONAL, 302 | IN POOL_TYPE PoolType 303 | ); 304 | 305 | /***************************************************************************** 306 | * NewAdapterHda() 307 | ***************************************************************************** 308 | * Create a new HD Audio adapter object. 309 | */ 310 | NTSTATUS NewAdapterHda 311 | ( 312 | OUT PUNKNOWN * Unknown, 313 | IN REFCLSID, 314 | IN PUNKNOWN UnknownOuter OPTIONAL, 315 | IN POOL_TYPE PoolType 316 | ); 317 | 318 | /***************************************************************************** 319 | * CreateMiniportWaveHda() 320 | ***************************************************************************** 321 | * Create a new HD Audio wave miniport. 322 | */ 323 | NTSTATUS CreateMiniportWaveHda 324 | ( 325 | OUT PUNKNOWN * Unknown, 326 | IN REFCLSID, 327 | IN PUNKNOWN UnknownOuter OPTIONAL, 328 | IN POOL_TYPE PoolType 329 | ); 330 | 331 | /***************************************************************************** 332 | * CreateMiniportTopologyHda() 333 | ***************************************************************************** 334 | * Create a new HD Audio topology miniport. 335 | */ 336 | NTSTATUS CreateMiniportTopologyHda 337 | ( 338 | OUT PUNKNOWN * Unknown, 339 | IN REFCLSID, 340 | IN PUNKNOWN UnknownOuter OPTIONAL, 341 | IN POOL_TYPE PoolType 342 | ); 343 | 344 | /***************************************************************************** 345 | * Interface GUIDs 346 | *****************************************************************************/ 347 | 348 | // {D7581D51-4220-4D65-8270-A83A96C7985E} 349 | DEFINE_GUID(IID_IHdaCodec, 350 | 0xd7581d51, 0x4220, 0x4d65, 0x82, 0x70, 0xa8, 0x3a, 0x96, 0xc7, 0x98, 0x5e); 351 | 352 | #endif // _HDAUDIO_H_ 353 | 354 | -------------------------------------------------------------------------------- /common.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * common.h - Common code used by all the HDA miniports. 3 | ***************************************************************************** 4 | * Copyright (c) 1997-1999 Microsoft Corporation. All Rights Reserved. 5 | * 6 | * A combination of random functions that are used by all the miniports. 7 | * This class also handles all the interrupts for the card. 8 | * 9 | */ 10 | 11 | /* 12 | * THIS IS A BIT BROKEN FOR NOW. IT USES A SINGLETON OBJECT FOR WHICH THERE 13 | * IS ONLY ONE INSTANCE PER DRIVER. THIS MEANS THERE CAN ONLY ONE CARD 14 | * SUPPORTED IN ANY GIVEN MACHINE. THIS WILL BE FIXED. 15 | */ 16 | 17 | #ifndef _COMMON_H_ 18 | #define _COMMON_H_ 19 | 20 | #define PC_NEW_NAMES 1 21 | 22 | #include "portcls.h" 23 | #include "DMusicKS.h" 24 | 25 | //get all debug prints 26 | #define DEBUG_LEVEL DEBUGLVL_VERBOSE 27 | #include "ksdebug.h" 28 | #include "debug.h" 29 | 30 | 31 | 32 | 33 | 34 | /***************************************************************************** 35 | * Constants 36 | */ 37 | 38 | // 39 | // DSP/DMA constants 40 | // 41 | #define MAXLEN_DMA_BUFFER 0x20000 //128k 42 | 43 | #define DSP_REG_CMSD0 0x00 44 | #define DSP_REG_CMSR0 0x01 45 | #define DSP_REG_CMSD1 0x02 46 | #define DSP_REG_CMSR1 0x03 47 | #define DSP_REG_MIXREG 0x04 48 | #define DSP_REG_MIXDATA 0x05 49 | #define DSP_REG_RESET 0x06 50 | #define DSP_REG_FMD0 0x08 51 | #define DSP_REG_FMR0 0x09 52 | #define DSP_REG_READ 0x0A 53 | #define DSP_REG_WRITE 0x0C 54 | #define DSP_REG_DATAAVAIL 0x0E 55 | 56 | #define DSP_REG_ACK8BIT 0x0E 57 | #define DSP_REG_ACK16BIT 0x0F 58 | 59 | // 60 | // controller commands 61 | // 62 | #define DSP_CMD_WAVEWRPIO 0x10 // wave output (programmed I/O) 63 | #define DSP_CMD_WAVEWR 0x14 // interrupt-driven 8 bit linear wave output 64 | #define DSP_CMD_WAVEWRA 0x1C // auto mode 8 bit out 65 | #define DSP_CMD_WAVERD 0x24 // interrupt-driven 8 bit linear wave input 66 | #define DSP_CMD_WAVERDA 0x2C // auto mode 8 bit in 67 | #define DSP_CMD_WAVEWRHS 0x90 // high speed mode write 68 | #define DSP_CMD_WAVERDHS 0x98 // high speed mode read 69 | #define DSP_CMD_SETSAMPRATE 0x40 // set sample rate 70 | #define DSP_CMD_SETBLCKSIZE 0x48 // set block size 71 | #define DSP_CMD_SPKRON 0xD1 // speaker on 72 | #define DSP_CMD_SPKROFF 0xD3 // speaker off 73 | #define DSP_CMD_SPKRSTATUS 0xD8 // speaker status (0=off, FF=on) 74 | #define DSP_CMD_PAUSEDMA 0xD0 // pause DMA 75 | #define DSP_CMD_CONTDMA 0xD4 // continue DMA 76 | #define DSP_CMD_HALTAUTODMA 0xDA // stop DMA autoinit mode 77 | #define DSP_CMD_INVERTER 0xE0 // byte inverter 78 | #define DSP_CMD_GETDSPVER 0xE1 // get dsp version 79 | #define DSP_CMD_GENERATEINT 0xF2 // cause sndblst to generate an interrupt. 80 | 81 | // 82 | // SB-16 support 83 | // 84 | #define DSP_CMD_SETDACRATE 0x41 // set SBPro-16 DAC rate 85 | #define DSP_CMD_SETADCRATE 0x42 // set SBPro-16 ADC rate 86 | #define DSP_CMD_STARTDAC16 0xB6 // start 16-bit DAC 87 | #define DSP_CMD_STARTADC16 0xBE // start 16-bit ADC 88 | #define DSP_CMD_STARTDAC8 0xC6 // start 8-bit DAC 89 | #define DSP_CMD_STARTADC8 0xCE // start 8-bit ADC 90 | #define DSP_CMD_PAUSEDMA16 0xD5 // pause 16-bit DMA 91 | #define DSP_CMD_CONTDMA16 0xD6 // continue 16-bit DMA 92 | #define DSP_CMD_HALTAUTODMA16 0xD9 // halt 16-bit DMA 93 | 94 | // 95 | // Indexed mixer registers 96 | // 97 | #define DSP_MIX_DATARESETIDX 0x00 98 | 99 | #define DSP_MIX_MASTERVOLIDX_L 0x00 100 | #define DSP_MIX_MASTERVOLIDX_R 0x01 101 | #define DSP_MIX_VOICEVOLIDX_L 0x02 102 | #define DSP_MIX_VOICEVOLIDX_R 0x03 103 | #define DSP_MIX_FMVOLIDX_L 0x04 104 | #define DSP_MIX_FMVOLIDX_R 0x05 105 | #define DSP_MIX_CDVOLIDX_L 0x06 106 | #define DSP_MIX_CDVOLIDX_R 0x07 107 | #define DSP_MIX_LINEVOLIDX_L 0x08 108 | #define DSP_MIX_LINEVOLIDX_R 0x09 109 | #define DSP_MIX_MICVOLIDX 0x0A 110 | #define DSP_MIX_SPKRVOLIDX 0x0B 111 | #define DSP_MIX_OUTMIXIDX 0x0C 112 | #define DSP_MIX_ADCMIXIDX_L 0x0D 113 | #define DSP_MIX_ADCMIXIDX_R 0x0E 114 | #define DSP_MIX_INGAINIDX_L 0x0F 115 | #define DSP_MIX_INGAINIDX_R 0x10 116 | #define DSP_MIX_OUTGAINIDX_L 0x11 117 | #define DSP_MIX_OUTGAINIDX_R 0x12 118 | #define DSP_MIX_AGCIDX 0x13 119 | #define DSP_MIX_TREBLEIDX_L 0x14 120 | #define DSP_MIX_TREBLEIDX_R 0x15 121 | #define DSP_MIX_BASSIDX_L 0x16 122 | #define DSP_MIX_BASSIDX_R 0x17 123 | 124 | #define DSP_MIX_BASEIDX 0x30 125 | #define DSP_MIX_MAXREGS (DSP_MIX_BASSIDX_R + 1) 126 | 127 | #define DSP_MIX_IRQCONFIG 0x80 128 | #define DSP_MIX_DMACONFIG 0x81 129 | 130 | // 131 | // Bit layout for DSP_MIX_OUTMIXIDX. 132 | // 133 | #define MIXBIT_MIC_LINEOUT 0 134 | #define MIXBIT_CD_LINEOUT_R 1 135 | #define MIXBIT_CD_LINEOUT_L 2 136 | #define MIXBIT_LINEIN_LINEOUT_R 3 137 | #define MIXBIT_LINEIN_LINEOUT_L 4 138 | 139 | // 140 | // Bit layout for DSP_MIX_ADCMIXIDX_L and DSP_MIX_ADCMIXIDX_R. 141 | // 142 | #define MIXBIT_MIC_WAVEIN 0 143 | #define MIXBIT_CD_WAVEIN_R 1 144 | #define MIXBIT_CD_WAVEIN_L 2 145 | #define MIXBIT_LINEIN_WAVEIN_R 3 146 | #define MIXBIT_LINEIN_WAVEIN_L 4 147 | #define MIXBIT_SYNTH_WAVEIN_R 5 148 | #define MIXBIT_SYNTH_WAVEIN_L 6 149 | 150 | // 151 | // Bit layout for MIXREG_MIC_AGC 152 | // 153 | #define MIXBIT_MIC_AGC 0 154 | 155 | // 156 | // MPU401 ports 157 | // 158 | #define MPU401_REG_STATUS 0x01 // Status register 159 | #define MPU401_DRR 0x40 // Output ready (for command or data) 160 | #define MPU401_DSR 0x80 // Input ready (for data) 161 | 162 | #define MPU401_REG_DATA 0x00 // Data in 163 | #define MPU401_REG_COMMAND 0x01 // Commands 164 | #define MPU401_CMD_RESET 0xFF // Reset command 165 | #define MPU401_CMD_UART 0x3F // Switch to UART mod 166 | 167 | /***************************************************************************** 168 | * Defines for HD Audio 169 | *****************************************************************************/ 170 | 171 | // Communication types 172 | #define HDA_UNINITIALIZED 0 173 | #define HDA_CORB_RIRB 1 174 | #define HDA_PIO 2 175 | 176 | // Widget types 177 | #define HDA_WIDGET_AUDIO_OUTPUT 0x0 178 | #define HDA_WIDGET_AUDIO_INPUT 0x1 179 | #define HDA_WIDGET_AUDIO_MIXER 0x2 180 | #define HDA_WIDGET_AUDIO_SELECTOR 0x3 181 | #define HDA_WIDGET_PIN_COMPLEX 0x4 182 | #define HDA_WIDGET_POWER_WIDGET 0x5 183 | #define HDA_WIDGET_VOLUME_KNOB 0x6 184 | #define HDA_WIDGET_BEEP_GENERATOR 0x7 185 | #define HDA_WIDGET_VENDOR_DEFINED 0xF 186 | 187 | // Pin definitions 188 | #define HDA_PIN_LINE_OUT 0x0 189 | #define HDA_PIN_SPEAKER 0x1 190 | #define HDA_PIN_HEADPHONE_OUT 0x2 191 | #define HDA_PIN_CD 0x3 192 | #define HDA_PIN_SPDIF_OUT 0x4 193 | #define HDA_PIN_DIGITAL_OTHER_OUT 0x5 194 | #define HDA_PIN_MODEM_LINE_SIDE 0x6 195 | #define HDA_PIN_MODEM_HANDSET_SIDE 0x7 196 | #define HDA_PIN_LINE_IN 0x8 197 | #define HDA_PIN_AUX 0x9 198 | #define HDA_PIN_MIC_IN 0xA 199 | #define HDA_PIN_TELEPHONY 0xB 200 | #define HDA_PIN_SPDIF_IN 0xC 201 | #define HDA_PIN_DIGITAL_OTHER_IN 0xD 202 | #define HDA_PIN_RESERVED 0xE 203 | #define HDA_PIN_OTHER 0xF 204 | #define HDA_STREAMBASE(n) ((0x80+(0x20*n))) 205 | #define SDCTL_RUN 0x2 206 | #define SDCTL_IE 0x10 207 | 208 | // Node types 209 | #define HDA_OUTPUT_NODE 0x1 210 | #define HDA_INPUT_NODE 0x2 211 | 212 | /* PCI space */ 213 | #define HDA_PCIREG_TCSEL 0x44 214 | 215 | //Defines for Intel SCH HDA snoop control 216 | #define INTEL_SCH_HDA_DEVC 0x78 217 | #define INTEL_SCH_HDA_DEVC_NOSNOOP (1<<11) 218 | 219 | /* Defines for ATI HD Audio support in SB450 south bridge */ 220 | #define ATI_SB450_HDAUDIO_MISC_CNTR2_ADDR 0x42 221 | #define ATI_SB450_HDAUDIO_ENABLE_SNOOP 0x02 222 | 223 | /* Defines for Nvidia HDA support */ 224 | #define NVIDIA_HDA_TRANSREG_ADDR 0x4e 225 | #define NVIDIA_HDA_ENABLE_COHBITS 0x0f 226 | 227 | typedef struct 228 | { 229 | PWCHAR KeyName; 230 | BYTE RegisterIndex; 231 | BYTE RegisterSetting; 232 | } MIXERSETTING,*PMIXERSETTING; 233 | 234 | typedef enum _HDA_INTERRUPT_TYPE 235 | { 236 | HDAINT_NONE = 0, // IRQ not for us (no status bits set) 237 | 238 | /* Controller-level interrupts (GCTL/INTSTS) */ 239 | HDAINT_CONTROLLER, // Non-stream controller event 240 | 241 | /* Stream-related interrupts */ 242 | HDAINT_STREAM, // One or more streams signaled 243 | HDAINT_STREAM_ERROR, 244 | 245 | /* Fatal / reset conditions */ 246 | HDAINT_FATAL // Controller halted or unrecoverable error 247 | } HDA_INTERRUPT_TYPE; 248 | 249 | DEFINE_GUID(IID_IAdapterCommon, 250 | 0x7eda2950, 0xbf9f, 0x11d0, 0x87, 0x1f, 0x0, 0xa0, 0xc9, 0x11, 0xb5, 0x44); 251 | 252 | /***************************************************************************** 253 | * IAdapterCommon 254 | ***************************************************************************** 255 | * Interface for adapter common object. 256 | */ 257 | DECLARE_INTERFACE_(IAdapterCommon,IUnknown) 258 | { 259 | STDMETHOD_(NTSTATUS,Init) 260 | ( THIS_ 261 | IN PRESOURCELIST ResourceList, 262 | IN PDEVICE_OBJECT DeviceObject 263 | ) PURE; 264 | 265 | STDMETHOD_(PINTERRUPTSYNC,GetInterruptSync) 266 | ( THIS 267 | ) PURE; 268 | 269 | STDMETHOD_(PUNKNOWN *,WavePortDriverDest) 270 | ( THIS 271 | ) PURE; 272 | 273 | STDMETHOD_(PUNKNOWN *,MidiPortDriverDest) 274 | ( THIS 275 | ) PURE; 276 | 277 | STDMETHOD_(void,SetWaveServiceGroup) 278 | ( THIS_ 279 | IN PSERVICEGROUP ServiceGroup 280 | ) PURE; 281 | 282 | STDMETHOD_(BYTE,ReadController) 283 | ( THIS 284 | ) PURE; 285 | 286 | STDMETHOD_(BOOLEAN,WriteController) 287 | ( THIS_ 288 | IN BYTE Value 289 | ) PURE; 290 | 291 | STDMETHOD_(NTSTATUS,ResetController) 292 | ( THIS 293 | ) PURE; 294 | 295 | STDMETHOD_(NTSTATUS,ProgramSampleRate) 296 | ( THIS_ 297 | IN DWORD dwSampleRate 298 | ) PURE; 299 | 300 | STDMETHOD_(void,hda_start_sound) 301 | ( THIS 302 | ) PURE; 303 | 304 | STDMETHOD_(void,hda_stop_sound) 305 | ( THIS 306 | ) PURE; 307 | 308 | STDMETHOD_(NTSTATUS,hda_stop_stream) 309 | ( THIS 310 | ) PURE; 311 | 312 | STDMETHOD_(ULONG,hda_get_actual_stream_position) 313 | ( THIS 314 | ) PURE; 315 | 316 | STDMETHOD_(NTSTATUS,hda_showtime) 317 | ( THIS_ 318 | IN PDMACHANNEL DmaChannel 319 | ) PURE; 320 | 321 | STDMETHOD_(void,MixerRegWrite) 322 | ( THIS_ 323 | IN BYTE Index, 324 | IN BYTE Value 325 | ) PURE; 326 | 327 | STDMETHOD_(BYTE,MixerRegRead) 328 | ( THIS_ 329 | IN BYTE Index 330 | ) PURE; 331 | 332 | STDMETHOD_(void,MixerReset) 333 | ( THIS 334 | ) PURE; 335 | 336 | STDMETHOD(RestoreMixerSettingsFromRegistry) 337 | ( THIS 338 | ) PURE; 339 | 340 | STDMETHOD(SaveMixerSettingsToRegistry) 341 | ( THIS 342 | ) PURE; 343 | }; 344 | 345 | typedef IAdapterCommon *PADAPTERCOMMON; 346 | 347 | /***************************************************************************** 348 | * NewAdapterCommon() 349 | ***************************************************************************** 350 | * Create a new adapter common object. 351 | */ 352 | NTSTATUS 353 | NewAdapterCommon 354 | ( 355 | OUT PUNKNOWN * Unknown, 356 | IN REFCLSID, 357 | IN PUNKNOWN UnknownOuter OPTIONAL, 358 | IN POOL_TYPE PoolType 359 | ); 360 | 361 | #endif //_COMMON_H_ 362 | -------------------------------------------------------------------------------- /HDA.inf: -------------------------------------------------------------------------------- 1 | ;Drew Does what Intel idn't 2 | ; 3 | ; Module Name: 4 | ; HDA.INF 5 | ; 6 | ; Abstract: 7 | ; INF file for installing HDA Sample Driver 8 | 9 | [Version] 10 | Signature="$CHICAGO$" 11 | Class=MEDIA 12 | ClassGUID={4d36e96c-e325-11ce-bfc1-08002be10318} 13 | provider=%MSFT% 14 | DriverVer=12/13/2025,5.00.2195.1 15 | 16 | ;You must specify which platform is supported by each SourceDisksNames section 17 | ;Valid platform identifiers include .x86, .ia64, .alpha, .axp64 18 | [SourceDisksNames.x86] 19 | 222=%DiskDescription%,,, 20 | 21 | ;You must also specify which platform is supported by each SourceDisksFiles section 22 | ;Valid platform identifiers include .x86, .ia64, .alpha, .axp64 23 | [SourceDisksFiles.x86] 24 | HDA.sys=222 25 | 26 | [Manufacturer] 27 | %CLMfgName%=Creative 28 | 29 | ;; 30 | ;; Mechanism for excluding drivers from the "Add New Hardware" list. 31 | ;; 32 | [ControlFlags] 33 | ;;ExcludeFromSelect = *CTL0001 34 | ;;ExcludeFromSelect = *CTL0031 35 | ;;ExcludeFromSelect = *CTL0041 36 | ;;ExcludeFromSelect = *CTL0042 37 | ;;ExcludeFromSelect = *CTL0043 38 | ;;ExcludeFromSelect = *CTL0044 39 | ;;ExcludeFromSelect = *CTL0045 40 | ;;ExcludeFromSelect = *CTL0046 41 | ;;ExcludeFromSelect = *CTL0047 42 | ExcludeFromSelect = *CTL0051 43 | ExcludeFromSelect = *CTL7FFF 44 | 45 | ;; *EXCLUDE is a made up ID to prevent rank 1 drivers from showing in list. 46 | ExcludeFromSelect = *EXCLUDE 47 | 48 | ;; HDA miniport 49 | [Creative] 50 | %*WDMPNPB003.DeviceDesc%=WDMPNPB003_Device, , *PNPB003 51 | ;Generic PCI class. use at your own risk 52 | %*WDM_HDA.DeviceDesc%=WDM_HDA, , PCI\CC_0403 53 | %*CTL0051.DeviceDesc%=STUB_DEVICE, , *CTL0051 54 | %*CTL7FFF.DeviceDesc%=STUB_DEVICE, , *CTL7FFF 55 | %SBAWE_Virtual_Mpu.DeviceDesc%=STUB_DEVICE, , VIRTUAL\SBAWE-MPUEmulation 56 | 57 | [*PNPB003.Det] 58 | AddReg=PreCopySection 59 | 60 | [PreCopySection] 61 | HKR,,NoSetupUI,,1 62 | 63 | [STUB_DEVICE] 64 | 65 | ;; All the Creative PnP IDs, except CTL0043 66 | [WDM_HDA] 67 | AlsoInstall=ks.registration(ks.inf),wdmaudio.registration(wdmaudio.inf) 68 | CopyFiles=HDA.CopyList 69 | AddReg=WDM_HDA.AddReg 70 | 71 | ;; CTL0043 has FDMA enabled 72 | [WDM_HDA_FDMA] 73 | AlsoInstall=ks.registration(ks.inf),wdmaudio.registration(wdmaudio.inf),wdmaudio.fdma(wdmaudio.inf) 74 | CopyFiles=HDA.CopyList 75 | AddReg=WDM_HDA.AddReg 76 | 77 | ;; Non PnP HDA Device! 78 | [WDMPNPB003_Device] 79 | AlsoInstall=ks.registration(ks.inf),wdmaudio.registration(wdmaudio.inf) 80 | LogConfig=HDA.LC1,HDA.LC2,HDA.LC3,HDA.LC4,HDA.LC5,HDA.LC6,HDA.LC7,HDA.LC8 81 | CopyFiles=HDA.CopyList 82 | AddReg=WDM_HDA.AddReg 83 | 84 | [WDM_HDA.Interfaces] 85 | AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Wave%,WDM_HDA.Interface.Wave 86 | AddInterface=%KSCATEGORY_RENDER%,%KSNAME_Wave%,WDM_HDA.Interface.Wave 87 | AddInterface=%KSCATEGORY_CAPTURE%,%KSNAME_Wave%,WDM_HDA.Interface.Wave 88 | AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Topology%,WDM_HDA.Interface.Topology 89 | ;;AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_UART%,WDM.Interface.UART 90 | ;;AddInterface=%KSCATEGORY_RENDER%,%KSNAME_UART%,WDM.Interface.UART 91 | ;;AddInterface=%KSCATEGORY_CAPTURE%,%KSNAME_UART%,WDM.Interface.UART 92 | ;;AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_FMSynth%,WDM.Interface.FMSynth 93 | ;;AddInterface=%KSCATEGORY_RENDER%,%KSNAME_FMSynth%,WDM.Interface.FMSynth 94 | 95 | [WDMPNPB003_Device.Interfaces] 96 | AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Wave%,WDM_HDA.Interface.Wave 97 | AddInterface=%KSCATEGORY_RENDER%,%KSNAME_Wave%,WDM_HDA.Interface.Wave 98 | AddInterface=%KSCATEGORY_CAPTURE%,%KSNAME_Wave%,WDM_HDA.Interface.Wave 99 | AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Topology%,WDM_HDA.Interface.Topology 100 | AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_UART%,WDM.Interface.UART 101 | AddInterface=%KSCATEGORY_RENDER%,%KSNAME_UART%,WDM.Interface.UART 102 | AddInterface=%KSCATEGORY_CAPTURE%,%KSNAME_UART%,WDM.Interface.UART 103 | AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_FMSynth%,WDM.Interface.FMSynth 104 | AddInterface=%KSCATEGORY_RENDER%,%KSNAME_FMSynth%,WDM.Interface.FMSynth 105 | 106 | [WDM_HDA.Interface.Wave] 107 | AddReg=WDM_HDA.Interface.Wave.AddReg 108 | [WDM_HDA.Interface.Wave.AddReg] 109 | HKR,,CLSID,,%Proxy.CLSID% 110 | HKR,,FriendlyName,,%WDM_HDA.Wave.szPname% 111 | 112 | [WDM_HDA.Interface.Topology] 113 | AddReg=WDM_HDA.Interface.Topo.AddReg 114 | ;; warning!! must be "Topo" because "Topology" is too long 115 | [WDM_HDA.Interface.Topo.AddReg] 116 | HKR,,CLSID,,%Proxy.CLSID% 117 | HKR,,FriendlyName,,%WDM_HDA.Topology.szPname% 118 | 119 | [WDM.Interface.UART] 120 | AddReg=WDM.Interface.UART.AddReg 121 | [WDM.Interface.UART.AddReg] 122 | HKR,,CLSID,,%Proxy.CLSID% 123 | HKR,,FriendlyName,,%WDM.UART.szPname% 124 | 125 | [WDM.Interface.FMSynth] 126 | AddReg=WDM.Interface.FMSynth.AddReg 127 | [WDM.Interface.FMSynth.AddReg] 128 | HKR,,CLSID,,%Proxy.CLSID% 129 | HKR,,FriendlyName,,%WDM.FMSynth.szPname% 130 | 131 | [WDM_HDA.AddReg] 132 | HKR,,AssociatedFilters,,"wdmaud,swmidi,redbook" 133 | HKR,,Driver,,HDA.SYS 134 | HKR,,NTMPDriver,,"HDA.sys,sbemul.sys" 135 | 136 | HKR,Drivers,SubClasses,,"wave,midi,mixer" 137 | 138 | HKR,Drivers\wave\wdmaud.drv, Driver,,wdmaud.drv 139 | HKR,Drivers\midi\wdmaud.drv, Driver,,wdmaud.drv 140 | HKR,Drivers\mixer\wdmaud.drv,Driver,,wdmaud.drv 141 | 142 | HKR,Drivers\wave\wdmaud.drv,Description,,%*WDMPNPB003.DeviceDesc% 143 | HKR,Drivers\midi\wdmaud.drv,Description,,%WDM_MIDI% 144 | HKR,Drivers\mixer\wdmaud.drv,Description,,%*WDMPNPB003.DeviceDesc% 145 | 146 | [DestinationDirs] 147 | HDA.CopyList = 10,system32\drivers ; %SystemRoot%\system32\drivers 148 | 149 | [HDA.CopyList] 150 | HDA.sys 151 | 152 | [WDMPNPB003_Device.FactDef] 153 | ConfigPriority=NORMAL 154 | IOConfig=220-22F 155 | IOConfig=330-331 156 | IOConfig=388-38B 157 | IRQConfig=5 158 | DMAConfig=1 159 | DMAConfig=5 160 | 161 | 162 | [HDA.LC1] 163 | ConfigPriority=NORMAL 164 | IOConfig=220-22F , 240-24F , 260-26F , 280-28F 165 | IRQConfig=5 , 7 , 9 , 10 166 | DMAConfig=0 , 1 , 3 167 | DMAConfig=5 , 6 , 7 168 | 169 | [HDA.LC2] 170 | ConfigPriority=NORMAL 171 | IOConfig=220-22F , 240-24F , 260-26F , 280-28F 172 | IRQConfig=5 , 7 , 9 , 10 173 | DMAConfig=0 , 1 , 3 174 | 175 | [HDA.LC3] 176 | ConfigPriority=NORMAL 177 | IOConfig=220-22F , 240-24F , 260-26F , 280-28F 178 | IOConfig=388-38B 179 | IRQConfig=5 , 7 , 9 , 10 180 | DMAConfig=0 , 1 , 3 181 | DMAConfig=5 , 6 , 7 182 | 183 | [HDA.LC4] 184 | ConfigPriority=NORMAL 185 | IOConfig=220-22F , 240-24F , 260-26F , 280-28F 186 | IOConfig=388-38B 187 | IRQConfig=5 , 7 , 9 , 10 188 | DMAConfig=0 , 1 , 3 189 | 190 | [HDA.LC5] 191 | ConfigPriority=NORMAL 192 | IOConfig=220-22F , 240-24F , 260-26F , 280-28F 193 | IOConfig=330-331, 300-301 194 | IRQConfig=5 , 7 , 9 , 10 195 | DMAConfig=0 , 1 , 3 196 | DMAConfig=5 , 6 , 7 197 | 198 | [HDA.LC6] 199 | ConfigPriority=NORMAL 200 | IOConfig=220-22F , 240-24F , 260-26F , 280-28F 201 | IOConfig=330-331, 300-301 202 | IRQConfig=5 , 7 , 9 , 10 203 | DMAConfig=0 , 1 , 3 204 | 205 | [HDA.LC7] 206 | ConfigPriority=NORMAL 207 | IOConfig=220-22F , 240-24F , 260-26F , 280-28F 208 | IOConfig=330-331, 300-301 209 | IOConfig=388-38B 210 | IRQConfig=5 , 7 , 9 , 10 211 | DMAConfig=0 , 1 , 3 212 | DMAConfig=5 , 6 , 7 213 | 214 | [HDA.LC8] 215 | ConfigPriority=NORMAL 216 | IOConfig=220-22F , 240-24F , 260-26F , 280-28F 217 | IOConfig=330-331, 300-301 218 | IOConfig=388-38B 219 | IRQConfig=5 , 7 , 9 , 10 220 | DMAConfig=0 , 1 , 3 221 | 222 | ;;**************** NT Install **************** 223 | 224 | [STUB_DEVICE.NT] 225 | [STUB_DEVICE.NT.SERVICES] 226 | AddService=,0x2 227 | 228 | [WDM_HDA.NT] 229 | Include=ks.inf, wdmaudio.inf 230 | Needs=KS.Registration, WDMAUDIO.Registration 231 | CopyFiles=HDA.CopyList 232 | AddReg=WDM_HDA.AddReg 233 | 234 | [WDM_HDA.NT.Interfaces] 235 | AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Wave%,WDM_HDA.Interface.Wave 236 | AddInterface=%KSCATEGORY_RENDER%,%KSNAME_Wave%,WDM_HDA.Interface.Wave 237 | AddInterface=%KSCATEGORY_CAPTURE%,%KSNAME_Wave%,WDM_HDA.Interface.Wave 238 | AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Topology%,WDM_HDA.Interface.Topology 239 | ;;AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_UART%,WDM.Interface.UART 240 | ;;AddInterface=%KSCATEGORY_RENDER%,%KSNAME_UART%,WDM.Interface.UART 241 | ;;AddInterface=%KSCATEGORY_CAPTURE%,%KSNAME_UART%,WDM.Interface.UART 242 | ;;AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_FMSynth%,WDM.Interface.FMSynth 243 | ;;AddInterface=%KSCATEGORY_RENDER%,%KSNAME_FMSynth%,WDM.Interface.FMSynth 244 | 245 | [WDM_HDA.NT.Services] 246 | AddService = HDA, 0x00000002, sndblst_Service_Inst 247 | 248 | [WDM_HDA_FDMA.NT] 249 | Include=ks.inf, wdmaudio.inf 250 | Needs=KS.Registration, WDMAUDIO.Registration, WDMAUDIO.FDMA 251 | CopyFiles=HDA.CopyList 252 | AddReg=WDM_HDA.AddReg 253 | 254 | [WDM_HDA_FDMA.NT.Interfaces] 255 | AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Wave%,WDM_HDA.Interface.Wave 256 | AddInterface=%KSCATEGORY_RENDER%,%KSNAME_Wave%,WDM_HDA.Interface.Wave 257 | AddInterface=%KSCATEGORY_CAPTURE%,%KSNAME_Wave%,WDM_HDA.Interface.Wave 258 | AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Topology%,WDM_HDA.Interface.Topology 259 | AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_UART%,WDM.Interface.UART 260 | AddInterface=%KSCATEGORY_RENDER%,%KSNAME_UART%,WDM.Interface.UART 261 | AddInterface=%KSCATEGORY_CAPTURE%,%KSNAME_UART%,WDM.Interface.UART 262 | AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_FMSynth%,WDM.Interface.FMSynth 263 | AddInterface=%KSCATEGORY_RENDER%,%KSNAME_FMSynth%,WDM.Interface.FMSynth 264 | 265 | [WDM_HDA_FDMA.NT.Services] 266 | AddService = HDA, 0x00000002, sndblst_Service_Inst 267 | 268 | [WDMPNPB003_Device.NT] 269 | Include=ks.inf, wdmaudio.inf 270 | Needs=KS.Registration, WDMAUDIO.Registration 271 | LogConfig=HDA.LC1,HDA.LC2,HDA.LC3,HDA.LC4,HDA.LC5,HDA.LC6,HDA.LC7,HDA.LC8 272 | CopyFiles=HDA.CopyList 273 | AddReg=WDM_HDA.AddReg 274 | 275 | [WDMPNPB003_Device.NT.FactDef] 276 | ConfigPriority=NORMAL 277 | IOConfig=220-22F 278 | IOConfig=330-331 279 | IOConfig=388-38B 280 | IRQConfig=5 281 | DMAConfig=1 282 | DMAConfig=5 283 | 284 | [WDMPNPB003_Device.NT.Interfaces] 285 | AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Wave%,WDM_HDA.Interface.Wave 286 | AddInterface=%KSCATEGORY_RENDER%,%KSNAME_Wave%,WDM_HDA.Interface.Wave 287 | AddInterface=%KSCATEGORY_CAPTURE%,%KSNAME_Wave%,WDM_HDA.Interface.Wave 288 | AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Topology%,WDM_HDA.Interface.Topology 289 | AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_UART%,WDM.Interface.UART 290 | AddInterface=%KSCATEGORY_RENDER%,%KSNAME_UART%,WDM.Interface.UART 291 | AddInterface=%KSCATEGORY_CAPTURE%,%KSNAME_UART%,WDM.Interface.UART 292 | AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_FMSynth%,WDM.Interface.FMSynth 293 | AddInterface=%KSCATEGORY_RENDER%,%KSNAME_FMSynth%,WDM.Interface.FMSynth 294 | 295 | [WDMPNPB003_Device.NT.Services] 296 | AddService = HDA, 0x00000002, sndblst_Service_Inst 297 | 298 | [sndblst_Service_Inst] 299 | DisplayName = %sndblst.SvcDesc% 300 | ServiceType = 1 ; SERVICE_KERNEL_DRIVER 301 | StartType = 3 ; SERVICE_DEMAND_START 302 | ErrorControl = 1 ; SERVICE_ERROR_NORMAL 303 | ServiceBinary = %10%\system32\drivers\HDA.sys 304 | 305 | [Strings] 306 | MSFT="Microsoft" 307 | CLMfgName="Sirius Cybernetics Corp." 308 | DiskDescription="HD Audio WDM Sample Driver Disk" 309 | *WDMPNPB003.DeviceDesc="WDM Sample Driver for HD Audio" 310 | *WDM_HDA.DeviceDesc="WDM Sample Driver for HD Audio" 311 | *CTL0051.DeviceDesc = "WDM Sample Driver for 3D Stereo Enhancement Technology (inactive)" 312 | *CTL7FFF.DeviceDesc = "WDM Sample Driver for Plug and Play Device (Reserved) (inactive)" 313 | SBAWE_Virtual_Mpu.DeviceDesc="WDM Sample Driver for MPU401 Emulation (inactive)" 314 | WDM_HDA.Wave.szPname="HD Audio" 315 | WDM_HDA.Topology.szPname="HD Audio" 316 | 317 | MediaCategories="SYSTEM\CurrentControlSet\Control\MediaCategories" 318 | WDM_MIDI="WDM-based Device" 319 | 320 | ;;TODO: change these GUIDs or this will conflict with an actual Sound Blaster in the PC 321 | 322 | Proxy.CLSID= "{17CCA71B-ECD7-11D0-B908-00A0C9223196}" 323 | KSCATEGORY_AUDIO="{6994AD04-93EF-11D0-A3CC-00A0C9223196}" 324 | KSCATEGORY_RENDER="{65E8773E-8F56-11D0-A3B9-00A0C9223196}" 325 | KSCATEGORY_CAPTURE="{65E8773D-8F56-11D0-A3B9-00A0C9223196}" 326 | KSNAME_Wave="Wave" 327 | KSNAME_UART="UART" 328 | KSNAME_FMSynth="FMSynth" 329 | KSNAME_Topology="Topology" 330 | 331 | WDM.UART.szPname="HDA MPU-401" 332 | WDM.FMSynth.szPname="HDA FM Synthesizer" 333 | 334 | sndblst.SvcDesc = "WDM Sample Driver for HDA" 335 | 336 | -------------------------------------------------------------------------------- /BleskOS Sound Driver/ac97.c: -------------------------------------------------------------------------------- 1 | //BleskOS 2 | 3 | /* 4 | * MIT License 5 | * Copyright (c) 2023-2025 BleskOS developers 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 7 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 | */ 10 | 11 | void ac97_add_new_pci_device(struct pci_device_info_t device) { 12 | // check number of already connected cards 13 | if(components->n_ac97 >= MAX_NUMBER_OF_AC97_SOUND_CARDS) { 14 | return; 15 | } 16 | 17 | // log driver 18 | logf("%s", __FILE__); 19 | 20 | // save basic device informations 21 | copy_memory((dword_t)&device, (dword_t)&components->ac97[components->n_ac97].pci, sizeof(struct pci_device_info_t)); 22 | 23 | // read other device informations 24 | components->ac97[components->n_ac97].nam_base = pci_get_io(device, PCI_BAR0); 25 | components->ac97[components->n_ac97].nabm_base = pci_get_io(device, PCI_BAR1); 26 | 27 | // configure PCI 28 | pci_set_bits(device, 0x04, PCI_STATUS_BUSMASTERING | PCI_STATUS_IO); 29 | 30 | // update number of devices 31 | components->p_sound_card = 1; 32 | components->n_ac97++; 33 | } 34 | 35 | void initalize_ac97_sound_card(dword_t sound_card_number) { 36 | selected_ac97_card = sound_card_number; 37 | 38 | //log 39 | logf("\n\nDriver: AC97 Sound Card\nDevice: PCI bus %d:%d:%d:%d", 40 | components->ac97[selected_ac97_card].pci.segment, 41 | components->ac97[selected_ac97_card].pci.bus, 42 | components->ac97[selected_ac97_card].pci.device, 43 | components->ac97[selected_ac97_card].pci.function); 44 | 45 | //load base address of registers 46 | word_t ac97_nam_base = components->ac97[selected_ac97_card].nam_base; 47 | word_t ac97_nabm_base = components->ac97[selected_ac97_card].nabm_base; 48 | 49 | //resume from cold reset to normal operation and set 2 channels + 16 bit samples 50 | outd(ac97_nabm_base + AC97_NABM_IO_GLOBAL_CONTROL, (0b00<<22) | (0b00<<20) | (0<<2) | (1<<1)); 51 | wait(20); 52 | 53 | //reset all streams 54 | outb(ac97_nabm_base + AC97_NABM_IO_PCM_INPUT_CONTROL, 0x2); 55 | outb(ac97_nabm_base + AC97_NABM_IO_PCM_OUTPUT_CONTROL, 0x2); 56 | outb(ac97_nabm_base + AC97_NABM_IO_MICROPHONE_INPUT_CONTROL, 0x2); 57 | wait(20); 58 | 59 | //reset all NAM registers 60 | outw(ac97_nam_base + AC97_NAM_IO_RESET, 0xFF); 61 | 62 | //detect if there is headphone output 63 | if((inw(ac97_nam_base + AC97_NAM_IO_CAPABILITES) & AC97_CAPABILITY_HEADPHONE_OUTPUT) == AC97_CAPABILITY_HEADPHONE_OUTPUT 64 | && inw(ac97_nam_base + AC97_NAM_IO_AUX_OUT_VOLUME) == 0x8000) { 65 | logf("\nHeadphone output: Present"); 66 | components->ac97[selected_ac97_card].headphone_output_present = STATUS_TRUE; 67 | } 68 | 69 | //set max PCM output volume 70 | outw(ac97_nam_base + AC97_NAM_IO_PCM_OUT_VOLUME, 0x0); 71 | 72 | //allocate memory for buffer 73 | components->ac97[selected_ac97_card].buffer_memory_pointer = (struct ac97_buffer_entry_t *) (aligned_malloc(sizeof(struct ac97_buffer_entry_t)*32, 0xF)); 74 | 75 | //read extended capabilities 76 | components->ac97[selected_ac97_card].extended_capabilities = inw(ac97_nam_base + AC97_NAM_IO_EXTENDED_CAPABILITIES); 77 | if((components->ac97[selected_ac97_card].extended_capabilities & AC97_EXTENDED_CAPABILITY_VARIABLE_SAMPLE_RATE) == AC97_EXTENDED_CAPABILITY_VARIABLE_SAMPLE_RATE) { 78 | outw(ac97_nam_base + AC97_NAM_IO_EXTENDED_FEATURES_CONTROL, AC97_EXTENDED_CAPABILITY_VARIABLE_SAMPLE_RATE); //enable variable sample rate 79 | } 80 | 81 | //get number of AUX_OUT volume steps 82 | components->ac97[selected_ac97_card].aux_out_number_of_volume_steps = 31; 83 | outw(ac97_nam_base + AC97_NAM_IO_AUX_OUT_VOLUME, 0x2020); 84 | if((inw(ac97_nam_base + AC97_NAM_IO_AUX_OUT_VOLUME) & 0x2020)==0x2020) { 85 | components->ac97[selected_ac97_card].aux_out_number_of_volume_steps = 63; 86 | } 87 | 88 | //set output 89 | sound_volume = 0; 90 | if(ac97_is_headphone_connected()==STATUS_TRUE) { 91 | ac97_set_output(AC97_HEADPHONE_OUTPUT); 92 | } 93 | else { 94 | ac97_set_output(AC97_SPEAKER_OUTPUT); 95 | } 96 | 97 | //add task for checking headphone connection 98 | create_task(ac97_check_headphone_connection_change, TASK_TYPE_PERIODIC_INTERRUPT, 50); 99 | 100 | //log 101 | logf("\nCapabilities: 0x%04x", inw(ac97_nam_base + AC97_NAM_IO_CAPABILITES)); 102 | logf("\nExtended capabilities: 0x%04x", components->ac97[selected_ac97_card].extended_capabilities); 103 | } 104 | 105 | byte_t ac97_is_headphone_connected(void) { 106 | //JACK_SENSE port is not part of official specification, but it seems to be supported by cards 107 | if(components->ac97[selected_ac97_card].headphone_output_present==STATUS_TRUE 108 | && (inw(components->ac97[selected_ac97_card].nam_base + AC97_NAM_IO_JACK_SENSE) & 0x8)==0x8) { 109 | return STATUS_TRUE; 110 | } 111 | else { 112 | return STATUS_FALSE; 113 | } 114 | } 115 | 116 | void ac97_set_volume_in_register(dword_t offset, byte_t number_of_volume_steps, byte_t volume) { 117 | if(volume == 0) { 118 | outw(components->ac97[selected_ac97_card].nam_base + offset, 0x8000); //mute 119 | } 120 | else { 121 | volume = ((100-volume)*number_of_volume_steps/100); //recalculate 0-100 scale to register volume scale 122 | outw(components->ac97[selected_ac97_card].nam_base + offset, ((volume) | (volume<<8))); //set same volume for left and right 123 | } 124 | } 125 | 126 | void ac97_set_output(byte_t output) { 127 | if(output == AC97_SPEAKER_OUTPUT) { 128 | ac97_set_volume_in_register(AC97_NAM_IO_AUX_OUT_VOLUME, components->ac97[selected_ac97_card].aux_out_number_of_volume_steps, 0); 129 | ac97_set_volume_in_register(AC97_NAM_IO_MASTER_VOLUME, AC97_SPEAKER_OUTPUT_NUMBER_OF_VOLUME_STEPS, sound_volume); 130 | } 131 | else if(output == AC97_HEADPHONE_OUTPUT) { 132 | ac97_set_volume_in_register(AC97_NAM_IO_MASTER_VOLUME, components->ac97[selected_ac97_card].aux_out_number_of_volume_steps, 0); 133 | ac97_set_volume_in_register(AC97_NAM_IO_AUX_OUT_VOLUME, AC97_SPEAKER_OUTPUT_NUMBER_OF_VOLUME_STEPS, sound_volume); 134 | } 135 | else { 136 | return; 137 | } 138 | 139 | components->ac97[selected_ac97_card].selected_output = output; 140 | } 141 | 142 | void ac97_set_volume(byte_t volume) { 143 | if(components->ac97[selected_ac97_card].selected_output == AC97_SPEAKER_OUTPUT) { 144 | ac97_set_volume_in_register(AC97_NAM_IO_MASTER_VOLUME, components->ac97[selected_ac97_card].aux_out_number_of_volume_steps, volume); 145 | } 146 | else if(components->ac97[selected_ac97_card].selected_output == AC97_HEADPHONE_OUTPUT) { 147 | ac97_set_volume_in_register(AC97_NAM_IO_AUX_OUT_VOLUME, AC97_SPEAKER_OUTPUT_NUMBER_OF_VOLUME_STEPS, volume); 148 | } 149 | } 150 | 151 | byte_t ac97_is_supported_sample_rate(word_t sample_rate) { 152 | // 48000 sample rate is always supported 153 | if(sample_rate == 48000) { 154 | return STATUS_GOOD; 155 | } 156 | // check if variable sound rate feature is present 157 | else if((components->ac97[selected_ac97_card].extended_capabilities & AC97_EXTENDED_CAPABILITY_VARIABLE_SAMPLE_RATE) == AC97_EXTENDED_CAPABILITY_VARIABLE_SAMPLE_RATE) { 158 | // 44100 sample rate is always supported by variable sound rate feature 159 | if(sample_rate == 44100) { 160 | return STATUS_GOOD; 161 | } 162 | // other may or may not be supported, so we will check it 163 | else { 164 | //TODO: does this method always work? 165 | outw(components->ac97[selected_ac97_card].nam_base + AC97_NAM_IO_VARIABLE_SAMPLE_RATE_FRONT_DAC, sample_rate); 166 | if(inw(components->ac97[selected_ac97_card].nam_base + AC97_NAM_IO_VARIABLE_SAMPLE_RATE_FRONT_DAC) == sample_rate) { 167 | return STATUS_GOOD; 168 | } 169 | } 170 | } 171 | // this sample rate is not supported 172 | else { 173 | return STATUS_ERROR; 174 | } 175 | } 176 | 177 | void ac97_set_sample_rate(word_t sample_rate) { 178 | // check if variable sample rate feature is present 179 | if((components->ac97[selected_ac97_card].extended_capabilities & AC97_EXTENDED_CAPABILITY_VARIABLE_SAMPLE_RATE) == AC97_EXTENDED_CAPABILITY_VARIABLE_SAMPLE_RATE) { 180 | // set same variable rate on all outputs 181 | outw(components->ac97[selected_ac97_card].nam_base + AC97_NAM_IO_VARIABLE_SAMPLE_RATE_FRONT_DAC, sample_rate); 182 | outw(components->ac97[selected_ac97_card].nam_base + AC97_NAM_IO_VARIABLE_SAMPLE_RATE_SURR_DAC, sample_rate); 183 | outw(components->ac97[selected_ac97_card].nam_base + AC97_NAM_IO_VARIABLE_SAMPLE_RATE_LFE_DAC, sample_rate); 184 | outw(components->ac97[selected_ac97_card].nam_base + AC97_NAM_IO_VARIABLE_SAMPLE_RATE_LR_ADC, sample_rate); 185 | } 186 | } 187 | 188 | void ac97_check_headphone_connection_change(void) { 189 | if(components->ac97[selected_ac97_card].selected_output==AC97_SPEAKER_OUTPUT && ac97_is_headphone_connected()==STATUS_TRUE) { //headphone was connected 190 | ac97_set_output(AC97_HEADPHONE_OUTPUT); 191 | } 192 | else if(components->ac97[selected_ac97_card].selected_output==AC97_HEADPHONE_OUTPUT && ac97_is_headphone_connected()==STATUS_FALSE) { //headphone was disconnected 193 | ac97_set_output(AC97_SPEAKER_OUTPUT); 194 | } 195 | } 196 | 197 | void ac97_play_pcm_data_in_loop(dword_t sample_rate) { 198 | word_t ac97_nabm_base = components->ac97[selected_ac97_card].nabm_base; 199 | 200 | //stop sound 201 | outb(ac97_nabm_base + AC97_NABM_IO_PCM_OUTPUT_CONTROL, 0x0); 202 | 203 | //set sample rate 204 | ac97_set_sample_rate(sample_rate); 205 | 206 | //reset stream 207 | outb(ac97_nabm_base + AC97_NABM_IO_PCM_OUTPUT_CONTROL, 0x2); 208 | ticks = 0; 209 | while((inb(ac97_nabm_base + AC97_NABM_IO_PCM_OUTPUT_CONTROL) & 0x2)==0x2) { 210 | asm("nop"); 211 | if(ticks>50) { //stream was not reseted after 100 ms 212 | return; 213 | } 214 | } 215 | outb(ac97_nabm_base + AC97_NABM_IO_PCM_OUTPUT_CONTROL, 0x0); 216 | 217 | //clear buffer 218 | clear_memory((dword_t)components->ac97[selected_ac97_card].buffer_memory_pointer, (sizeof(struct ac97_buffer_entry_t)*32)); 219 | 220 | //set buffer address 221 | outd(ac97_nabm_base + AC97_NABM_IO_PCM_OUTPUT_BUFFER_BASE_ADDRESS, (dword_t)components->ac97[selected_ac97_card].buffer_memory_pointer); 222 | 223 | //fill buffer entries 224 | dword_t sound_memory = (dword_t) pcm_data; 225 | dword_t sound_length = (sound_buffer_refilling_info->buffer_size*2); 226 | for(dword_t i = 0; i < 32; i++) { 227 | if(sound_length > 0x2000*2) { 228 | components->ac97[selected_ac97_card].buffer_memory_pointer[i].sample_memory = sound_memory; 229 | components->ac97[selected_ac97_card].buffer_memory_pointer[i].number_of_samples = 0x2000; 230 | sound_memory += 0x2000*2; 231 | sound_length -= 0x2000*2; 232 | } 233 | else { 234 | components->ac97[selected_ac97_card].buffer_memory_pointer[i].sample_memory = sound_memory; 235 | components->ac97[selected_ac97_card].buffer_memory_pointer[i].number_of_samples = ((sound_length/2) & 0xFFFE); 236 | break; 237 | } 238 | } 239 | 240 | //clear status 241 | outw(ac97_nabm_base + AC97_NABM_IO_PCM_OUTPUT_STATUS, 0x1C); 242 | 243 | //start streaming 244 | outb(ac97_nabm_base + AC97_NABM_IO_PCM_OUTPUT_CONTROL, 0x1); 245 | 246 | //add task for playing buffer in loop 247 | create_task(task_ac97_play_buffer_in_loop, TASK_TYPE_PERIODIC_INTERRUPT, 1); 248 | } 249 | 250 | void task_ac97_play_buffer_in_loop(void) { 251 | //update Last Valid Entry register for all entries to be valid 252 | outb(components->ac97[selected_ac97_card].nabm_base + AC97_NABM_IO_PCM_OUTPUT_LAST_VALID_ENTRY, (inb(components->ac97[selected_ac97_card].nabm_base + AC97_NABM_IO_PCM_OUTPUT_CURRENTLY_PROCESSED_ENTRY)-1) & 0x1F); 253 | } 254 | 255 | dword_t ac97_get_actual_stream_position(void) { 256 | dword_t number_of_processed_bytes = 0; 257 | 258 | //add already played buffers 259 | for(dword_t i = 0; i < inb(components->ac97[selected_ac97_card].nabm_base + AC97_NABM_IO_PCM_OUTPUT_CURRENTLY_PROCESSED_ENTRY); i++) { 260 | number_of_processed_bytes += components->ac97[selected_ac97_card].buffer_memory_pointer[i].number_of_samples*2; 261 | } 262 | 263 | //add actual entry position 264 | number_of_processed_bytes += (components->ac97[selected_ac97_card].buffer_memory_pointer[inb(components->ac97[selected_ac97_card].nabm_base + AC97_NABM_IO_PCM_OUTPUT_CURRENTLY_PROCESSED_ENTRY)].number_of_samples*2 - inw(components->ac97[selected_ac97_card].nabm_base + AC97_NABM_IO_PCM_OUTPUT_CURRENT_ENTRY_POSITION)*2); 265 | 266 | return number_of_processed_bytes; 267 | } 268 | 269 | void ac97_stop_sound(void) { 270 | //stop streaming 271 | outb(components->ac97[selected_ac97_card].nabm_base + AC97_NABM_IO_PCM_OUTPUT_CONTROL, 0x0); 272 | 273 | //clear status 274 | outw(components->ac97[selected_ac97_card].nabm_base + AC97_NABM_IO_PCM_OUTPUT_STATUS, 0x1C); 275 | 276 | //destroy task for looping 277 | destroy_task(task_ac97_play_buffer_in_loop); 278 | } -------------------------------------------------------------------------------- /objfre/i386/HDA.map: -------------------------------------------------------------------------------- 1 | HDA 2 | 3 | Timestamp is 693e314e (Sat Dec 13 19:38:54 2025) 4 | 5 | Preferred load address is 00010000 6 | 7 | Start Length Name Class 8 | 0001:00000000 000014b0H .text CODE 9 | 0002:00000000 000000acH .idata$5 DATA 10 | 0002:000000b0 00000568H .rdata DATA 11 | 0003:00000000 00000cc8H .data DATA 12 | 0003:00000cc8 00000010H .bss DATA 13 | 0004:00000000 000037e5H PAGE CODE 14 | 0005:00000000 00000015H INIT CODE 15 | 0005:00000018 0000003cH .idata$2 CODE 16 | 0005:00000054 00000014H .idata$3 CODE 17 | 0005:00000068 000000acH .idata$4 CODE 18 | 0005:00000114 00000384H .idata$6 CODE 19 | 0006:00000000 00000058H .rsrc$01 DATA 20 | 0006:00000060 00000338H .rsrc$02 DATA 21 | 22 | Address Publics by Value Rva+Base Lib:Object 23 | 24 | 0001:00000000 ?QueryInterface@CAdapterCommon@@UAGJABU_GUID@@PAPAX@Z 000102e0 f i common.obj 25 | 0001:00000018 ?AddRef@CAdapterCommon@@UAGKXZ 000102f8 f i common.obj 26 | 0001:00000028 ?Release@CAdapterCommon@@UAGKXZ 00010308 f i common.obj 27 | 0001:00000038 ??_GCAdapterCommon@@UAEPAXI@Z 00010318 f i common.obj 28 | 0001:00000038 ??_ECAdapterCommon@@UAEPAXI@Z 00010318 f i common.obj 29 | 0001:00000058 ?hda_check_headphone_connection_change@CAdapterCommon@@QAGXXZ 00010338 f common.obj 30 | 0001:000000ce ?hda_is_supported_sample_rate@CAdapterCommon@@QAGEK@Z 000103ae f common.obj 31 | 0001:00000154 ?hda_send_verb@CAdapterCommon@@QAGKKKKK@Z 00010434 f common.obj 32 | 0001:000002b8 ?ReadController@CAdapterCommon@@UAGEXZ 00010598 f common.obj 33 | 0001:000002be ?WriteController@CAdapterCommon@@UAGEE@Z 0001059e f common.obj 34 | 0001:000002c4 ?MixerRegWrite@CAdapterCommon@@UAGXEE@Z 000105a4 f common.obj 35 | 0001:0000030c ?MixerRegRead@CAdapterCommon@@UAGEE@Z 000105ec f common.obj 36 | 0001:0000032a ?MixerReset@CAdapterCommon@@UAGXXZ 0001060a f common.obj 37 | 0001:00000338 ?AcknowledgeIRQ@CAdapterCommon@@AAE?AW4_HDA_INTERRUPT_TYPE@@XZ 00010618 f common.obj 38 | 0001:0000044c ?ResetController@CAdapterCommon@@UAGJXZ 0001072c f common.obj 39 | 0001:0000046c ?RestoreMixerSettingsFromRegistry@CAdapterCommon@@UAGJXZ 0001074c f common.obj 40 | 0001:000005ca ?SaveMixerSettingsToRegistry@CAdapterCommon@@UAGJXZ 000108aa f common.obj 41 | 0001:000006c6 ?ProgramSampleRate@CAdapterCommon@@UAGJK@Z 000109a6 f common.obj 42 | 0001:0000075c ?PowerChangeState@CAdapterCommon@@UAGXT_POWER_STATE@@@Z 00010a3c f common.obj 43 | 0001:000007ba ?QueryPowerChangeState@CAdapterCommon@@UAGJT_POWER_STATE@@@Z 00010a9a f common.obj 44 | 0001:000007ba ?QueryDeviceCapabilities@CAdapterCommon@@UAGJPAU_DEVICE_CAPABILITIES@@@Z 00010a9a f common.obj 45 | 0001:000007c0 ?InterruptServiceRoutine@@YGJPAUIInterruptSync@@PAX@Z 00010aa0 f common.obj 46 | 0001:000007f8 ?hda_stop_stream@CAdapterCommon@@UAGJXZ 00010ad8 f common.obj 47 | 0001:000008ee ?hda_start_sound@CAdapterCommon@@UAGXXZ 00010bce f common.obj 48 | 0001:00000916 ?hda_stop_sound@CAdapterCommon@@UAGXXZ 00010bf6 f common.obj 49 | 0001:0000095c ?hda_get_actual_stream_position@CAdapterCommon@@UAGKXZ 00010c3c f common.obj 50 | 0001:00000972 ?hda_set_volume@CAdapterCommon@@QAGXKE@Z 00010c52 f common.obj 51 | 0001:000009c8 ?readUCHAR@CAdapterCommon@@QAGEG@Z 00010ca8 f common.obj 52 | 0001:000009e0 ?writeUCHAR@CAdapterCommon@@QAGXGE@Z 00010cc0 f common.obj 53 | 0001:000009fc ?readUSHORT@CAdapterCommon@@QAGGG@Z 00010cdc f common.obj 54 | 0001:00000a14 ?writeUSHORT@CAdapterCommon@@QAGXGG@Z 00010cf4 f common.obj 55 | 0001:00000a30 ?readULONG@CAdapterCommon@@QAGKG@Z 00010d10 f common.obj 56 | 0001:00000a48 ?writeULONG@CAdapterCommon@@QAGXGK@Z 00010d28 f common.obj 57 | 0001:00000a64 ?hda_showtime@CAdapterCommon@@UAGJPAUIDmaChannel@@@Z 00010d44 f common.obj 58 | 0001:00000ba4 ?hda_return_sound_data_format@CAdapterCommon@@QAGGKKK@Z 00010e84 f common.obj 59 | 0001:00000c66 ?ReadWriteConfigSpace@CAdapterCommon@@AAGJPAU_DEVICE_OBJECT@@KPAXKK@Z 00010f46 f common.obj 60 | 0001:00000d0e ?WriteConfigSpaceByte@CAdapterCommon@@AAGJEEE@Z 00010fee f common.obj 61 | 0001:00000d44 ?WriteConfigSpaceWord@CAdapterCommon@@AAGJEGG@Z 00011024 f common.obj 62 | 0001:00000d7a ?QueryInterface@CAdapterCommon@@W3AGJABU_GUID@@PAPAX@Z 0001105a f i common.obj 63 | 0001:00000d84 ?AddRef@CAdapterCommon@@W3AGKXZ 00011064 f i common.obj 64 | 0001:00000d8e ?Release@CAdapterCommon@@W3AGKXZ 0001106e f i common.obj 65 | 0001:00000d98 ?AddRef@CMiniportWaveCyclicHDA@@UAGKXZ 00011078 f i mintopo.obj 66 | 0001:00000d98 ?AddRef@CMiniportWaveCyclicStreamHDA@@UAGKXZ 00011078 f i mintopo.obj 67 | 0001:00000d98 ?AddRef@CMiniportTopologyHDA@@UAGKXZ 00011078 f i mintopo.obj 68 | 0001:00000da8 ?Release@CMiniportWaveCyclicHDA@@UAGKXZ 00011088 f i mintopo.obj 69 | 0001:00000da8 ?Release@CMiniportWaveCyclicStreamHDA@@UAGKXZ 00011088 f i mintopo.obj 70 | 0001:00000da8 ?Release@CMiniportTopologyHDA@@UAGKXZ 00011088 f i mintopo.obj 71 | 0001:00000db8 ?DataRangeIntersection@CMiniportTopologyHDA@@UAGJKPATKSDATAFORMAT@@0KPAXPAK@Z 00011098 f i mintopo.obj 72 | 0001:00000dc0 ??_ECMiniportTopologyHDA@@UAEPAXI@Z 000110a0 f i mintopo.obj 73 | 0001:00000dc0 ??_GCMiniportTopologyHDA@@UAEPAXI@Z 000110a0 f i mintopo.obj 74 | 0001:000011be ?ReadBitsFromMixer@CMiniportTopologyHDA@@AAEEEEE@Z 0001149e f mintopo.obj 75 | 0001:000011e6 ?WriteBitsToMixer@CMiniportTopologyHDA@@AAEXEEEE@Z 000114c6 f mintopo.obj 76 | 0001:0000123c ??_GCMiniportWaveCyclicHDA@@UAEPAXI@Z 0001151c f i minwave.obj 77 | 0001:0000123c ??_ECMiniportWaveCyclicHDA@@UAEPAXI@Z 0001151c f i minwave.obj 78 | 0001:0000125c ?QueryInterface@CMiniportTopologyHDA@@UAGJABU_GUID@@PAPAX@Z 0001153c f i minwave.obj 79 | 0001:0000125c ?QueryInterface@CMiniportWaveCyclicStreamHDA@@UAGJABU_GUID@@PAPAX@Z 0001153c f i minwave.obj 80 | 0001:0000125c ?QueryInterface@CMiniportWaveCyclicHDA@@UAGJABU_GUID@@PAPAX@Z 0001153c f i minwave.obj 81 | 0001:00001274 ??_ECMiniportWaveCyclicStreamHDA@@UAEPAXI@Z 00011554 f i minwave.obj 82 | 0001:00001274 ??_GCMiniportWaveCyclicStreamHDA@@UAEPAXI@Z 00011554 f i minwave.obj 83 | 0001:00001294 ?GetPosition@CMiniportWaveCyclicStreamHDA@@UAGJPAK@Z 00011574 f minwave.obj 84 | 0001:000012f6 ?NormalizePhysicalPosition@CMiniportWaveCyclicStreamHDA@@UAGJPA_J@Z 000115d6 f minwave.obj 85 | 0001:0000133e ?Silence@CMiniportWaveCyclicStreamHDA@@UAGXPAXK@Z 0001161e f minwave.obj 86 | 0001:00001378 _DbgPrint 00011658 f ntoskrnl:ntoskrnl.exe 87 | 0001:0000137e __alldiv 0001165e f ntoskrnl:ntoskrnl.exe 88 | 0001:00001384 __allmul 00011664 f ntoskrnl:ntoskrnl.exe 89 | 0001:0000138a _PcInitializeAdapterDriver@12 0001166a f portcls:portcls.sys 90 | 0001:00001390 _PcAddAdapterDevice@20 00011670 f portcls:portcls.sys 91 | 0001:00001396 _PcRegisterSubdevice@12 00011676 f portcls:portcls.sys 92 | 0001:0000139c _PcNewMiniport@8 0001167c f portcls:portcls.sys 93 | 0001:000013a2 _PcNewPort@8 00011682 f portcls:portcls.sys 94 | 0001:000013a8 _PcRegisterPhysicalConnection@20 00011688 f portcls:portcls.sys 95 | 0001:000013ae _PcRegisterAdapterPowerManagement@8 0001168e f portcls:portcls.sys 96 | 0001:000013b4 _PcNewResourceSublist@20 00011694 f portcls:portcls.sys 97 | 0001:000013ba _PcNewInterruptSync@20 0001169a f portcls:portcls.sys 98 | 0001:000013c0 _PcNewRegistryKey@36 000116a0 f portcls:portcls.sys 99 | 0001:000013c6 _PcNewServiceGroup@8 000116a6 f portcls:portcls.sys 100 | 0001:000013cc ??0CUnknown@@QAE@PAUIUnknown@@@Z 000116ac f stdunk:stdunk.obj 101 | 0001:000013eb ??_GCUnknown@@UAEPAXI@Z 000116cb f i stdunk:stdunk.obj 102 | 0001:000013eb ??_ECUnknown@@UAEPAXI@Z 000116cb f i stdunk:stdunk.obj 103 | 0001:00001407 ??1CUnknown@@UAE@XZ 000116e7 f stdunk:stdunk.obj 104 | 0001:0000140e ?NonDelegatingAddRef@CUnknown@@UAGKXZ 000116ee f stdunk:stdunk.obj 105 | 0001:00001424 ?NonDelegatingRelease@CUnknown@@UAGKXZ 00011704 f stdunk:stdunk.obj 106 | 0001:00001453 ?NonDelegatingQueryInterface@CUnknown@@UAGJABU_GUID@@PAPAX@Z 00011733 f stdunk:stdunk.obj 107 | 0002:00000000 __imp_@KfAcquireSpinLock@4 000117a0 hal:HAL.dll 108 | 0002:00000004 __imp_@KfReleaseSpinLock@8 000117a4 hal:HAL.dll 109 | 0002:00000008 __imp__KeStallExecutionProcessor@4 000117a8 hal:HAL.dll 110 | 0002:0000000c \177HAL_NULL_THUNK_DATA 000117ac hal:HAL.dll 111 | 0002:00000010 __imp__KeInitializeSpinLock@4 000117b0 ntoskrnl:ntoskrnl.exe 112 | 0002:00000014 __imp__MmUnmapIoSpace@8 000117b4 ntoskrnl:ntoskrnl.exe 113 | 0002:00000018 __imp__READ_REGISTER_ULONG@4 000117b8 ntoskrnl:ntoskrnl.exe 114 | 0002:0000001c __imp__DbgPrint 000117bc ntoskrnl:ntoskrnl.exe 115 | 0002:00000020 __imp__WRITE_REGISTER_ULONG@8 000117c0 ntoskrnl:ntoskrnl.exe 116 | 0002:00000024 __imp__RtlInitUnicodeString@8 000117c4 ntoskrnl:ntoskrnl.exe 117 | 0002:00000028 __imp__READ_REGISTER_UCHAR@4 000117c8 ntoskrnl:ntoskrnl.exe 118 | 0002:0000002c __imp__WRITE_REGISTER_UCHAR@8 000117cc ntoskrnl:ntoskrnl.exe 119 | 0002:00000030 __imp__READ_REGISTER_USHORT@4 000117d0 ntoskrnl:ntoskrnl.exe 120 | 0002:00000034 __imp__ExAllocatePoolWithTag@12 000117d4 ntoskrnl:ntoskrnl.exe 121 | 0002:00000038 __imp__MmMapIoSpace@16 000117d8 ntoskrnl:ntoskrnl.exe 122 | 0002:0000003c __imp__KeWaitForSingleObject@20 000117dc ntoskrnl:ntoskrnl.exe 123 | 0002:00000040 __imp_@IofCallDriver@8 000117e0 ntoskrnl:ntoskrnl.exe 124 | 0002:00000044 __imp__IoBuildSynchronousFsdRequest@28 000117e4 ntoskrnl:ntoskrnl.exe 125 | 0002:00000048 __imp__IoGetAttachedDeviceReference@4 000117e8 ntoskrnl:ntoskrnl.exe 126 | 0002:0000004c __imp__KeInitializeEvent@12 000117ec ntoskrnl:ntoskrnl.exe 127 | 0002:00000050 __imp__KeInitializeMutex@8 000117f0 ntoskrnl:ntoskrnl.exe 128 | 0002:00000054 __imp__ExFreePool@4 000117f4 ntoskrnl:ntoskrnl.exe 129 | 0002:00000058 __imp___alldiv 000117f8 ntoskrnl:ntoskrnl.exe 130 | 0002:0000005c __imp___allmul 000117fc ntoskrnl:ntoskrnl.exe 131 | 0002:00000060 __imp__IoGetDmaAdapter@12 00011800 ntoskrnl:ntoskrnl.exe 132 | 0002:00000064 __imp__WRITE_REGISTER_USHORT@8 00011804 ntoskrnl:ntoskrnl.exe 133 | 0002:00000068 __imp_@ObfDereferenceObject@4 00011808 ntoskrnl:ntoskrnl.exe 134 | 0002:0000006c __imp__KeReleaseMutex@8 0001180c ntoskrnl:ntoskrnl.exe 135 | 0002:00000070 __imp_@InterlockedDecrement@4 00011810 ntoskrnl:ntoskrnl.exe 136 | 0002:00000074 __imp_@InterlockedIncrement@4 00011814 ntoskrnl:ntoskrnl.exe 137 | 0002:00000078 \177ntoskrnl_NULL_THUNK_DATA 00011818 ntoskrnl:ntoskrnl.exe 138 | 0002:0000007c __imp__PcInitializeAdapterDriver@12 0001181c portcls:portcls.sys 139 | 0002:00000080 __imp__PcNewMiniport@8 00011820 portcls:portcls.sys 140 | 0002:00000084 __imp__PcNewPort@8 00011824 portcls:portcls.sys 141 | 0002:00000088 __imp__PcRegisterPhysicalConnection@20 00011828 portcls:portcls.sys 142 | 0002:0000008c __imp__PcAddAdapterDevice@20 0001182c portcls:portcls.sys 143 | 0002:00000090 __imp__PcRegisterSubdevice@12 00011830 portcls:portcls.sys 144 | 0002:00000094 __imp__PcNewInterruptSync@20 00011834 portcls:portcls.sys 145 | 0002:00000098 __imp__PcNewRegistryKey@36 00011838 portcls:portcls.sys 146 | 0002:0000009c __imp__PcNewServiceGroup@8 0001183c portcls:portcls.sys 147 | 0002:000000a0 __imp__PcRegisterAdapterPowerManagement@8 00011840 portcls:portcls.sys 148 | 0002:000000a4 __imp__PcNewResourceSublist@20 00011844 portcls:portcls.sys 149 | 0002:000000a8 \177portcls_NULL_THUNK_DATA 00011848 portcls:portcls.sys 150 | 0002:00000108 _IID_IAdapterCommon 000118a8 adapter.obj 151 | 0002:00000118 _CLSID_MiniportDriverFmSynth 000118b8 adapter.obj 152 | 0002:00000128 _CLSID_PortWaveCyclic 000118c8 adapter.obj 153 | 0002:00000138 _CLSID_PortTopology 000118d8 adapter.obj 154 | 0002:00000148 _CLSID_PortMidi 000118e8 adapter.obj 155 | 0002:00000158 _IID_IAdapterPowerManagment 000118f8 adapter.obj 156 | 0002:00000168 _IID_IMiniportWaveCyclicStream 00011908 adapter.obj 157 | 0002:00000178 _IID_IMiniportWaveCyclic 00011918 adapter.obj 158 | 0002:00000188 _IID_IPortWaveCyclic 00011928 adapter.obj 159 | 0002:00000198 _IID_IMiniportTopology 00011938 adapter.obj 160 | 0002:000001a8 _IID_IMiniport 00011948 adapter.obj 161 | 0002:000001b8 _IID_IUnknown 00011958 adapter.obj 162 | 0002:000001c8 ??_C@_1BE@ENEK@?$AAR?$AAi?$AAg?$AAh?$AAt?$AAB?$AAa?$AAs?$AAs?$AA?$AA@ 00011968 common.obj 163 | 0002:000001dc ??_C@_1BC@JMJO@?$AAL?$AAe?$AAf?$AAt?$AAB?$AAa?$AAs?$AAs?$AA?$AA@ 0001197c common.obj 164 | 0002:000001f0 ??_C@_1BI@KGAJ@?$AAR?$AAi?$AAg?$AAh?$AAt?$AAT?$AAr?$AAe?$AAb?$AAl?$AAe?$AA?$AA@ 00011990 common.obj 165 | 0002:00000208 ??_C@_1BG@BGGD@?$AAL?$AAe?$AAf?$AAt?$AAT?$AAr?$AAe?$AAb?$AAl?$AAe?$AA?$AA@ 000119a8 common.obj 166 | 0002:00000220 ??_C@_1O@IECC@?$AAM?$AAi?$AAc?$AAA?$AAG?$AAC?$AA?$AA@ 000119c0 common.obj 167 | 0002:00000230 ??_C@_1CA@EJHI@?$AAR?$AAi?$AAg?$AAh?$AAt?$AAO?$AAu?$AAt?$AAp?$AAu?$AAt?$AAG?$AAa?$AAi?$AAn?$AA?$AA@ 000119d0 common.obj 168 | 0002:00000250 ??_C@_1BO@PPLI@?$AAL?$AAe?$AAf?$AAt?$AAO?$AAu?$AAt?$AAp?$AAu?$AAt?$AAG?$AAa?$AAi?$AAn?$AA?$AA@ 000119f0 common.obj 169 | 0002:00000270 ??_C@_1BO@PMCJ@?$AAR?$AAi?$AAg?$AAh?$AAt?$AAI?$AAn?$AAp?$AAu?$AAt?$AAG?$AAa?$AAi?$AAn?$AA?$AA@ 00011a10 common.obj 170 | 0002:00000290 ??_C@_1BM@CFEM@?$AAL?$AAe?$AAf?$AAt?$AAI?$AAn?$AAp?$AAu?$AAt?$AAG?$AAa?$AAi?$AAn?$AA?$AA@ 00011a30 common.obj 171 | 0002:000002ac ??_C@_1CA@CIKM@?$AAR?$AAi?$AAg?$AAh?$AAt?$AAI?$AAn?$AAp?$AAu?$AAt?$AAM?$AAi?$AAx?$AAe?$AAr?$AA?$AA@ 00011a4c common.obj 172 | 0002:000002cc ??_C@_1BO@JOGM@?$AAL?$AAe?$AAf?$AAt?$AAI?$AAn?$AAp?$AAu?$AAt?$AAM?$AAi?$AAx?$AAe?$AAr?$AA?$AA@ 00011a6c common.obj 173 | 0002:000002ec ??_C@_1BI@BMOJ@?$AAO?$AAu?$AAt?$AAp?$AAu?$AAt?$AAM?$AAi?$AAx?$AAe?$AAr?$AA?$AA@ 00011a8c common.obj 174 | 0002:00000304 ??_C@_1BE@GLOL@?$AAP?$AAc?$AAS?$AAp?$AAk?$AAr?$AAV?$AAo?$AAl?$AA?$AA@ 00011aa4 common.obj 175 | 0002:00000318 ??_C@_1O@MNBB@?$AAM?$AAi?$AAc?$AAV?$AAo?$AAl?$AA?$AA@ 00011ab8 common.obj 176 | 0002:00000328 ??_C@_1BO@HCKE@?$AAR?$AAi?$AAg?$AAh?$AAt?$AAL?$AAi?$AAn?$AAe?$AAI?$AAn?$AAV?$AAo?$AAl?$AA?$AA@ 00011ac8 common.obj 177 | 0002:00000348 ??_C@_1BM@KLMB@?$AAL?$AAe?$AAf?$AAt?$AAL?$AAi?$AAn?$AAe?$AAI?$AAn?$AAV?$AAo?$AAl?$AA?$AA@ 00011ae8 common.obj 178 | 0002:00000364 ??_C@_1BG@COJL@?$AAR?$AAi?$AAg?$AAh?$AAt?$AAC?$AAD?$AAV?$AAo?$AAl?$AA?$AA@ 00011b04 common.obj 179 | 0002:0000037c ??_C@_1BE@KMKA@?$AAL?$AAe?$AAf?$AAt?$AAC?$AAD?$AAV?$AAo?$AAl?$AA?$AA@ 00011b1c common.obj 180 | 0002:00000390 ??_C@_1BK@JCIM@?$AAR?$AAi?$AAg?$AAh?$AAt?$AAM?$AAi?$AAd?$AAi?$AAV?$AAo?$AAl?$AA?$AA@ 00011b30 common.obj 181 | 0002:000003ac ??_C@_1BI@KBIJ@?$AAL?$AAe?$AAf?$AAt?$AAM?$AAi?$AAd?$AAi?$AAV?$AAo?$AAl?$AA?$AA@ 00011b4c common.obj 182 | 0002:000003c4 ??_C@_1BK@MFCG@?$AAR?$AAi?$AAg?$AAh?$AAt?$AAW?$AAa?$AAv?$AAe?$AAV?$AAo?$AAl?$AA?$AA@ 00011b64 common.obj 183 | 0002:000003e0 ??_C@_1BI@PGCD@?$AAL?$AAe?$AAf?$AAt?$AAW?$AAa?$AAv?$AAe?$AAV?$AAo?$AAl?$AA?$AA@ 00011b80 common.obj 184 | 0002:000003f8 ??_C@_1BO@NHA@?$AAR?$AAi?$AAg?$AAh?$AAt?$AAM?$AAa?$AAs?$AAt?$AAe?$AAr?$AAV?$AAo?$AAl?$AA?$AA@ 00011b98 common.obj 185 | 0002:00000418 ??_C@_1BM@NEBF@?$AAL?$AAe?$AAf?$AAt?$AAM?$AAa?$AAs?$AAt?$AAe?$AAr?$AAV?$AAo?$AAl?$AA?$AA@ 00011bb8 common.obj 186 | 0002:00000434 ??_7CAdapterCommon@@6BIAdapterPowerManagement@@@ 00011bd4 common.obj 187 | 0002:0000044c ??_7CAdapterCommon@@6BIAdapterCommon@@@ 00011bec common.obj 188 | 0002:000004a4 ??_7CAdapterCommon@@6BCUnknown@@@ 00011c44 common.obj 189 | 0002:00000580 ??_7CMiniportTopologyHDA@@6BIMiniportTopology@@@ 00011d20 mintopo.obj 190 | 0002:00000598 ??_7CMiniportTopologyHDA@@6BCUnknown@@@ 00011d38 mintopo.obj 191 | 0002:000005a8 ??_7CMiniportWaveCyclicHDA@@6BIMiniportWaveCyclic@@@ 00011d48 minwave.obj 192 | 0002:000005c4 ??_7CMiniportWaveCyclicHDA@@6BCUnknown@@@ 00011d64 minwave.obj 193 | 0002:000005d4 ??_7CMiniportWaveCyclicStreamHDA@@6BIMiniportWaveCyclicStream@@@ 00011d74 minwave.obj 194 | 0002:000005f8 ??_7CMiniportWaveCyclicStreamHDA@@6BCUnknown@@@ 00011d98 minwave.obj 195 | 0002:00000608 ??_7CUnknown@@6B@ 00011da8 stdunk:stdunk.obj 196 | 0003:00000000 __GUID_b7902fe9_fb0a_11d1_81b0_0060083316c1 00011dc0 adapter.obj 197 | 0003:00000010 __GUID_d3f0ce1c_fffc_11d1_81b0_0060083316c1 00011dd0 adapter.obj 198 | 0003:00000020 __GUID_c096df9c_fb09_11d1_81b0_0060083316c1 00011de0 adapter.obj 199 | 0003:000000f0 ?audBufSize@@3KA 00011eb0 common.obj 200 | 0003:000000f4 ?BdlSize@@3KA 00011eb4 common.obj 201 | 0003:000007f0 __GUID_185fedf6_9905_11d1_95a9_00c04fb925d3 000125b0 mintopo.obj 202 | 0003:00000800 __GUID_185fedef_9905_11d1_95a9_00c04fb925d3 000125c0 mintopo.obj 203 | 0003:00000810 __GUID_185fede1_9905_11d1_95a9_00c04fb925d3 000125d0 mintopo.obj 204 | 0003:00000820 __GUID_185fede0_9905_11d1_95a9_00c04fb925d3 000125e0 mintopo.obj 205 | 0003:00000830 __GUID_7607e580_c557_11d0_8a2b_00a0c9255ac1 000125f0 mintopo.obj 206 | 0003:00000840 __GUID_185fede3_9905_11d1_95a9_00c04fb925d3 00012600 mintopo.obj 207 | 0003:00000850 __GUID_da441a60_c556_11d0_8a2b_00a0c9255ac1 00012610 mintopo.obj 208 | 0003:00000860 __GUID_185fedee_9905_11d1_95a9_00c04fb925d3 00012620 mintopo.obj 209 | 0003:00000870 __GUID_02b223c0_c557_11d0_8a2b_00a0c9255ac1 00012630 mintopo.obj 210 | 0003:00000880 __GUID_185feded_9905_11d1_95a9_00c04fb925d3 00012640 mintopo.obj 211 | 0003:00000890 __GUID_e88c9ba0_c557_11d0_8a2b_00a0c9255ac1 00012650 mintopo.obj 212 | 0003:000008a0 __GUID_185fedec_9905_11d1_95a9_00c04fb925d3 00012660 mintopo.obj 213 | 0003:000008b0 __GUID_185fedeb_9905_11d1_95a9_00c04fb925d3 00012670 mintopo.obj 214 | 0003:000008c0 __GUID_185fedea_9905_11d1_95a9_00c04fb925d3 00012680 mintopo.obj 215 | 0003:000008d0 __GUID_185fede9_9905_11d1_95a9_00c04fb925d3 00012690 mintopo.obj 216 | 0003:000008e0 __GUID_185fede8_9905_11d1_95a9_00c04fb925d3 000126a0 mintopo.obj 217 | 0003:000008f0 __GUID_e573adc0_c555_11d0_8a2b_00a0c9255ac1 000126b0 mintopo.obj 218 | 0003:00000900 __GUID_185fede7_9905_11d1_95a9_00c04fb925d3 000126c0 mintopo.obj 219 | 0003:00000910 __GUID_185fede5_9905_11d1_95a9_00c04fb925d3 000126d0 mintopo.obj 220 | 0003:00000920 __GUID_3a5acc00_c557_11d0_8a2b_00a0c9255ac1 000126e0 mintopo.obj 221 | 0003:00000930 __GUID_45ffaaa0_6e1b_11d0_bcf2_444553540000 000126f0 mintopo.obj 222 | 0003:00000940 __GUID_6994ad04_93ef_11d0_a3cc_00a0c9223196 00012700 mintopo.obj 223 | 0003:00000950 __GUID_185fedf7_9905_11d1_95a9_00c04fb925d3 00012710 mintopo.obj 224 | 0003:00000960 __GUID_dff21ce1_f70f_11d0_b917_00a0c9223196 00012720 mintopo.obj 225 | 0003:00000970 __GUID_dff21be1_f70f_11d0_b917_00a0c9223196 00012730 mintopo.obj 226 | 0003:00000980 __GUID_185fedf9_9905_11d1_95a9_00c04fb925d3 00012740 mintopo.obj 227 | 0003:00000990 __GUID_dff21fe3_f70f_11d0_b917_00a0c9223196 00012750 mintopo.obj 228 | 0003:000009a0 __GUID_185fedfb_9905_11d1_95a9_00c04fb925d3 00012760 mintopo.obj 229 | 0003:000009b0 __GUID_dff220e3_f70f_11d0_b917_00a0c9223196 00012770 mintopo.obj 230 | 0003:000009c0 __GUID_185fedf8_9905_11d1_95a9_00c04fb925d3 00012780 mintopo.obj 231 | 0003:000009d0 __GUID_dff220f3_f70f_11d0_b917_00a0c9223196 00012790 mintopo.obj 232 | 0003:000009e0 __GUID_dff21fe4_f70f_11d0_b917_00a0c9223196 000127a0 mintopo.obj 233 | 0003:000009f0 __GUID_97e99ba0_bdea_11cf_a5d6_28db04c10000 000127b0 mintopo.obj 234 | 0003:00000c38 __GUID_507ae360_c554_11d0_8a2b_00a0c9255ac1 000129f8 minwave.obj 235 | 0003:00000c48 __GUID_4d837fe0_c555_11d0_8a2b_00a0c9255ac1 00012a08 minwave.obj 236 | 0003:00000c58 __GUID_185fedfa_9905_11d1_95a9_00c04fb925d3 00012a18 minwave.obj 237 | 0003:00000c68 __GUID_fb6c4281_0353_11d1_905f_0000c0cc16ba 00012a28 minwave.obj 238 | 0003:00000c78 __GUID_05589f81_c356_11ce_bf01_00aa0055595a 00012a38 minwave.obj 239 | 0003:00000c88 __GUID_00000001_0000_0010_8000_00aa00389b71 00012a48 minwave.obj 240 | 0003:00000c98 __GUID_73647561_0000_0010_8000_00aa00389b71 00012a58 minwave.obj 241 | 0003:00000ca8 __GUID_0f6417d6_c318_11d0_a43f_00a0c9223196 00012a68 minwave.obj 242 | 0003:00000cb8 __GUID_518590a2_a184_11d0_8522_00c04fd9baf3 00012a78 minwave.obj 243 | 0003:00000cc8 __GUID_00000000_0000_0000_0000_000000000000 00012a88 adapter.obj 244 | 0004:00000000 _AddDevice@8 00012aa0 f adapter.obj 245 | 0004:0000001a ?InstallSubdevice@@YGJPAU_DEVICE_OBJECT@@PAU_IRP@@PAGABU_GUID@@3P6GJPAPAUIUnknown@@3PAU4@W4_POOL_TYPE@@@Z5PAUIResourceList@@344@Z 00012aba f adapter.obj 246 | 0004:00000120 ?StartDevice@@YGJPAU_DEVICE_OBJECT@@PAU_IRP@@PAUIResourceList@@@Z 00012bc0 f adapter.obj 247 | 0004:0000036e ?AssignResources@@YGJPAUIResourceList@@PAPAU1@11111@Z 00012e0e f adapter.obj 248 | 0004:00000624 ?NewAdapterCommon@@YGJPAPAUIUnknown@@ABU_GUID@@PAU1@W4_POOL_TYPE@@@Z 000130c4 f common.obj 249 | 0004:00000895 ?Init@CAdapterCommon@@UAGJPAUIResourceList@@PAU_DEVICE_OBJECT@@@Z 00013335 f common.obj 250 | 0004:00000fb8 ??1CAdapterCommon@@UAE@XZ 00013a58 f common.obj 251 | 0004:0000110c ?NonDelegatingQueryInterface@CAdapterCommon@@UAGJABU_GUID@@PAPAX@Z 00013bac f common.obj 252 | 0004:000011cc ?WavePortDriverDest@CAdapterCommon@@UAGPAPAUIUnknown@@XZ 00013c6c f common.obj 253 | 0004:000011d8 ?GetInterruptSync@CAdapterCommon@@UAGPAUIInterruptSync@@XZ 00013c78 f common.obj 254 | 0004:000011e6 ?MidiPortDriverDest@CAdapterCommon@@UAGPAPAUIUnknown@@XZ 00013c86 f common.obj 255 | 0004:000011f2 ?SetWaveServiceGroup@CAdapterCommon@@UAGXPAUIServiceGroup@@@Z 00013c92 f common.obj 256 | 0004:00001222 ?InitHDA@CAdapterCommon@@QAGJXZ 00013cc2 f common.obj 257 | 0004:000015dc ?InitializeCodec@CAdapterCommon@@QAGJE@Z 0001407c f common.obj 258 | 0004:000018db ?hda_initialize_audio_function_group@CAdapterCommon@@QAGXKK@Z 0001437b f common.obj 259 | 0004:00001dba ?hda_get_node_type@CAdapterCommon@@QAGEKK@Z 0001485a f common.obj 260 | 0004:00001ddc ?hda_get_node_connection_entries@CAdapterCommon@@QAGKKKK@Z 0001487c f common.obj 261 | 0004:00001e62 ?hda_set_node_gain@CAdapterCommon@@QAGXKKKKKE@Z 00014902 f common.obj 262 | 0004:00001ecc ?hda_enable_pin_output@CAdapterCommon@@QAGXKK@Z 0001496c f common.obj 263 | 0004:00001efe ?hda_disable_pin_output@CAdapterCommon@@QAGXKK@Z 0001499e f common.obj 264 | 0004:00001f30 ?hda_is_headphone_connected@CAdapterCommon@@QAGHXZ 000149d0 f common.obj 265 | 0004:00001f6c ?hda_initialize_output_pin@CAdapterCommon@@QAGXK@Z 00014a0c f common.obj 266 | 0004:000020e2 ?hda_initalize_audio_output@CAdapterCommon@@QAGXK@Z 00014b82 f common.obj 267 | 0004:0000220a ?hda_initalize_audio_mixer@CAdapterCommon@@QAGXK@Z 00014caa f common.obj 268 | 0004:00002304 ?hda_initalize_audio_selector@CAdapterCommon@@QAGXK@Z 00014da4 f common.obj 269 | 0004:00002428 ?CreateMiniportTopologyHDA@@YGJPAPAUIUnknown@@ABU_GUID@@PAU1@W4_POOL_TYPE@@@Z 00014ec8 f mintopo.obj 270 | 0004:00002488 ?ProcessResources@CMiniportTopologyHDA@@AAEJPAUIResourceList@@@Z 00014f28 f mintopo.obj 271 | 0004:000024ac ?NonDelegatingQueryInterface@CMiniportTopologyHDA@@UAGJABU_GUID@@PAPAX@Z 00014f4c f mintopo.obj 272 | 0004:0000255a ??1CMiniportTopologyHDA@@UAE@XZ 00014ffa f mintopo.obj 273 | 0004:0000259e ?Init@CMiniportTopologyHDA@@UAGJPAUIUnknown@@PAUIResourceList@@PAUIPortTopology@@@Z 0001503e f mintopo.obj 274 | 0004:00002600 ?GetDescription@CMiniportTopologyHDA@@UAGJPAPAUPCFILTER_DESCRIPTOR@@@Z 000150a0 f mintopo.obj 275 | 0004:00002e24 ?CreateMiniportWaveCyclicHDA@@YGJPAPAUIUnknown@@ABU_GUID@@PAU1@W4_POOL_TYPE@@@Z 000158c4 f minwave.obj 276 | 0004:00002e84 ?ProcessResources@CMiniportWaveCyclicHDA@@AAEJPAUIResourceList@@@Z 00015924 f minwave.obj 277 | 0004:00002f2a ?ValidateFormat@CMiniportWaveCyclicHDA@@AAEJPATKSDATAFORMAT@@@Z 000159ca f minwave.obj 278 | 0004:00003006 ?NonDelegatingQueryInterface@CMiniportWaveCyclicHDA@@UAGJABU_GUID@@PAPAX@Z 00015aa6 f minwave.obj 279 | 0004:000030b4 ??1CMiniportWaveCyclicHDA@@UAE@XZ 00015b54 f minwave.obj 280 | 0004:00003108 ?Init@CMiniportWaveCyclicHDA@@UAGJPAUIUnknown@@PAUIResourceList@@PAUIPortWaveCyclic@@@Z 00015ba8 f minwave.obj 281 | 0004:000031b0 ?GetDescription@CMiniportWaveCyclicHDA@@UAGJPAPAUPCFILTER_DESCRIPTOR@@@Z 00015c50 f minwave.obj 282 | 0004:000031c0 ?DataRangeIntersection@CMiniportWaveCyclicHDA@@UAGJKPATKSDATAFORMAT@@0KPAXPAK@Z 00015c60 f minwave.obj 283 | 0004:00003416 ?NewStream@CMiniportWaveCyclicHDA@@UAGJPAPAUIMiniportWaveCyclicStream@@PAUIUnknown@@W4_POOL_TYPE@@KEPATKSDATAFORMAT@@PAPAUIDmaChannel@@PAPAUIServiceGroup@@@Z 00015eb6 f minwave.obj 284 | 0004:00003556 ?NonDelegatingQueryInterface@CMiniportWaveCyclicStreamHDA@@UAGJABU_GUID@@PAPAX@Z 00015ff6 f minwave.obj 285 | 0004:000035de ??1CMiniportWaveCyclicStreamHDA@@UAE@XZ 0001607e f minwave.obj 286 | 0004:00003648 ?Init@CMiniportWaveCyclicStreamHDA@@QAEJPAVCMiniportWaveCyclicHDA@@KEPATKSDATAFORMAT@@PAUIDmaChannel@@@Z 000160e8 f minwave.obj 287 | 0004:000036ce ?SetNotificationFreq@CMiniportWaveCyclicStreamHDA@@UAGKKPAK@Z 0001616e f minwave.obj 288 | 0004:0000370e ?SetFormat@CMiniportWaveCyclicStreamHDA@@UAGJPATKSDATAFORMAT@@@Z 000161ae f minwave.obj 289 | 0004:0000379a ?SetState@CMiniportWaveCyclicStreamHDA@@UAGJW4KSSTATE@@@Z 0001623a f minwave.obj 290 | 0005:00000000 _DriverEntry@8 000162a0 f adapter.obj 291 | 0005:00000018 __IMPORT_DESCRIPTOR_ntoskrnl 000162b8 ntoskrnl:ntoskrnl.exe 292 | 0005:0000002c __IMPORT_DESCRIPTOR_HAL 000162cc hal:HAL.dll 293 | 0005:00000040 __IMPORT_DESCRIPTOR_portcls 000162e0 portcls:portcls.sys 294 | 0005:00000054 __NULL_IMPORT_DESCRIPTOR 000162f4 ntoskrnl:ntoskrnl.exe 295 | 296 | entry point at 0005:00000000 297 | 298 | Static symbols 299 | 300 | 0004:00002610 ?PropertyHandler_OnOff@@YGJPAU_PCPROPERTY_REQUEST@@@Z 000150b0 f mintopo.obj 301 | 0004:000027ae ?PropertyHandler_SuperMixCaps@@YGJPAU_PCPROPERTY_REQUEST@@@Z 0001524e f mintopo.obj 302 | 0004:00002988 ?PropertyHandler_SuperMixTable@@YGJPAU_PCPROPERTY_REQUEST@@@Z 00015428 f mintopo.obj 303 | 0004:00002ca4 ?PropertyHandler_CpuResources@@YGJPAU_PCPROPERTY_REQUEST@@@Z 00015744 f mintopo.obj 304 | 0001:00000de0 ?PropertyHandler_Level@@YGJPAU_PCPROPERTY_REQUEST@@@Z 000110c0 f mintopo.obj 305 | 0004:00002d30 ?BasicSupportHandler@@YGJPAU_PCPROPERTY_REQUEST@@@Z 000157d0 f mintopo.obj 306 | 307 | 115 bytes saved through ICF 308 | 309 | -------------------------------------------------------------------------------- /objchk/i386/HDA.map: -------------------------------------------------------------------------------- 1 | HDA 2 | 3 | Timestamp is 693e3142 (Sat Dec 13 19:38:42 2025) 4 | 5 | Preferred load address is 00010000 6 | 7 | Start Length Name Class 8 | 0001:00000000 00003adcH .text CODE 9 | 0002:00000000 000000b8H .idata$5 DATA 10 | 0002:000000b8 00000588H .rdata DATA 11 | 0003:00000000 00000cd0H .data DATA 12 | 0003:00000cd0 00000010H .bss DATA 13 | 0004:00000000 0000b740H PAGE CODE 14 | 0005:00000000 000000a9H INIT CODE 15 | 0005:000000ac 0000003cH .idata$2 CODE 16 | 0005:000000e8 00000014H .idata$3 CODE 17 | 0005:000000fc 000000b8H .idata$4 CODE 18 | 0005:000001b4 000003b4H .idata$6 CODE 19 | 0006:00000000 00000058H .rsrc$01 DATA 20 | 0006:00000060 00000338H .rsrc$02 DATA 21 | 22 | Address Publics by Value Rva+Base Lib:Object 23 | 24 | 0001:00000000 ??3@YAXPAX@Z 000102e0 f i common.obj 25 | 0001:00000010 ??2@YGPAXIW4_POOL_TYPE@@K@Z 000102f0 f i common.obj 26 | 0001:00000050 ??0CAdapterCommon@@QAE@PAUIUnknown@@@Z 00010330 f i common.obj 27 | 0001:000000a0 ?QueryInterface@CAdapterCommon@@UAGJABU_GUID@@PAPAX@Z 00010380 f i common.obj 28 | 0001:000000d0 ?GetOuterUnknown@CUnknown@@QAEPAUIUnknown@@XZ 000103b0 f i common.obj 29 | 0001:000000f0 ?AddRef@CAdapterCommon@@UAGKXZ 000103d0 f i common.obj 30 | 0001:00000120 ?Release@CAdapterCommon@@UAGKXZ 00010400 f i common.obj 31 | 0001:00000150 ??_ECAdapterCommon@@UAEPAXI@Z 00010430 f i common.obj 32 | 0001:00000150 ??_GCAdapterCommon@@UAEPAXI@Z 00010430 f i common.obj 33 | 0001:00000190 ??0IUnknown@@QAE@XZ 00010470 f i common.obj 34 | 0001:000001a0 _IsEqualGUIDAligned@8 00010480 f i common.obj 35 | 0001:00000220 ?hda_check_headphone_connection_change@CAdapterCommon@@QAGXXZ 00010500 f common.obj 36 | 0001:000002d0 ?hda_is_supported_sample_rate@CAdapterCommon@@QAGEK@Z 000105b0 f common.obj 37 | 0001:000003e6 ?hda_send_verb@CAdapterCommon@@QAGKKKKK@Z 000106c6 f common.obj 38 | 0001:000006e2 ?ReadController@CAdapterCommon@@UAGEXZ 000109c2 f common.obj 39 | 0001:00000786 ?WriteController@CAdapterCommon@@UAGEE@Z 00010a66 f common.obj 40 | 0001:00000892 ?MixerRegWrite@CAdapterCommon@@UAGXEE@Z 00010b72 f common.obj 41 | 0001:00000a2a ?MixerRegRead@CAdapterCommon@@UAGEE@Z 00010d0a f common.obj 42 | 0001:00000b0e ?MixerReset@CAdapterCommon@@UAGXXZ 00010dee f common.obj 43 | 0001:00000bae ?AcknowledgeIRQ@CAdapterCommon@@AAE?AW4_HDA_INTERRUPT_TYPE@@XZ 00010e8e f common.obj 44 | 0001:00000e52 ?ResetController@CAdapterCommon@@UAGJXZ 00011132 f common.obj 45 | 0001:00000ef6 ?RestoreMixerSettingsFromRegistry@CAdapterCommon@@UAGJXZ 000111d6 f common.obj 46 | 0001:000011a2 ?SaveMixerSettingsToRegistry@CAdapterCommon@@UAGJXZ 00011482 f common.obj 47 | 0001:00001492 ?ProgramSampleRate@CAdapterCommon@@UAGJK@Z 00011772 f common.obj 48 | 0001:00001786 ?PowerChangeState@CAdapterCommon@@UAGXT_POWER_STATE@@@Z 00011a66 f common.obj 49 | 0001:00001976 ?QueryPowerChangeState@CAdapterCommon@@UAGJT_POWER_STATE@@@Z 00011c56 f common.obj 50 | 0001:000019fa ?QueryDeviceCapabilities@CAdapterCommon@@UAGJPAU_DEVICE_CAPABILITIES@@@Z 00011cda f common.obj 51 | 0001:00001aaa ?InterruptServiceRoutine@@YGJPAUIInterruptSync@@PAX@Z 00011d8a f common.obj 52 | 0001:00001c36 ?hda_stop_stream@CAdapterCommon@@UAGJXZ 00011f16 f common.obj 53 | 0001:00001eb0 ?hda_start_sound@CAdapterCommon@@UAGXXZ 00012190 f common.obj 54 | 0001:00001f1a ?hda_stop_sound@CAdapterCommon@@UAGXXZ 000121fa f common.obj 55 | 0001:00001fd0 ?hda_get_actual_stream_position@CAdapterCommon@@UAGKXZ 000122b0 f common.obj 56 | 0001:00001ff0 ?hda_set_volume@CAdapterCommon@@QAGXKE@Z 000122d0 f common.obj 57 | 0001:00002070 ?readUCHAR@CAdapterCommon@@QAGEG@Z 00012350 f common.obj 58 | 0001:00002090 ?writeUCHAR@CAdapterCommon@@QAGXGE@Z 00012370 f common.obj 59 | 0001:000020c0 ?readUSHORT@CAdapterCommon@@QAGGG@Z 000123a0 f common.obj 60 | 0001:000020e0 ?writeUSHORT@CAdapterCommon@@QAGXGG@Z 000123c0 f common.obj 61 | 0001:00002110 ?readULONG@CAdapterCommon@@QAGKG@Z 000123f0 f common.obj 62 | 0001:00002130 ?writeULONG@CAdapterCommon@@QAGXGK@Z 00012410 f common.obj 63 | 0001:00002372 ?hda_showtime@CAdapterCommon@@UAGJPAUIDmaChannel@@@Z 00012652 f common.obj 64 | 0001:000028e0 ?hda_return_sound_data_format@CAdapterCommon@@QAGGKKK@Z 00012bc0 f common.obj 65 | 0001:00002a50 ?ReadWriteConfigSpace@CAdapterCommon@@AAGJPAU_DEVICE_OBJECT@@KPAXKK@Z 00012d30 f common.obj 66 | 0001:00002b7b ?WriteConfigSpaceByte@CAdapterCommon@@AAGJEEE@Z 00012e5b f common.obj 67 | 0001:00002c7b ?WriteConfigSpaceWord@CAdapterCommon@@AAGJEGG@Z 00012f5b f common.obj 68 | 0001:00002d40 ?QueryInterface@CAdapterCommon@@W3AGJABU_GUID@@PAPAX@Z 00013020 f i common.obj 69 | 0001:00002d50 ?AddRef@CAdapterCommon@@W3AGKXZ 00013030 f i common.obj 70 | 0001:00002d60 ?Release@CAdapterCommon@@W3AGKXZ 00013040 f i common.obj 71 | 0001:00002d70 ??0CMiniportTopologyHDA@@QAE@PAUIUnknown@@@Z 00013050 f i mintopo.obj 72 | 0001:00002db0 ?DataRangeIntersection@CMiniportTopologyHDA@@UAGJKPATKSDATAFORMAT@@0KPAXPAK@Z 00013090 f i mintopo.obj 73 | 0001:00002dc0 ??_GCMiniportTopologyHDA@@UAEPAXI@Z 000130a0 f i mintopo.obj 74 | 0001:00002dc0 ??_ECMiniportTopologyHDA@@UAEPAXI@Z 000130a0 f i mintopo.obj 75 | 0001:00003480 ?ReadBitsFromMixer@CMiniportTopologyHDA@@AAEEEEE@Z 00013760 f mintopo.obj 76 | 0001:000034d0 ?ThisManyOnes@@YGEE@Z 000137b0 f i mintopo.obj 77 | 0001:000034f0 ?WriteBitsToMixer@CMiniportTopologyHDA@@AAEXEEEE@Z 000137d0 f mintopo.obj 78 | 0001:00003590 ??0CMiniportWaveCyclicHDA@@QAE@PAUIUnknown@@@Z 00013870 f i minwave.obj 79 | 0001:000035d0 ?AddRef@CMiniportWaveCyclicStreamHDA@@UAGKXZ 000138b0 f i minwave.obj 80 | 0001:000035d0 ?AddRef@CMiniportTopologyHDA@@UAGKXZ 000138b0 f i minwave.obj 81 | 0001:000035d0 ?AddRef@CMiniportWaveCyclicHDA@@UAGKXZ 000138b0 f i minwave.obj 82 | 0001:00003600 ?Release@CMiniportTopologyHDA@@UAGKXZ 000138e0 f i minwave.obj 83 | 0001:00003600 ?Release@CMiniportWaveCyclicStreamHDA@@UAGKXZ 000138e0 f i minwave.obj 84 | 0001:00003600 ?Release@CMiniportWaveCyclicHDA@@UAGKXZ 000138e0 f i minwave.obj 85 | 0001:00003630 ??_ECMiniportWaveCyclicHDA@@UAEPAXI@Z 00013910 f i minwave.obj 86 | 0001:00003630 ??_GCMiniportWaveCyclicHDA@@UAEPAXI@Z 00013910 f i minwave.obj 87 | 0001:00003670 ??0IMiniportWaveCyclic@@QAE@XZ 00013950 f i minwave.obj 88 | 0001:00003670 ??0IMiniportTopology@@QAE@XZ 00013950 f i minwave.obj 89 | 0001:00003690 ??2@YGPAXIW4_POOL_TYPE@@@Z 00013970 f i minwave.obj 90 | 0001:000036e0 ??0CMiniportWaveCyclicStreamHDA@@QAE@PAUIUnknown@@@Z 000139c0 f i minwave.obj 91 | 0001:00003720 ?QueryInterface@CMiniportWaveCyclicStreamHDA@@UAGJABU_GUID@@PAPAX@Z 00013a00 f i minwave.obj 92 | 0001:00003720 ?QueryInterface@CMiniportWaveCyclicHDA@@UAGJABU_GUID@@PAPAX@Z 00013a00 f i minwave.obj 93 | 0001:00003720 ?QueryInterface@CMiniportTopologyHDA@@UAGJABU_GUID@@PAPAX@Z 00013a00 f i minwave.obj 94 | 0001:00003750 ??_GCMiniportWaveCyclicStreamHDA@@UAEPAXI@Z 00013a30 f i minwave.obj 95 | 0001:00003750 ??_ECMiniportWaveCyclicStreamHDA@@UAEPAXI@Z 00013a30 f i minwave.obj 96 | 0001:00003790 ??0IMiniport@@QAE@XZ 00013a70 f i minwave.obj 97 | 0001:00003790 ??0IAdapterPowerManagement@@QAE@XZ 00013a70 f i minwave.obj 98 | 0001:00003790 ??0IMiniportWaveCyclicStream@@QAE@XZ 00013a70 f i minwave.obj 99 | 0001:00003790 ??0IAdapterCommon@@QAE@XZ 00013a70 f i minwave.obj 100 | 0001:000037c9 ?GetPosition@CMiniportWaveCyclicStreamHDA@@UAGJPAK@Z 00013aa9 f minwave.obj 101 | 0001:000038be ?NormalizePhysicalPosition@CMiniportWaveCyclicStreamHDA@@UAGJPA_J@Z 00013b9e f minwave.obj 102 | 0001:00003960 ?Silence@CMiniportWaveCyclicStreamHDA@@UAGXPAXK@Z 00013c40 f minwave.obj 103 | 0001:0000399e _DbgPrint 00013c7e f ntoskrnl:ntoskrnl.exe 104 | 0001:000039a4 _DbgBreakPoint@0 00013c84 f ntoskrnl:ntoskrnl.exe 105 | 0001:000039aa __alldiv 00013c8a f ntoskrnl:ntoskrnl.exe 106 | 0001:000039b0 __allmul 00013c90 f ntoskrnl:ntoskrnl.exe 107 | 0001:000039b6 _PcInitializeAdapterDriver@12 00013c96 f portcls:portcls.sys 108 | 0001:000039bc _PcAddAdapterDevice@20 00013c9c f portcls:portcls.sys 109 | 0001:000039c2 _PcRegisterSubdevice@12 00013ca2 f portcls:portcls.sys 110 | 0001:000039c8 _PcNewMiniport@8 00013ca8 f portcls:portcls.sys 111 | 0001:000039ce _PcNewPort@8 00013cae f portcls:portcls.sys 112 | 0001:000039d4 _PcRegisterPhysicalConnection@20 00013cb4 f portcls:portcls.sys 113 | 0001:000039da _PcRegisterAdapterPowerManagement@8 00013cba f portcls:portcls.sys 114 | 0001:000039e0 _PcNewResourceSublist@20 00013cc0 f portcls:portcls.sys 115 | 0001:000039e6 _PcNewInterruptSync@20 00013cc6 f portcls:portcls.sys 116 | 0001:000039ec _PcNewRegistryKey@36 00013ccc f portcls:portcls.sys 117 | 0001:000039f2 _PcNewServiceGroup@8 00013cd2 f portcls:portcls.sys 118 | 0001:000039f8 ??0CUnknown@@QAE@PAUIUnknown@@@Z 00013cd8 f stdunk:stdunk.obj 119 | 0001:00003a17 ??_GCUnknown@@UAEPAXI@Z 00013cf7 f i stdunk:stdunk.obj 120 | 0001:00003a17 ??_ECUnknown@@UAEPAXI@Z 00013cf7 f i stdunk:stdunk.obj 121 | 0001:00003a33 ??1CUnknown@@UAE@XZ 00013d13 f stdunk:stdunk.obj 122 | 0001:00003a3a ?NonDelegatingAddRef@CUnknown@@UAGKXZ 00013d1a f stdunk:stdunk.obj 123 | 0001:00003a50 ?NonDelegatingRelease@CUnknown@@UAGKXZ 00013d30 f stdunk:stdunk.obj 124 | 0001:00003a7f ?NonDelegatingQueryInterface@CUnknown@@UAGJABU_GUID@@PAPAX@Z 00013d5f f stdunk:stdunk.obj 125 | 0002:00000000 __imp_@KfAcquireSpinLock@4 00013dc0 hal:HAL.dll 126 | 0002:00000004 __imp_@KfReleaseSpinLock@8 00013dc4 hal:HAL.dll 127 | 0002:00000008 __imp__KeStallExecutionProcessor@4 00013dc8 hal:HAL.dll 128 | 0002:0000000c __imp__KeGetCurrentIrql@0 00013dcc hal:HAL.dll 129 | 0002:00000010 \177HAL_NULL_THUNK_DATA 00013dd0 hal:HAL.dll 130 | 0002:00000014 __imp__MmMapIoSpace@16 00013dd4 ntoskrnl:ntoskrnl.exe 131 | 0002:00000018 __imp__KeInitializeSpinLock@4 00013dd8 ntoskrnl:ntoskrnl.exe 132 | 0002:0000001c __imp__MmUnmapIoSpace@8 00013ddc ntoskrnl:ntoskrnl.exe 133 | 0002:00000020 __imp__IoGetDmaAdapter@12 00013de0 ntoskrnl:ntoskrnl.exe 134 | 0002:00000024 __imp__READ_REGISTER_ULONG@4 00013de4 ntoskrnl:ntoskrnl.exe 135 | 0002:00000028 __imp__WRITE_REGISTER_ULONG@8 00013de8 ntoskrnl:ntoskrnl.exe 136 | 0002:0000002c __imp__RtlInitUnicodeString@8 00013dec ntoskrnl:ntoskrnl.exe 137 | 0002:00000030 __imp__READ_REGISTER_UCHAR@4 00013df0 ntoskrnl:ntoskrnl.exe 138 | 0002:00000034 __imp__WRITE_REGISTER_UCHAR@8 00013df4 ntoskrnl:ntoskrnl.exe 139 | 0002:00000038 __imp__READ_REGISTER_USHORT@4 00013df8 ntoskrnl:ntoskrnl.exe 140 | 0002:0000003c __imp__ExFreePool@4 00013dfc ntoskrnl:ntoskrnl.exe 141 | 0002:00000040 __imp__ExAllocatePoolWithTag@12 00013e00 ntoskrnl:ntoskrnl.exe 142 | 0002:00000044 __imp__KeWaitForSingleObject@20 00013e04 ntoskrnl:ntoskrnl.exe 143 | 0002:00000048 __imp_@IofCallDriver@8 00013e08 ntoskrnl:ntoskrnl.exe 144 | 0002:0000004c __imp__IoBuildSynchronousFsdRequest@28 00013e0c ntoskrnl:ntoskrnl.exe 145 | 0002:00000050 __imp__IoGetAttachedDeviceReference@4 00013e10 ntoskrnl:ntoskrnl.exe 146 | 0002:00000054 __imp__KeInitializeEvent@12 00013e14 ntoskrnl:ntoskrnl.exe 147 | 0002:00000058 __imp__KeInitializeMutex@8 00013e18 ntoskrnl:ntoskrnl.exe 148 | 0002:0000005c __imp__RtlAssert@16 00013e1c ntoskrnl:ntoskrnl.exe 149 | 0002:00000060 __imp___alldiv 00013e20 ntoskrnl:ntoskrnl.exe 150 | 0002:00000064 __imp___allmul 00013e24 ntoskrnl:ntoskrnl.exe 151 | 0002:00000068 __imp__DbgBreakPoint@0 00013e28 ntoskrnl:ntoskrnl.exe 152 | 0002:0000006c __imp__DbgPrint 00013e2c ntoskrnl:ntoskrnl.exe 153 | 0002:00000070 __imp_@ObfDereferenceObject@4 00013e30 ntoskrnl:ntoskrnl.exe 154 | 0002:00000074 __imp__WRITE_REGISTER_USHORT@8 00013e34 ntoskrnl:ntoskrnl.exe 155 | 0002:00000078 __imp__KeReleaseMutex@8 00013e38 ntoskrnl:ntoskrnl.exe 156 | 0002:0000007c __imp_@InterlockedDecrement@4 00013e3c ntoskrnl:ntoskrnl.exe 157 | 0002:00000080 __imp_@InterlockedIncrement@4 00013e40 ntoskrnl:ntoskrnl.exe 158 | 0002:00000084 \177ntoskrnl_NULL_THUNK_DATA 00013e44 ntoskrnl:ntoskrnl.exe 159 | 0002:00000088 __imp__PcInitializeAdapterDriver@12 00013e48 portcls:portcls.sys 160 | 0002:0000008c __imp__PcNewMiniport@8 00013e4c portcls:portcls.sys 161 | 0002:00000090 __imp__PcNewPort@8 00013e50 portcls:portcls.sys 162 | 0002:00000094 __imp__PcRegisterPhysicalConnection@20 00013e54 portcls:portcls.sys 163 | 0002:00000098 __imp__PcAddAdapterDevice@20 00013e58 portcls:portcls.sys 164 | 0002:0000009c __imp__PcRegisterSubdevice@12 00013e5c portcls:portcls.sys 165 | 0002:000000a0 __imp__PcNewInterruptSync@20 00013e60 portcls:portcls.sys 166 | 0002:000000a4 __imp__PcNewRegistryKey@36 00013e64 portcls:portcls.sys 167 | 0002:000000a8 __imp__PcNewServiceGroup@8 00013e68 portcls:portcls.sys 168 | 0002:000000ac __imp__PcRegisterAdapterPowerManagement@8 00013e6c portcls:portcls.sys 169 | 0002:000000b0 __imp__PcNewResourceSublist@20 00013e70 portcls:portcls.sys 170 | 0002:000000b4 \177portcls_NULL_THUNK_DATA 00013e74 portcls:portcls.sys 171 | 0002:00000130 _IID_IAdapterCommon 00013ef0 adapter.obj 172 | 0002:00000140 _CLSID_MiniportDriverFmSynth 00013f00 adapter.obj 173 | 0002:00000150 _CLSID_PortWaveCyclic 00013f10 adapter.obj 174 | 0002:00000160 _CLSID_PortTopology 00013f20 adapter.obj 175 | 0002:00000170 _CLSID_PortMidi 00013f30 adapter.obj 176 | 0002:00000180 _IID_IAdapterPowerManagment 00013f40 adapter.obj 177 | 0002:00000190 _IID_IMiniportWaveCyclicStream 00013f50 adapter.obj 178 | 0002:000001a0 _IID_IMiniportWaveCyclic 00013f60 adapter.obj 179 | 0002:000001b0 _IID_IPortWaveCyclic 00013f70 adapter.obj 180 | 0002:000001c0 _IID_IMiniportTopology 00013f80 adapter.obj 181 | 0002:000001d0 _IID_IMiniport 00013f90 adapter.obj 182 | 0002:000001e0 _IID_IUnknown 00013fa0 adapter.obj 183 | 0002:000001f0 ??_C@_1BE@ENEK@?$AAR?$AAi?$AAg?$AAh?$AAt?$AAB?$AAa?$AAs?$AAs?$AA?$AA@ 00013fb0 common.obj 184 | 0002:00000204 ??_C@_1BC@JMJO@?$AAL?$AAe?$AAf?$AAt?$AAB?$AAa?$AAs?$AAs?$AA?$AA@ 00013fc4 common.obj 185 | 0002:00000218 ??_C@_1BI@KGAJ@?$AAR?$AAi?$AAg?$AAh?$AAt?$AAT?$AAr?$AAe?$AAb?$AAl?$AAe?$AA?$AA@ 00013fd8 common.obj 186 | 0002:00000230 ??_C@_1BG@BGGD@?$AAL?$AAe?$AAf?$AAt?$AAT?$AAr?$AAe?$AAb?$AAl?$AAe?$AA?$AA@ 00013ff0 common.obj 187 | 0002:00000248 ??_C@_1O@IECC@?$AAM?$AAi?$AAc?$AAA?$AAG?$AAC?$AA?$AA@ 00014008 common.obj 188 | 0002:00000258 ??_C@_1CA@EJHI@?$AAR?$AAi?$AAg?$AAh?$AAt?$AAO?$AAu?$AAt?$AAp?$AAu?$AAt?$AAG?$AAa?$AAi?$AAn?$AA?$AA@ 00014018 common.obj 189 | 0002:00000278 ??_C@_1BO@PPLI@?$AAL?$AAe?$AAf?$AAt?$AAO?$AAu?$AAt?$AAp?$AAu?$AAt?$AAG?$AAa?$AAi?$AAn?$AA?$AA@ 00014038 common.obj 190 | 0002:00000298 ??_C@_1BO@PMCJ@?$AAR?$AAi?$AAg?$AAh?$AAt?$AAI?$AAn?$AAp?$AAu?$AAt?$AAG?$AAa?$AAi?$AAn?$AA?$AA@ 00014058 common.obj 191 | 0002:000002b8 ??_C@_1BM@CFEM@?$AAL?$AAe?$AAf?$AAt?$AAI?$AAn?$AAp?$AAu?$AAt?$AAG?$AAa?$AAi?$AAn?$AA?$AA@ 00014078 common.obj 192 | 0002:000002d4 ??_C@_1CA@CIKM@?$AAR?$AAi?$AAg?$AAh?$AAt?$AAI?$AAn?$AAp?$AAu?$AAt?$AAM?$AAi?$AAx?$AAe?$AAr?$AA?$AA@ 00014094 common.obj 193 | 0002:000002f4 ??_C@_1BO@JOGM@?$AAL?$AAe?$AAf?$AAt?$AAI?$AAn?$AAp?$AAu?$AAt?$AAM?$AAi?$AAx?$AAe?$AAr?$AA?$AA@ 000140b4 common.obj 194 | 0002:00000314 ??_C@_1BI@BMOJ@?$AAO?$AAu?$AAt?$AAp?$AAu?$AAt?$AAM?$AAi?$AAx?$AAe?$AAr?$AA?$AA@ 000140d4 common.obj 195 | 0002:0000032c ??_C@_1BE@GLOL@?$AAP?$AAc?$AAS?$AAp?$AAk?$AAr?$AAV?$AAo?$AAl?$AA?$AA@ 000140ec common.obj 196 | 0002:00000340 ??_C@_1O@MNBB@?$AAM?$AAi?$AAc?$AAV?$AAo?$AAl?$AA?$AA@ 00014100 common.obj 197 | 0002:00000350 ??_C@_1BO@HCKE@?$AAR?$AAi?$AAg?$AAh?$AAt?$AAL?$AAi?$AAn?$AAe?$AAI?$AAn?$AAV?$AAo?$AAl?$AA?$AA@ 00014110 common.obj 198 | 0002:00000370 ??_C@_1BM@KLMB@?$AAL?$AAe?$AAf?$AAt?$AAL?$AAi?$AAn?$AAe?$AAI?$AAn?$AAV?$AAo?$AAl?$AA?$AA@ 00014130 common.obj 199 | 0002:0000038c ??_C@_1BG@COJL@?$AAR?$AAi?$AAg?$AAh?$AAt?$AAC?$AAD?$AAV?$AAo?$AAl?$AA?$AA@ 0001414c common.obj 200 | 0002:000003a4 ??_C@_1BE@KMKA@?$AAL?$AAe?$AAf?$AAt?$AAC?$AAD?$AAV?$AAo?$AAl?$AA?$AA@ 00014164 common.obj 201 | 0002:000003b8 ??_C@_1BK@JCIM@?$AAR?$AAi?$AAg?$AAh?$AAt?$AAM?$AAi?$AAd?$AAi?$AAV?$AAo?$AAl?$AA?$AA@ 00014178 common.obj 202 | 0002:000003d4 ??_C@_1BI@KBIJ@?$AAL?$AAe?$AAf?$AAt?$AAM?$AAi?$AAd?$AAi?$AAV?$AAo?$AAl?$AA?$AA@ 00014194 common.obj 203 | 0002:000003ec ??_C@_1BK@MFCG@?$AAR?$AAi?$AAg?$AAh?$AAt?$AAW?$AAa?$AAv?$AAe?$AAV?$AAo?$AAl?$AA?$AA@ 000141ac common.obj 204 | 0002:00000408 ??_C@_1BI@PGCD@?$AAL?$AAe?$AAf?$AAt?$AAW?$AAa?$AAv?$AAe?$AAV?$AAo?$AAl?$AA?$AA@ 000141c8 common.obj 205 | 0002:00000420 ??_C@_1BO@NHA@?$AAR?$AAi?$AAg?$AAh?$AAt?$AAM?$AAa?$AAs?$AAt?$AAe?$AAr?$AAV?$AAo?$AAl?$AA?$AA@ 000141e0 common.obj 206 | 0002:00000440 ??_C@_1BM@NEBF@?$AAL?$AAe?$AAf?$AAt?$AAM?$AAa?$AAs?$AAt?$AAe?$AAr?$AAV?$AAo?$AAl?$AA?$AA@ 00014200 common.obj 207 | 0002:0000045c ??_7CAdapterCommon@@6BCUnknown@@@ 0001421c common.obj 208 | 0002:0000046c ??_7CAdapterCommon@@6BIAdapterPowerManagement@@@ 0001422c common.obj 209 | 0002:00000484 ??_7CAdapterCommon@@6BIAdapterCommon@@@ 00014244 common.obj 210 | 0002:000005a8 ??_7CMiniportTopologyHDA@@6BCUnknown@@@ 00014368 mintopo.obj 211 | 0002:000005b8 ??_7CMiniportTopologyHDA@@6BIMiniportTopology@@@ 00014378 mintopo.obj 212 | 0002:000005d0 ??_7CMiniportWaveCyclicHDA@@6BCUnknown@@@ 00014390 minwave.obj 213 | 0002:000005e0 ??_7CMiniportWaveCyclicHDA@@6BIMiniportWaveCyclic@@@ 000143a0 minwave.obj 214 | 0002:000005fc ??_7CMiniportWaveCyclicStreamHDA@@6BCUnknown@@@ 000143bc minwave.obj 215 | 0002:0000060c ??_7CMiniportWaveCyclicStreamHDA@@6BIMiniportWaveCyclicStream@@@ 000143cc minwave.obj 216 | 0002:00000630 ??_7CUnknown@@6B@ 000143f0 stdunk:stdunk.obj 217 | 0003:00000000 ?ulDebugOut@@3KA 00014400 adapter.obj 218 | 0003:00000008 __GUID_b7902fe9_fb0a_11d1_81b0_0060083316c1 00014408 adapter.obj 219 | 0003:00000018 __GUID_d3f0ce1c_fffc_11d1_81b0_0060083316c1 00014418 adapter.obj 220 | 0003:00000028 __GUID_c096df9c_fb09_11d1_81b0_0060083316c1 00014428 adapter.obj 221 | 0003:000000f8 ?audBufSize@@3KA 000144f8 common.obj 222 | 0003:000000fc ?BdlSize@@3KA 000144fc common.obj 223 | 0003:000007f8 __GUID_185fedf6_9905_11d1_95a9_00c04fb925d3 00014bf8 mintopo.obj 224 | 0003:00000808 __GUID_185fedef_9905_11d1_95a9_00c04fb925d3 00014c08 mintopo.obj 225 | 0003:00000818 __GUID_185fede1_9905_11d1_95a9_00c04fb925d3 00014c18 mintopo.obj 226 | 0003:00000828 __GUID_185fede0_9905_11d1_95a9_00c04fb925d3 00014c28 mintopo.obj 227 | 0003:00000838 __GUID_7607e580_c557_11d0_8a2b_00a0c9255ac1 00014c38 mintopo.obj 228 | 0003:00000848 __GUID_185fede3_9905_11d1_95a9_00c04fb925d3 00014c48 mintopo.obj 229 | 0003:00000858 __GUID_da441a60_c556_11d0_8a2b_00a0c9255ac1 00014c58 mintopo.obj 230 | 0003:00000868 __GUID_185fedee_9905_11d1_95a9_00c04fb925d3 00014c68 mintopo.obj 231 | 0003:00000878 __GUID_02b223c0_c557_11d0_8a2b_00a0c9255ac1 00014c78 mintopo.obj 232 | 0003:00000888 __GUID_185feded_9905_11d1_95a9_00c04fb925d3 00014c88 mintopo.obj 233 | 0003:00000898 __GUID_e88c9ba0_c557_11d0_8a2b_00a0c9255ac1 00014c98 mintopo.obj 234 | 0003:000008a8 __GUID_185fedec_9905_11d1_95a9_00c04fb925d3 00014ca8 mintopo.obj 235 | 0003:000008b8 __GUID_185fedeb_9905_11d1_95a9_00c04fb925d3 00014cb8 mintopo.obj 236 | 0003:000008c8 __GUID_185fedea_9905_11d1_95a9_00c04fb925d3 00014cc8 mintopo.obj 237 | 0003:000008d8 __GUID_185fede9_9905_11d1_95a9_00c04fb925d3 00014cd8 mintopo.obj 238 | 0003:000008e8 __GUID_185fede8_9905_11d1_95a9_00c04fb925d3 00014ce8 mintopo.obj 239 | 0003:000008f8 __GUID_e573adc0_c555_11d0_8a2b_00a0c9255ac1 00014cf8 mintopo.obj 240 | 0003:00000908 __GUID_185fede7_9905_11d1_95a9_00c04fb925d3 00014d08 mintopo.obj 241 | 0003:00000918 __GUID_185fede5_9905_11d1_95a9_00c04fb925d3 00014d18 mintopo.obj 242 | 0003:00000928 __GUID_3a5acc00_c557_11d0_8a2b_00a0c9255ac1 00014d28 mintopo.obj 243 | 0003:00000938 __GUID_45ffaaa0_6e1b_11d0_bcf2_444553540000 00014d38 mintopo.obj 244 | 0003:00000948 __GUID_6994ad04_93ef_11d0_a3cc_00a0c9223196 00014d48 mintopo.obj 245 | 0003:00000958 __GUID_185fedf7_9905_11d1_95a9_00c04fb925d3 00014d58 mintopo.obj 246 | 0003:00000968 __GUID_dff21ce1_f70f_11d0_b917_00a0c9223196 00014d68 mintopo.obj 247 | 0003:00000978 __GUID_dff21be1_f70f_11d0_b917_00a0c9223196 00014d78 mintopo.obj 248 | 0003:00000988 __GUID_185fedf9_9905_11d1_95a9_00c04fb925d3 00014d88 mintopo.obj 249 | 0003:00000998 __GUID_dff21fe3_f70f_11d0_b917_00a0c9223196 00014d98 mintopo.obj 250 | 0003:000009a8 __GUID_185fedfb_9905_11d1_95a9_00c04fb925d3 00014da8 mintopo.obj 251 | 0003:000009b8 __GUID_dff220e3_f70f_11d0_b917_00a0c9223196 00014db8 mintopo.obj 252 | 0003:000009c8 __GUID_185fedf8_9905_11d1_95a9_00c04fb925d3 00014dc8 mintopo.obj 253 | 0003:000009d8 __GUID_dff220f3_f70f_11d0_b917_00a0c9223196 00014dd8 mintopo.obj 254 | 0003:000009e8 __GUID_dff21fe4_f70f_11d0_b917_00a0c9223196 00014de8 mintopo.obj 255 | 0003:000009f8 __GUID_97e99ba0_bdea_11cf_a5d6_28db04c10000 00014df8 mintopo.obj 256 | 0003:00000c40 __GUID_507ae360_c554_11d0_8a2b_00a0c9255ac1 00015040 minwave.obj 257 | 0003:00000c50 __GUID_4d837fe0_c555_11d0_8a2b_00a0c9255ac1 00015050 minwave.obj 258 | 0003:00000c60 __GUID_185fedfa_9905_11d1_95a9_00c04fb925d3 00015060 minwave.obj 259 | 0003:00000c70 __GUID_fb6c4281_0353_11d1_905f_0000c0cc16ba 00015070 minwave.obj 260 | 0003:00000c80 __GUID_05589f81_c356_11ce_bf01_00aa0055595a 00015080 minwave.obj 261 | 0003:00000c90 __GUID_00000001_0000_0010_8000_00aa00389b71 00015090 minwave.obj 262 | 0003:00000ca0 __GUID_73647561_0000_0010_8000_00aa00389b71 000150a0 minwave.obj 263 | 0003:00000cb0 __GUID_518590a2_a184_11d0_8522_00c04fd9baf3 000150b0 minwave.obj 264 | 0003:00000cc0 __GUID_0f6417d6_c318_11d0_a43f_00a0c9223196 000150c0 minwave.obj 265 | 0003:00000cd0 __GUID_00000000_0000_0000_0000_000000000000 000150d0 adapter.obj 266 | 0004:0000003e _AddDevice@8 0001511e f adapter.obj 267 | 0004:0000026a ?InstallSubdevice@@YGJPAU_DEVICE_OBJECT@@PAU_IRP@@PAGABU_GUID@@3P6GJPAPAUIUnknown@@3PAU4@W4_POOL_TYPE@@@Z5PAUIResourceList@@344@Z 0001534a f adapter.obj 268 | 0004:0000066e ?StartDevice@@YGJPAU_DEVICE_OBJECT@@PAU_IRP@@PAUIResourceList@@@Z 0001574e f adapter.obj 269 | 0004:00000e6e ?AssignResources@@YGJPAUIResourceList@@PAPAU1@11111@Z 00015f4e f adapter.obj 270 | 0004:000014d8 ?NewAdapterCommon@@YGJPAPAUIUnknown@@ABU_GUID@@PAU1@W4_POOL_TYPE@@@Z 000165b8 f common.obj 271 | 0004:00001e51 ?Init@CAdapterCommon@@UAGJPAUIResourceList@@PAU_DEVICE_OBJECT@@@Z 00016f31 f common.obj 272 | 0004:00003312 ??1CAdapterCommon@@UAE@XZ 000183f2 f common.obj 273 | 0004:00003777 ?NonDelegatingQueryInterface@CAdapterCommon@@UAGJABU_GUID@@PAPAX@Z 00018857 f common.obj 274 | 0004:000038ce ?WavePortDriverDest@CAdapterCommon@@UAGPAPAUIUnknown@@XZ 000189ae f common.obj 275 | 0004:0000396e ?GetInterruptSync@CAdapterCommon@@UAGPAUIInterruptSync@@XZ 00018a4e f common.obj 276 | 0004:00003a0e ?MidiPortDriverDest@CAdapterCommon@@UAGPAPAUIUnknown@@XZ 00018aee f common.obj 277 | 0004:00003aae ?SetWaveServiceGroup@CAdapterCommon@@UAGXPAUIServiceGroup@@@Z 00018b8e f common.obj 278 | 0004:00004056 ?InitHDA@CAdapterCommon@@QAGJXZ 00019136 f common.obj 279 | 0004:00004d86 ?InitializeCodec@CAdapterCommon@@QAGJE@Z 00019e66 f common.obj 280 | 0004:000053a9 ?hda_initialize_audio_function_group@CAdapterCommon@@QAGXKK@Z 0001a489 f common.obj 281 | 0004:00005d2e ?hda_get_node_type@CAdapterCommon@@QAGEKK@Z 0001ae0e f common.obj 282 | 0004:00005dde ?hda_get_node_connection_entries@CAdapterCommon@@QAGKKKK@Z 0001aebe f common.obj 283 | 0004:00005f2e ?hda_set_node_gain@CAdapterCommon@@QAGXKKKKKE@Z 0001b00e f common.obj 284 | 0004:00006020 ?hda_enable_pin_output@CAdapterCommon@@QAGXKK@Z 0001b100 f common.obj 285 | 0004:00006060 ?hda_disable_pin_output@CAdapterCommon@@QAGXKK@Z 0001b140 f common.obj 286 | 0004:000060a0 ?hda_is_headphone_connected@CAdapterCommon@@QAGHXZ 0001b180 f common.obj 287 | 0004:0000619e ?hda_initialize_output_pin@CAdapterCommon@@QAGXK@Z 0001b27e f common.obj 288 | 0004:000065b2 ?hda_initalize_audio_output@CAdapterCommon@@QAGXK@Z 0001b692 f common.obj 289 | 0004:000069ca ?hda_initalize_audio_mixer@CAdapterCommon@@QAGXK@Z 0001baaa f common.obj 290 | 0004:00006d02 ?hda_initalize_audio_selector@CAdapterCommon@@QAGXK@Z 0001bde2 f common.obj 291 | 0004:00007008 ?CreateMiniportTopologyHDA@@YGJPAPAUIUnknown@@ABU_GUID@@PAU1@W4_POOL_TYPE@@@Z 0001c0e8 f mintopo.obj 292 | 0004:0000717a ?ProcessResources@CMiniportTopologyHDA@@AAEJPAUIResourceList@@@Z 0001c25a f mintopo.obj 293 | 0004:0000730a ?NonDelegatingQueryInterface@CMiniportTopologyHDA@@UAGJABU_GUID@@PAPAX@Z 0001c3ea f mintopo.obj 294 | 0004:000074be ??1CMiniportTopologyHDA@@UAE@XZ 0001c59e f mintopo.obj 295 | 0004:00007696 ?Init@CMiniportTopologyHDA@@UAGJPAUIUnknown@@PAUIResourceList@@PAUIPortTopology@@@Z 0001c776 f mintopo.obj 296 | 0004:000078aa ?GetDescription@CMiniportTopologyHDA@@UAGJPAPAUPCFILTER_DESCRIPTOR@@@Z 0001c98a f mintopo.obj 297 | 0004:00009088 ?CreateMiniportWaveCyclicHDA@@YGJPAPAUIUnknown@@ABU_GUID@@PAU1@W4_POOL_TYPE@@@Z 0001e168 f minwave.obj 298 | 0004:00009356 ?ProcessResources@CMiniportWaveCyclicHDA@@AAEJPAUIResourceList@@@Z 0001e436 f minwave.obj 299 | 0004:000097c2 ?ValidateFormat@CMiniportWaveCyclicHDA@@AAEJPATKSDATAFORMAT@@@Z 0001e8a2 f minwave.obj 300 | 0004:000099ee ?NonDelegatingQueryInterface@CMiniportWaveCyclicHDA@@UAGJABU_GUID@@PAPAX@Z 0001eace f minwave.obj 301 | 0004:00009ba2 ??1CMiniportWaveCyclicHDA@@UAE@XZ 0001ec82 f minwave.obj 302 | 0004:00009da6 ?Init@CMiniportWaveCyclicHDA@@UAGJPAUIUnknown@@PAUIResourceList@@PAUIPortWaveCyclic@@@Z 0001ee86 f minwave.obj 303 | 0004:0000a03e ?GetDescription@CMiniportWaveCyclicHDA@@UAGJPAPAUPCFILTER_DESCRIPTOR@@@Z 0001f11e f minwave.obj 304 | 0004:0000a22a ?DataRangeIntersection@CMiniportWaveCyclicHDA@@UAGJKPATKSDATAFORMAT@@0KPAXPAK@Z 0001f30a f minwave.obj 305 | 0004:0000a82a ?NewStream@CMiniportWaveCyclicHDA@@UAGJPAPAUIMiniportWaveCyclicStream@@PAUIUnknown@@W4_POOL_TYPE@@KEPATKSDATAFORMAT@@PAPAUIDmaChannel@@PAPAUIServiceGroup@@@Z 0001f90a f minwave.obj 306 | 0004:0000abc2 ?NonDelegatingQueryInterface@CMiniportWaveCyclicStreamHDA@@UAGJABU_GUID@@PAPAX@Z 0001fca2 f minwave.obj 307 | 0004:0000ad6e ??1CMiniportWaveCyclicStreamHDA@@UAE@XZ 0001fe4e f minwave.obj 308 | 0004:0000afe0 ?Init@CMiniportWaveCyclicStreamHDA@@QAEJPAVCMiniportWaveCyclicHDA@@KEPATKSDATAFORMAT@@PAUIDmaChannel@@@Z 000200c0 f minwave.obj 309 | 0004:0000b252 ?SetNotificationFreq@CMiniportWaveCyclicStreamHDA@@UAGKKPAK@Z 00020332 f minwave.obj 310 | 0004:0000b3e6 ?SetFormat@CMiniportWaveCyclicStreamHDA@@UAGJPATKSDATAFORMAT@@@Z 000204c6 f minwave.obj 311 | 0004:0000b62e ?SetState@CMiniportWaveCyclicStreamHDA@@UAGJW4KSSTATE@@@Z 0002070e f minwave.obj 312 | 0005:0000003e _DriverEntry@8 0002085e f adapter.obj 313 | 0005:000000ac __IMPORT_DESCRIPTOR_ntoskrnl 000208cc ntoskrnl:ntoskrnl.exe 314 | 0005:000000c0 __IMPORT_DESCRIPTOR_HAL 000208e0 hal:HAL.dll 315 | 0005:000000d4 __IMPORT_DESCRIPTOR_portcls 000208f4 portcls:portcls.sys 316 | 0005:000000e8 __NULL_IMPORT_DESCRIPTOR 00020908 ntoskrnl:ntoskrnl.exe 317 | 318 | entry point at 0005:0000003e 319 | 320 | Static symbols 321 | 322 | 0004:000079fe ?PropertyHandler_OnOff@@YGJPAU_PCPROPERTY_REQUEST@@@Z 0001cade f mintopo.obj 323 | 0004:00007e16 ?PropertyHandler_SuperMixCaps@@YGJPAU_PCPROPERTY_REQUEST@@@Z 0001cef6 f mintopo.obj 324 | 0004:00008426 ?PropertyHandler_SuperMixTable@@YGJPAU_PCPROPERTY_REQUEST@@@Z 0001d506 f mintopo.obj 325 | 0004:00008b56 ?PropertyHandler_CpuResources@@YGJPAU_PCPROPERTY_REQUEST@@@Z 0001dc36 f mintopo.obj 326 | 0001:00002e5e ?PropertyHandler_Level@@YGJPAU_PCPROPERTY_REQUEST@@@Z 0001313e f mintopo.obj 327 | 0004:00008db6 ?BasicSupportHandler@@YGJPAU_PCPROPERTY_REQUEST@@@Z 0001de96 f mintopo.obj 328 | 329 | 318 bytes saved through ICF 330 | 331 | -------------------------------------------------------------------------------- /tables.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * tables.h - HDA topology miniport tables 3 | ***************************************************************************** 4 | * Copyright (c) 1997-1999 Microsoft Corporation. All Rights Reserved. 5 | */ 6 | 7 | #ifndef _HDATOPO_TABLES_H_ 8 | #define _HDATOPO_TABLES_H_ 9 | 10 | /***************************************************************************** 11 | * The topology 12 | ***************************************************************************** 13 | * 14 | * wave>-------VOL---------------------+ 15 | * | 16 | * synth>-------VOL--+------------------+ 17 | * | | 18 | * +--SWITCH_2X2--+ | 19 | * | | 20 | * cd>-------VOL--+--SWITCH----------+ 21 | * | | | 22 | * +--SWITCH_2X2--+ | 23 | * | | 24 | * aux>-------VOL--+--SWITCH----------+ 25 | * | | | 26 | * +--SWITCH_2X2--+ | 27 | * | | 28 | * mic>--AGC--VOL--+--SWITCH----------+--VOL--BASS--TREBLE--GAIN-->lineout 29 | * | | 30 | * +--SWITCH_1X2--+-------------------------GAIN-->wavein 31 | * 32 | */ 33 | 34 | /***************************************************************************** 35 | * PinDataRangesBridge 36 | ***************************************************************************** 37 | * Structures indicating range of valid format values for bridge pins. 38 | */ 39 | static 40 | KSDATARANGE PinDataRangesBridge[] = 41 | { 42 | { 43 | sizeof(KSDATARANGE), 44 | 0, 45 | 0, 46 | 0, 47 | STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO), 48 | STATICGUIDOF(KSDATAFORMAT_SUBTYPE_ANALOG), 49 | STATICGUIDOF(KSDATAFORMAT_SPECIFIER_NONE) 50 | } 51 | }; 52 | 53 | /***************************************************************************** 54 | * PinDataRangePointersBridge 55 | ***************************************************************************** 56 | * List of pointers to structures indicating range of valid format values 57 | * for audio bridge pins. 58 | */ 59 | static 60 | PKSDATARANGE PinDataRangePointersBridge[] = 61 | { 62 | &PinDataRangesBridge[0] 63 | }; 64 | 65 | /***************************************************************************** 66 | * MiniportPins 67 | ***************************************************************************** 68 | * List of pins. 69 | */ 70 | static 71 | PCPIN_DESCRIPTOR 72 | MiniportPins[] = 73 | { 74 | // WAVEOUT_SOURCE 75 | { 76 | 0,0,0, // InstanceCount 77 | NULL, // AutomationTable 78 | { // KsPinDescriptor 79 | 0, // InterfacesCount 80 | NULL, // Interfaces 81 | 0, // MediumsCount 82 | NULL, // Mediums 83 | SIZEOF_ARRAY(PinDataRangePointersBridge), // DataRangesCount 84 | PinDataRangePointersBridge, // DataRanges 85 | KSPIN_DATAFLOW_IN, // DataFlow 86 | KSPIN_COMMUNICATION_NONE, // Communication 87 | &KSNODETYPE_LEGACY_AUDIO_CONNECTOR, // Category 88 | NULL, // Name 89 | 0 // Reserved 90 | } 91 | }, 92 | 93 | // SYNTH_SOURCE 94 | { 95 | 0,0,0, // InstanceCount 96 | NULL, // AutomationTable 97 | { // KsPinDescriptor 98 | 0, // InterfacesCount 99 | NULL, // Interfaces 100 | 0, // MediumsCount 101 | NULL, // Mediums 102 | SIZEOF_ARRAY(PinDataRangePointersBridge), // DataRangesCount 103 | PinDataRangePointersBridge, // DataRanges 104 | KSPIN_DATAFLOW_IN, // DataFlow 105 | KSPIN_COMMUNICATION_NONE, // Communication 106 | &KSNODETYPE_SYNTHESIZER, // Category 107 | &KSAUDFNAME_MIDI, // Name 108 | 0 // Reserved 109 | } 110 | }, 111 | 112 | // CD_SOURCE 113 | { 114 | 0,0,0, // InstanceCount 115 | NULL, // AutomationTable 116 | { // KsPinDescriptor 117 | 0, // InterfacesCount 118 | NULL, // Interfaces 119 | 0, // MediumsCount 120 | NULL, // Mediums 121 | SIZEOF_ARRAY(PinDataRangePointersBridge), // DataRangesCount 122 | PinDataRangePointersBridge, // DataRanges 123 | KSPIN_DATAFLOW_IN, // DataFlow 124 | KSPIN_COMMUNICATION_NONE, // Communication 125 | &KSNODETYPE_CD_PLAYER, // Category 126 | &KSAUDFNAME_CD_AUDIO, // Name 127 | 0 // Reserved 128 | } 129 | }, 130 | 131 | // LINEIN_SOURCE 132 | { 133 | 0,0,0, // InstanceCount 134 | NULL, // AutomationTable 135 | { // KsPinDescriptor 136 | 0, // InterfacesCount 137 | NULL, // Interfaces 138 | 0, // MediumsCount 139 | NULL, // Mediums 140 | SIZEOF_ARRAY(PinDataRangePointersBridge), // DataRangesCount 141 | PinDataRangePointersBridge, // DataRanges 142 | KSPIN_DATAFLOW_IN, // DataFlow 143 | KSPIN_COMMUNICATION_NONE, // Communication 144 | &KSNODETYPE_LINE_CONNECTOR, // Category 145 | &KSAUDFNAME_LINE_IN, // Name 146 | 0 // Reserved 147 | } 148 | }, 149 | 150 | // MIC_SOURCE 151 | { 152 | 0,0,0, // InstanceCount 153 | NULL, // AutomationTable 154 | { // KsPinDescriptor 155 | 0, // InterfacesCount 156 | NULL, // Interfaces 157 | 0, // MediumsCount 158 | NULL, // Mediums 159 | SIZEOF_ARRAY(PinDataRangePointersBridge), // DataRangesCount 160 | PinDataRangePointersBridge, // DataRanges 161 | KSPIN_DATAFLOW_IN, // DataFlow 162 | KSPIN_COMMUNICATION_NONE, // Communication 163 | &KSNODETYPE_MICROPHONE, // Category 164 | NULL, // Name 165 | 0 // Reserved 166 | } 167 | }, 168 | 169 | // LINEOUT_DEST 170 | { 171 | 0,0,0, // InstanceCount 172 | NULL, // AutomationTable 173 | { // KsPinDescriptor 174 | 0, // InterfacesCount 175 | NULL, // Interfaces 176 | 0, // MediumsCount 177 | NULL, // Mediums 178 | SIZEOF_ARRAY(PinDataRangePointersBridge), // DataRangesCount 179 | PinDataRangePointersBridge, // DataRanges 180 | KSPIN_DATAFLOW_OUT, // DataFlow 181 | KSPIN_COMMUNICATION_NONE, // Communication 182 | &KSNODETYPE_SPEAKER, // Category 183 | &KSAUDFNAME_VOLUME_CONTROL, // Name (this name shows up as 184 | // the playback panel name in SoundVol) 185 | 0 // Reserved 186 | } 187 | }, 188 | 189 | // WAVEIN_DEST 190 | { 191 | 0,0,0, // InstanceCount 192 | NULL, // AutomationTable 193 | { // KsPinDescriptor 194 | 0, // InterfacesCount 195 | NULL, // Interfaces 196 | 0, // MediumsCount 197 | NULL, // Mediums 198 | SIZEOF_ARRAY(PinDataRangePointersBridge), // DataRangesCount 199 | PinDataRangePointersBridge, // DataRanges 200 | KSPIN_DATAFLOW_OUT, // DataFlow 201 | KSPIN_COMMUNICATION_NONE, // Communication 202 | &KSCATEGORY_AUDIO, // Category 203 | NULL, // Name 204 | 0 // Reserved 205 | } 206 | } 207 | }; 208 | 209 | enum 210 | { 211 | WAVEOUT_SOURCE = 0, 212 | SYNTH_SOURCE, 213 | CD_SOURCE, 214 | LINEIN_SOURCE, 215 | MIC_SOURCE, 216 | LINEOUT_DEST, 217 | WAVEIN_DEST 218 | }; 219 | 220 | /***************************************************************************** 221 | * PropertiesVolume 222 | ***************************************************************************** 223 | * Properties for volume controls. 224 | */ 225 | static 226 | PCPROPERTY_ITEM PropertiesVolume[] = 227 | { 228 | { 229 | &KSPROPSETID_Audio, 230 | KSPROPERTY_AUDIO_VOLUMELEVEL, 231 | KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT, 232 | PropertyHandler_Level 233 | }, 234 | { 235 | &KSPROPSETID_Audio, 236 | KSPROPERTY_AUDIO_CPU_RESOURCES, 237 | KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT, 238 | PropertyHandler_CpuResources 239 | } 240 | }; 241 | 242 | /***************************************************************************** 243 | * AutomationVolume 244 | ***************************************************************************** 245 | * Automation table for volume controls. 246 | */ 247 | DEFINE_PCAUTOMATION_TABLE_PROP(AutomationVolume,PropertiesVolume); 248 | 249 | /***************************************************************************** 250 | * PropertiesAgc 251 | ***************************************************************************** 252 | * Properties for AGC controls. 253 | */ 254 | static 255 | PCPROPERTY_ITEM PropertiesAgc[] = 256 | { 257 | { 258 | &KSPROPSETID_Audio, 259 | KSPROPERTY_AUDIO_AGC, 260 | KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT, 261 | PropertyHandler_OnOff 262 | }, 263 | { 264 | &KSPROPSETID_Audio, 265 | KSPROPERTY_AUDIO_CPU_RESOURCES, 266 | KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT, 267 | PropertyHandler_CpuResources 268 | } 269 | }; 270 | 271 | /***************************************************************************** 272 | * AutomationAgc 273 | ***************************************************************************** 274 | * Automation table for Agc controls. 275 | */ 276 | DEFINE_PCAUTOMATION_TABLE_PROP(AutomationAgc,PropertiesAgc); 277 | 278 | /***************************************************************************** 279 | * PropertiesMute 280 | ***************************************************************************** 281 | * Properties for mute controls. 282 | */ 283 | static 284 | PCPROPERTY_ITEM PropertiesMute[] = 285 | { 286 | { 287 | &KSPROPSETID_Audio, 288 | KSPROPERTY_AUDIO_MUTE, 289 | KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT, 290 | PropertyHandler_OnOff 291 | }, 292 | { 293 | &KSPROPSETID_Audio, 294 | KSPROPERTY_AUDIO_CPU_RESOURCES, 295 | KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT, 296 | PropertyHandler_CpuResources 297 | } 298 | }; 299 | 300 | /***************************************************************************** 301 | * AutomationMute 302 | ***************************************************************************** 303 | * Automation table for mute controls. 304 | */ 305 | DEFINE_PCAUTOMATION_TABLE_PROP(AutomationMute,PropertiesMute); 306 | 307 | /***************************************************************************** 308 | * PropertiesTone 309 | ***************************************************************************** 310 | * Properties for tone controls. 311 | */ 312 | static 313 | PCPROPERTY_ITEM PropertiesTone[] = 314 | { 315 | { 316 | &KSPROPSETID_Audio, 317 | KSPROPERTY_AUDIO_BASS, 318 | KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT, 319 | PropertyHandler_Level 320 | }, 321 | { 322 | &KSPROPSETID_Audio, 323 | KSPROPERTY_AUDIO_TREBLE, 324 | KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT, 325 | PropertyHandler_Level 326 | }, 327 | { 328 | &KSPROPSETID_Audio, 329 | KSPROPERTY_AUDIO_CPU_RESOURCES, 330 | KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT, 331 | PropertyHandler_CpuResources 332 | } 333 | }; 334 | 335 | /***************************************************************************** 336 | * AutomationTone 337 | ***************************************************************************** 338 | * Automation table for tone controls. 339 | */ 340 | DEFINE_PCAUTOMATION_TABLE_PROP(AutomationTone,PropertiesTone); 341 | 342 | /***************************************************************************** 343 | * PropertiesSupermix 344 | ***************************************************************************** 345 | * Properties for supermix controls. 346 | */ 347 | static 348 | PCPROPERTY_ITEM PropertiesSupermix[] = 349 | { 350 | { 351 | &KSPROPSETID_Audio, 352 | KSPROPERTY_AUDIO_MIX_LEVEL_CAPS, 353 | KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT, 354 | PropertyHandler_SuperMixCaps 355 | }, 356 | { 357 | &KSPROPSETID_Audio, 358 | KSPROPERTY_AUDIO_MIX_LEVEL_TABLE, 359 | KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT, 360 | PropertyHandler_SuperMixTable 361 | }, 362 | { 363 | &KSPROPSETID_Audio, 364 | KSPROPERTY_AUDIO_CPU_RESOURCES, 365 | KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT, 366 | PropertyHandler_CpuResources 367 | } 368 | }; 369 | 370 | /***************************************************************************** 371 | * AutomationSupermix 372 | ***************************************************************************** 373 | * Automation table for supermix controls. 374 | */ 375 | DEFINE_PCAUTOMATION_TABLE_PROP(AutomationSupermix,PropertiesSupermix); 376 | 377 | /***************************************************************************** 378 | * TopologyNodes 379 | ***************************************************************************** 380 | * List of node identifiers. 381 | */ 382 | static 383 | PCNODE_DESCRIPTOR TopologyNodes[] = 384 | { 385 | // WAVEOUT_VOLUME 386 | { 387 | 0, // Flags 388 | &AutomationVolume, // AutomationTable 389 | &KSNODETYPE_VOLUME, // Type 390 | &KSAUDFNAME_WAVE_VOLUME // Name 391 | }, 392 | 393 | // SYNTH_VOLUME 394 | { 395 | 0, // Flags 396 | &AutomationVolume, // AutomationTable 397 | &KSNODETYPE_VOLUME, // Type 398 | &KSAUDFNAME_MIDI_VOLUME // Name 399 | }, 400 | 401 | // SYNTH_WAVEIN_SUPERMIX 402 | { 403 | 0, // Flags 404 | &AutomationSupermix, // AutomationTable 405 | &KSNODETYPE_SUPERMIX, // Type 406 | &KSAUDFNAME_MIDI_MUTE // Name 407 | }, 408 | 409 | // CD_VOLUME 410 | { 411 | 0, // Flags 412 | &AutomationVolume, // AutomationTable 413 | &KSNODETYPE_VOLUME, // Type 414 | &KSAUDFNAME_CD_VOLUME // Name 415 | }, 416 | 417 | // CD_LINEOUT_SUPERMIX 418 | { 419 | 0, // Flags 420 | &AutomationSupermix, // AutomationTable 421 | &KSNODETYPE_SUPERMIX, // Type 422 | &KSAUDFNAME_CD_MUTE // Name 423 | }, 424 | 425 | // CD_WAVEIN_SUPERMIX 426 | { 427 | 0, // Flags 428 | &AutomationSupermix, // AutomationTable 429 | &KSNODETYPE_SUPERMIX, // Type 430 | &KSAUDFNAME_CD_MUTE // Name 431 | }, 432 | 433 | // LINEIN_VOLUME 434 | { 435 | 0, // Flags 436 | &AutomationVolume, // AutomationTable 437 | &KSNODETYPE_VOLUME, // Type 438 | &KSAUDFNAME_LINE_VOLUME // Name 439 | }, 440 | 441 | // LINEIN_LINEOUT_SUPERMIX 442 | { 443 | 0, // Flags 444 | &AutomationSupermix, // AutomationTable 445 | &KSNODETYPE_SUPERMIX, // Type 446 | &KSAUDFNAME_LINE_MUTE // Name 447 | }, 448 | 449 | // LINEIN_WAVEIN_SUPERMIX 450 | { 451 | 0, // Flags 452 | &AutomationSupermix, // AutomationTable 453 | &KSNODETYPE_SUPERMIX, // Type 454 | &KSAUDFNAME_LINE_MUTE // Name 455 | }, 456 | 457 | // MIC_AGC 458 | { 459 | 0, // Flags 460 | &AutomationAgc, // AutomationTable 461 | &KSNODETYPE_AGC, // Type 462 | NULL // Name 463 | }, 464 | 465 | // MIC_VOLUME 466 | { 467 | 0, // Flags 468 | &AutomationVolume, // AutomationTable 469 | &KSNODETYPE_VOLUME, // Type 470 | &KSAUDFNAME_MIC_VOLUME // Name 471 | }, 472 | 473 | // MIC_LINEOUT_MUTE 474 | { 475 | 0, // Flags 476 | &AutomationMute, // AutomationTable 477 | &KSNODETYPE_MUTE, // Type 478 | &KSAUDFNAME_MIC_MUTE // Name 479 | }, 480 | 481 | // MIC_WAVEIN_SUPERMIX 482 | { 483 | 0, // Flags 484 | &AutomationSupermix, // AutomationTable 485 | &KSNODETYPE_SUPERMIX, // Type 486 | &KSAUDFNAME_MIC_MUTE // Name 487 | }, 488 | 489 | // LINEOUT_MIX 490 | { 491 | 0, // Flags 492 | NULL, // AutomationTable 493 | &KSNODETYPE_SUM, // Type 494 | NULL // Name 495 | }, 496 | 497 | // LINEOUT_VOL 498 | { 499 | 0, // Flags 500 | &AutomationVolume, // AutomationTable 501 | &KSNODETYPE_VOLUME, // Type 502 | &KSAUDFNAME_MASTER_VOLUME // Name 503 | }, 504 | 505 | // LINEOUT_BASS 506 | { 507 | 0, // Flags 508 | &AutomationTone, // AutomationTable 509 | &KSNODETYPE_TONE, // Type 510 | &KSAUDFNAME_BASS // Name 511 | }, 512 | 513 | // LINEOUT_TREBLE 514 | { 515 | 0, // Flags 516 | &AutomationTone, // AutomationTable 517 | &KSNODETYPE_TONE, // Type 518 | &KSAUDFNAME_TREBLE // Name 519 | }, 520 | 521 | // LINEOUT_GAIN 522 | { 523 | 0, // Flags 524 | &AutomationVolume, // AutomationTable 525 | &KSNODETYPE_VOLUME, // Type 526 | NULL // Name 527 | }, 528 | 529 | // WAVEIN_MIX 530 | { 531 | 0, // Flags 532 | NULL, // AutomationTable 533 | &KSNODETYPE_SUM, // Type 534 | &KSAUDFNAME_RECORDING_SOURCE // Name 535 | }, 536 | 537 | // WAVEIN_GAIN 538 | { 539 | 0, // Flags 540 | &AutomationVolume, // AutomationTable 541 | &KSNODETYPE_VOLUME, // Type 542 | &KSAUDFNAME_WAVE_IN_VOLUME // Name 543 | } 544 | }; 545 | 546 | /***************************************************************************** 547 | * ControlValueCache 548 | ***************************************************************************** 549 | */ 550 | static 551 | LONG ControlValueCache[] = 552 | { // Left // Right 553 | 0xFFF9F203, 0xFFF9F203, // WAVEOUT_VOLUME 554 | 0xFFF9F203, 0xFFF9F203, // SYNTH_VOLUME 555 | 0xFFF9F203, 0xFFF9F203, // CD_VOLUME 556 | 0xFFF9F203, 0xFFF9F203, // LINEIN_VOLUME 557 | 0xFFF9F203, 0, // MIC_VOLUME 558 | 0xFFF9F203, 0xFFF9F203, // LINEOUT_VOL 559 | 0x000242A0, 0x000242A0, // LINEOUT_BASS 560 | 0x000242A0, 0x000242A0, // LINEOUT_TREBLE 561 | 0x000C0000, 0x000C0000, // LINEOUT_GAIN 562 | 0x00000000, 0x00000000 // WAVEIN_GAIN 563 | }; 564 | 565 | typedef struct 566 | { 567 | BYTE BaseRegister; // H/W access parameter 568 | ULONG CacheOffset; // ControlValueCache offset 569 | } ACCESS_PARM,*PACCESS_PARM; 570 | 571 | /***************************************************************************** 572 | * AccessParams 573 | ***************************************************************************** 574 | * Table of H/W access parameters 575 | */ 576 | static 577 | ACCESS_PARM AccessParams[] = 578 | { 579 | { DSP_MIX_VOICEVOLIDX_L, 0 }, // WAVEOUT_VOLUME 580 | 581 | { DSP_MIX_FMVOLIDX_L, 2 }, // SYNTH_VOLUME 582 | { MIXBIT_SYNTH_WAVEIN_R, ULONG(-1) }, // SYNTH_WAVEIN_SUPERMIX 583 | 584 | { DSP_MIX_CDVOLIDX_L, 4 }, // CD_VOLUME 585 | { MIXBIT_CD_LINEOUT_R, ULONG(-1) }, // CD_LINEOUT_SUPERMIX 586 | { MIXBIT_CD_WAVEIN_R, ULONG(-1) }, // CD_WAVEIN_SUPERMIX 587 | 588 | { DSP_MIX_LINEVOLIDX_L, 6 }, // LINEIN_VOLUME 589 | { MIXBIT_LINEIN_LINEOUT_R, ULONG(-1) }, // LINEIN_LINEOUT_SUPERMIX 590 | { MIXBIT_LINEIN_WAVEIN_R, ULONG(-1) }, // LINEIN_WAVEIN_SUPERMIX 591 | 592 | { 0, ULONG(-1) }, // MIC_AGC 593 | { DSP_MIX_MICVOLIDX, 8 }, // MIC_VOLUME 594 | { 0, ULONG(-1) }, // MIC_LINEOUT_MUTE 595 | { 0, ULONG(-1) }, // MIC_WAVEIN_SUPERMIX 596 | 597 | { 0, ULONG(-1) }, // LINEOUT_MIX 598 | { DSP_MIX_MASTERVOLIDX_L, 10 }, // LINEOUT_VOL 599 | { DSP_MIX_BASSIDX_L, 12 }, // LINEOUT_BASS 600 | { DSP_MIX_TREBLEIDX_L, 14 }, // LINEOUT_TREBLE 601 | { DSP_MIX_OUTGAINIDX_L, 16 }, // LINEOUT_GAIN 602 | 603 | { 0, ULONG(-1) }, // WAVEIN_MIX 604 | { DSP_MIX_INGAINIDX_L, 18 } // WAVEIN_GAIN 605 | }; 606 | 607 | enum 608 | { 609 | WAVEOUT_VOLUME = 0, 610 | SYNTH_VOLUME, 611 | SYNTH_WAVEIN_SUPERMIX, 612 | CD_VOLUME, 613 | CD_LINEOUT_SUPERMIX, 614 | CD_WAVEIN_SUPERMIX, 615 | LINEIN_VOLUME, 616 | LINEIN_LINEOUT_SUPERMIX, 617 | LINEIN_WAVEIN_SUPERMIX, 618 | MIC_AGC, 619 | MIC_VOLUME, 620 | MIC_LINEOUT_MUTE, 621 | MIC_WAVEIN_SUPERMIX, 622 | LINEOUT_MIX, 623 | LINEOUT_VOL, 624 | LINEOUT_BASS, 625 | LINEOUT_TREBLE, 626 | LINEOUT_GAIN, 627 | WAVEIN_MIX, 628 | WAVEIN_GAIN 629 | }; 630 | 631 | /***************************************************************************** 632 | * ConnectionTable 633 | ***************************************************************************** 634 | * Table of topology unit connections. 635 | * 636 | * Pin numbering is technically arbitrary, but the convention established here 637 | * is to number a solitary output pin 0 (looks like an 'o') and a solitary 638 | * input pin 1 (looks like an 'i'). Even destinations, which have no output, 639 | * have an input pin numbered 1 and no pin 0. 640 | * 641 | * Nodes are more likely to have multiple ins than multiple outs, so the more 642 | * general rule would be that inputs are numbered >=1. If a node has multiple 643 | * outs, none of these conventions apply. 644 | * 645 | * Nodes have at most one control value. Mixers are therefore simple summing 646 | * nodes with no per-pin levels. Rather than assigning a unique pin to each 647 | * input to a mixer, all inputs are connected to pin 1. This is acceptable 648 | * because there is no functional distinction between the inputs. 649 | * 650 | * There are no multiplexers in this topology, so there is no opportunity to 651 | * give an example of a multiplexer. A multiplexer should have a single 652 | * output pin (0) and multiple input pins (1..n). Its control value is an 653 | * integer in the range 1..n indicating which input is connected to the 654 | * output. 655 | * 656 | * In the case of connections to pins, as opposed to connections to nodes, the 657 | * node is identified as PCFILTER_NODE and the pin number identifies the 658 | * particular filter pin. 659 | */ 660 | static 661 | PCCONNECTION_DESCRIPTOR MiniportConnections[] = 662 | { // FromNode, FromPin, ToNode, ToPin 663 | { PCFILTER_NODE, WAVEOUT_SOURCE, WAVEOUT_VOLUME, 1 }, 664 | { WAVEOUT_VOLUME, 0, LINEOUT_MIX, 1 }, 665 | 666 | { PCFILTER_NODE, SYNTH_SOURCE, SYNTH_VOLUME, 1 }, 667 | { SYNTH_VOLUME, 0, LINEOUT_MIX, 2 }, 668 | { SYNTH_VOLUME, 0, SYNTH_WAVEIN_SUPERMIX, 1 }, 669 | { SYNTH_WAVEIN_SUPERMIX, 0, WAVEIN_MIX, 1 }, 670 | 671 | { PCFILTER_NODE, CD_SOURCE, CD_VOLUME, 1 }, 672 | { CD_VOLUME, 0, CD_LINEOUT_SUPERMIX, 1 }, 673 | { CD_LINEOUT_SUPERMIX, 0, LINEOUT_MIX, 3 }, 674 | { CD_VOLUME, 0, CD_WAVEIN_SUPERMIX, 1 }, 675 | { CD_WAVEIN_SUPERMIX, 0, WAVEIN_MIX, 2 }, 676 | 677 | { PCFILTER_NODE, LINEIN_SOURCE, LINEIN_VOLUME, 1 }, 678 | { LINEIN_VOLUME, 0, LINEIN_LINEOUT_SUPERMIX,1 }, 679 | { LINEIN_LINEOUT_SUPERMIX,0, LINEOUT_MIX, 4 }, 680 | { LINEIN_VOLUME, 0, LINEIN_WAVEIN_SUPERMIX, 1 }, 681 | { LINEIN_WAVEIN_SUPERMIX, 0, WAVEIN_MIX, 3 }, 682 | 683 | { PCFILTER_NODE, MIC_SOURCE, MIC_AGC, 1 }, 684 | { MIC_AGC, 0, MIC_VOLUME, 1 }, 685 | { MIC_VOLUME, 0, MIC_LINEOUT_MUTE, 1 }, 686 | { MIC_LINEOUT_MUTE, 0, LINEOUT_MIX, 5 }, 687 | { MIC_VOLUME, 0, MIC_WAVEIN_SUPERMIX, 1 }, 688 | { MIC_WAVEIN_SUPERMIX, 0, WAVEIN_MIX, 4 }, 689 | 690 | { LINEOUT_MIX, 0, LINEOUT_VOL, 1 }, 691 | { LINEOUT_VOL, 0, LINEOUT_BASS, 1 }, 692 | { LINEOUT_BASS, 0, LINEOUT_TREBLE, 1 }, 693 | { LINEOUT_TREBLE, 0, LINEOUT_GAIN, 1 }, 694 | { LINEOUT_GAIN, 0, PCFILTER_NODE, LINEOUT_DEST }, 695 | 696 | { WAVEIN_MIX, 0, WAVEIN_GAIN, 1 }, 697 | { WAVEIN_GAIN, 0, PCFILTER_NODE, WAVEIN_DEST } 698 | }; 699 | 700 | /***************************************************************************** 701 | * MiniportFilterDescription 702 | ***************************************************************************** 703 | * Complete miniport description. 704 | */ 705 | static 706 | PCFILTER_DESCRIPTOR MiniportFilterDescriptor = 707 | { 708 | 0, // Version 709 | NULL, // AutomationTable 710 | sizeof(PCPIN_DESCRIPTOR), // PinSize 711 | SIZEOF_ARRAY(MiniportPins), // PinCount 712 | MiniportPins, // Pins 713 | sizeof(PCNODE_DESCRIPTOR), // NodeSize 714 | SIZEOF_ARRAY(TopologyNodes), // NodeCount 715 | TopologyNodes, // Nodes 716 | SIZEOF_ARRAY(MiniportConnections), // ConnectionCount 717 | MiniportConnections, // Connections 718 | 0, // CategoryCount 719 | NULL // Categories 720 | }; 721 | 722 | #endif 723 | --------------------------------------------------------------------------------