microsoft / Windows-driver-samples

This repo contains driver samples prepared for use with Microsoft Visual Studio and the Windows Driver Kit (WDK). It contains both Universal Windows Driver and desktop-only driver samples.
Microsoft Public License
6.98k stars 4.94k forks source link

[audio/simpleaudiosample] devcon install failed #1225

Open want20 opened 2 weeks ago

want20 commented 2 weeks ago

OS: win10 21h2 VS: 2020 ERROR: devcon.exe failed!

Image

LOG: in C:\Windows\INF\setupapi.dev.log

     cmd: .\devcon-x64.exe  install SimpleAudioSample.inf Root\SimpleAudioSample
     ndv: INF path: C:\SimpleAudioSampleDriver\SimpleAudioSample.inf
     ndv: Install flags: 0x00000001
     ndv: {Update Device Driver - ROOT\MEDIA\0001}
     ndv:      Search options: 0x00000080
     ndv:      Searching single INF 'C:\SimpleAudioSampleDriver\SimpleAudioSample.inf'
     dvi:      {Build Driver List} 17:47:02.148
     dvi:           Searching for hardware ID(s):
     dvi:                root\simpleaudiosample
     dvi:      {Build Driver List - exit(0x00000000)} 17:47:02.216
!    ndv:      No matching drivers found in single INF
     dvi:      {DIF_SELECTBESTCOMPATDRV} 17:47:02.217
     dvi:           Default installer: Enter 17:47:02.219
     dvi:                {Select Best Driver}
!    dvi:                     Selecting driver failed(0xe0000228)
     dvi:                {Select Best Driver - exit(0xe0000228)}
!    dvi:           Default installer: failed
!    dvi:           Error 0xe0000228: There are no compatible drivers for this device.
     dvi:      {DIF_SELECTBESTCOMPATDRV - exit(0xe0000228)} 17:47:02.222
!    ndv:      Unable to select best compatible driver. Error = 0xe0000228
     ndv:      No drivers found for device.
     ndv: {Update Device Driver - exit(00000103)}
!    ndv: No better matching drivers found for device 'ROOT\MEDIA\0001'.
!    ndv: No devices were updated.

REASON: inf file (autogen by vs) has problems FIX:

[Manufacturer]
;%MfgName%=SIMPLEAUDIOSAMPLE,NTamd64.10.0...22000
%MfgName%=SIMPLEAUDIOSAMPLE,NTamd64

;[SIMPLEAUDIOSAMPLE.NTamd64.10.0...22000]
[SIMPLEAUDIOSAMPLE.NTamd64]
%SIMPLEAUDIOSAMPLE_SA.DeviceDesc%=SIMPLEAUDIOSAMPLE_SA, ROOT\SimpleAudioSample

PS: delete sdk version number in section name, then you can install successfully! Image

v-junyli commented 5 days ago

@microsoft/windowsaudio can you take a look?

mansouriahmad commented 4 days ago

Having the same issue.