Repository navigation
Add the Low-Latency Audio Driver Selector, a release build script and a preview installer - #43
Pete Brown (Psychlist1972) wants to merge 3 commits into
Conversation
…iew installer - src/driver-selector: a WinUI 3 app where a customer chooses the driver each USB Audio 2.0 device uses: the low-latency driver, the Windows USB Audio 2.0 driver, or the manufacturer's driver. USB Audio 1.0 devices aren't listed, because the driver doesn't support them. - src/shared/driver-store: driver store code shared by the app and the installer. - src/installers: WiX package and bundle for x64 and Arm64 with the Visual C++ runtime, the Windows App Runtime, the ASIO driver and its registration, the ASIO control panel, the Driver Selector and the driver package. C++ custom actions add the driver package to the driver store and remove it. Branding.wxi holds every value a release partner sets. - build/build-all.ps1, sign-files.ps1, version.json: a release build that signs with a certificate chosen by thumbprint and makes the .cab files for attestation signing. build/build.ps1 and src/installer are unchanged. No existing file changes. Not yet tested on hardware: no install, uninstall or driver change has run.
|
I confirmed that clicking “Use low-latency driver” in LowLatencyDriverSelector.exe fails to switch the driver and displays the following message: “The driver wasn't changed. Windows couldn't install the driver (error 0x00000490). Element not found.” In DriverStore.cpp, InstallDriverFromInf uses EqualsNoCase to compare the INF filenames recorded in detail.InfFileName and expectedInfName. However, detail.InfFileName contains oemX.inf, while expectedInfName contains usbaudio2-acx.inf. Since the filenames do not match, InstallDriverFromInf returns ERROR_NOT_FOUND, causing the driver switch to fail. low-latency-audio/src/shared/driver-store/DriverStore.cpp Lines 679 to 683 in 7b4f993 |
|
Pete Brown (@Psychlist1972) Yasuto Kaida (@ymh-yasuto-kaida) One additional request: I'd like to change the ASIO driver name from "USB ASIO" to "USBAudio2-ACX ASIO". The current name makes it difficult for users who have multiple ASIO drivers installed to identify the correct driver. I'll approve the PR once these changes are incorporated. |
…lector dummy hardware ID, and raise minimum OS build to 22621
…ncyDriverSelector.
Add the Low-Latency Audio Driver Selector, a release build script and a preview installer
Summary
This adds what a preview release needs around the driver and the ASIO driver:
build\build-all.ps1, a release build: builds every project, stages and checks what ships, signs with a code signing certificate chosen by its thumbprint, makes the .cab files for attestation signing, and builds the installers. The existingbuild\build.ps1is unchanged.src\installeris unchanged.The driver supports USB Audio 2.0 only. The Driver Selector lists only USB Audio 2.0 devices, and never offers the low-latency driver for a USB Audio 1.0 device.
Every file in this pull request is new. No existing file changes.
How it works for a customer
LowLatencyAudioSetup-<version>-<platform>.exe. It installs the runtimes and the .msi. The .msi adds the driver package to the Windows driver store but puts it on no device, so nothing changes yet.On an upgrade, devices already on an older copy of the driver move to the new one by themselves, and older copies nothing uses are deleted.
What's in it
src\driver-selectorsrc\shared\driver-storesrc\installersBranding.wxi. See its README.build\build-all.ps1,build\sign-files.ps1,build\version.jsonbuild\.gitignoreWhat Yamaha needs to change before a release
The driver INF (
src\uac2-driver\USBAudio2-ACX.inf)Replace the model lines with one line that matches no real device. The Driver Selector installs the driver from a class driver list built from this one INF, the way Device Manager's Have disk does, so the INF doesn't need to list devices. Any ID that no device reports works, for example:
[Standard.NT$ARCH$.10.0...22621] %USBAudio2-ACX.DeviceDesc%=USBAudio2-ACX_Device, USBAudio2-ACX\ChosenInDriverSelectorPlease confirm that InfVerif and attestation signing accept it.
Set the minimum Windows build in the models section to the real one. The driver uses ACX 1.1 and KMDF 1.33, which shipped in Windows 11, version 22H2 (build 22621). The INF currently says 16299. Only Windows 11 25h2 and later shall be supported.
Keep
Providerthe same in every release. The installer finds the copies older releases put in the driver store by INF file name and provider. If you want a different provider name, change it before the first release.Raise
DriverVerin every release. The installer and the Driver Selector compare it to decide which copy is newer.Keep the INF file name
USBAudio2-ACX.infand the service nameUSBAudio2-ACX, or change them insrc\driver-selector\SelectorConfig.h,src\installers\low-latency-audio-installer\package\Package.wxs(DriverInfName) and the top ofbuild\build-all.ps1.Today the INF puts the driver on the whole device for three Steinberg models (UR22, UR44C, IXO22). The Driver Selector always puts it on the audio interface (
MI_xx) under Windows' composite driver. Please check that those three work that way. A device an older INF already put on the whole device shows up in the Driver Selector, which moves it to the audio interface.src\installers\low-latency-audio-installer\Branding.wxiEvery value marked PLACEHOLDER: publisher, product name, install folder, Start menu folder and shortcut names, license and support links, and the minimum Windows build. The two upgrade codes are marked KEEP. If Yamaha ships its own release line, replace both with new GUIDs before the first release, and then never change them again.
The ASIO driver name and class ID there must match
DRIVER_NAME_8bandIID_ASIO_DRIVERinsrc\uac2-asio\USBAsio.cpp:USB ASIOon x64 andUSB ASIO (ARM64X)on Arm64.Other placeholders
src\driver-selector\Assets\AppIcon.ico, and the installer logo,src\installers\low-latency-audio-installer\bundle\logo.png.src\driver-selector\Resources.rcandsrc\installers\low-latency-audio-installer\custom-actions\Resources.rc.build\version.json. Raisepatchfor every release that must upgrade an earlier one.If Yamaha's open pull request changes these
packages.configand the package imports inLowLatencyDriverSelector.vcxprojmust match the control panel's exactly.build-all.ps1stops if the shared files differ.<exe name>.pri, and neither may produce aresources.pri.build-all.ps1checks this too.src\vsfiles\out.build-all.ps1stages from them.Building and signing a release
PowerShell 7.2 or later, Visual Studio 2022 or later with the C++ desktop workload, the Windows SDK, the Windows Driver Kit for the driver, and the Steinberg ASIO SDK in
src\uac2-asio\asiofor the ASIO driver. WiX comes from NuGet. The build downloads the two runtime installers from Microsoft and checks Microsoft signed them.Signing uses a certificate from your certificate store, chosen by its thumbprint. An EV certificate on a hardware token works: signtool asks for the token's password. Attestation signing needs the EV certificate registered in Partner Center.
The installers and symbols land in
build\release\<version>. A signed build stops if the staged driver isn't signed by Microsoft.src\installers\README.mdhas the details, including how to try the signing steps with a throwaway test certificate.Attestation-signed drivers load on Windows 10 and Windows 11 desktop editions only.
What was tested
On one Windows 11 PC, x64, without administrator rights:
build-all.ps1 -Target Apps,Stage,Setup,Releasefor both platforms, with stand-in files for the driver and the ASIO DLL, because the WDK and the ASIO SDK weren't available. The .msi tables (files, registry, custom actions, sequence, launch conditions, upgrades) and the bundle manifest (chain, conditions, launch target) were read back and match this description.DriverCabtarget, with stand-in files: each .cab holds<platform>\USBAudio2-ACX.inf,.sysand.pdb.What was not tested
DiInstallDevice, has not run yet.--quiet) and their exit codes.Suggested test pass
pnputil /enum-driverslistsUSBAudio2-ACX.infand no device changed driver.pnputil /enum-driversno longer lists the package.Known limitations