New Developments in WDM Audio Drivers in Windows XP Martin Puryear Development Lead Windows Core Audio Microsoft Corporation.

Slides:



Advertisements
Similar presentations
This course is designed for system managers/administrators to better understand the SAAZ Desktop and Server Management components Students will learn.
Advertisements

Microsoft Windows NT Embedded 4.0
Working with Disks and Devices
Device Virtualization Architecture
WDM 드라이버의 기본 구조 What is WDM?
4/1/2017 4:16 PM.
Operating System Structures
SimPhonics, Inc. FXDirect Audio System for V+. SimPhonics, Inc. What Is FXDirect ® Audio Subsystem Add-on to V+ –Currently built-in Consists of Objects.
Fidelity Test – Import and Export Introduction and Troubleshooting Matthew van Eerde, Windows Sound.
WSUS Presented by: Nada Abdullah Ahmed.
MCITP Guide to Microsoft Windows Server 2008 Server Administration (Exam #70-646) Chapter 11 Windows Server 2008 Virtualization.
11.1 © 2004 Pearson Education, Inc. Exam Planning, Implementing, and Maintaining a Microsoft Windows Server 2003 Active Directory Infrastructure.
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of Creating Eclipse plug-ins.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 2: Managing Hardware Devices.
MCDST : Supporting Users and Troubleshooting a Microsoft Windows XP Operating System Chapter 3: Upgrading from a Previous Version of Windows.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 8: Implementing and Managing Printers.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 8: Implementing and Managing Printers.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 8: Implementing and Managing Printers.
Operating Systems.
Sound Chapter Types of Sound Waveforms MIDI Sound is related to many things in computers but only Wav and MIDI exist in PCs.
SP2 Mikael Nystrom. Agenda Översikt Installation.
HD Audio 1.1 Overview David Flenniken Software Design Engineer Windows Media Devices Group microsoft.com Microsoft Corporation Soccer Liu Software.
MSS & AMS Name and configure MIDI controllers, devices and sound modules. Control their routing to Pro Tools MSS - Configurations can be imported or exported.
Case Study: ATI Device Power Management In Windows Vista Phil Mummah Software Architect ATI.
Guide to MCSE , Second Edition, Enhanced 1 Objectives Understand and use the Control Panel applets Describe the versatility of the Microsoft Management.
Windows audio architecture Win MM Application DirectSound Application SysAudio.SYS Kmixer.SYS WinMM.DLLDSound.DLL Device Drive Container USB Device Driver.
Chapter Three Using the System Utilities. Objectives Understand and use the Control Panel applets Understand and use the Control Panel applets Use the.
Hands-On Microsoft Windows Server 2008
Crystal Hoyer Program Manager IIS Team Preview of features that will be announced at MIX09 Please do not blog, take pictures or video of session.
Using the PSoC USB March 17, 2012 Lloyd Moore, President/Owner.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 2: Managing Hardware Devices.
Hands-On Microsoft Windows Server 2003 Administration Chapter 2 Managing Windows Server 2003 Hardware and Software.
Chapter 6 Configuring Windows Server 2008 Printing
By Anthony W. Hill & Course Technology1 Common End User Problems.
Developing WIA Drivers Byron Changuion Developer Windows Imaging Group Microsoft Corporation.
Module 14: Configuring Server Security Compliance
11 MANAGING AND DISTRIBUTING SOFTWARE BY USING GROUP POLICY Chapter 5.
1 Thomas Lippert Senior Product Manager - Mobile What’s new in SMC 5.0.
Windows Small Business Server 2003 Setting up and Connecting David Overton Partner Technical Specialist.
Guide to Linux Installation and Administration, 2e1 Chapter 2 Planning Your System.
A+ Guide to Managing and Maintaining Your PC Fifth Edition Chapter 13 Understanding and Installing Windows 2000 and Windows NT.
May 8, USB Client Driver Etiquette Jay Senior Windows Base Developer Microsoft.
PI Data Archive Server COM Points Richard Beeson.
H.323, IP Multicast Conferencing, And TAPI 3.0 Don Ryan Development Lead Windows Networking And Communications Microsoft Corporation.
A Critical Analysis of the Windows mLAN Driver
WHDC PowerPoint Template Notes & Handouts
Storage Device Design Pattern JEFF MEISSNER; KEN HARDY Windows Program Management.
11 INSTALLING AND MANAGING HARDWARE Chapter 6. Chapter 6: Installing and Managing Hardware2 INSTALLING AND MANAGING HARDWARE  Install hardware in a Microsoft.
NDIS Intermediate Drivers Larry Cleeton Program Manager Windows Networking And Communications Microsoft Corporation.
WHQL Code Coverage Prototype Program Andy Wen. 2 Agenda What is Code Coverage Prototype Program? What is Code Coverage Prototype Program? A prototype.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Sound. Sound Capture We capture, or record, sound by a process called sampling: “measuring” the sound some number of times per second. Sampling rate is.
Hands-On Microsoft Windows Server 2008 Chapter 5 Configuring Windows Server 2008 Printing.
DEVICE DRIVERS Presented by: Group 7. What are Device Drivers? Device driver or hardware driver is a program that manages the system’s interaction with.
Using the USB Audio Class Driver – Best Practices and Common Pitfalls
What is DirectX? DirectX is built by Microsoft as a collection of API’s (Application Programming Interfaces) for the purpose of multimedia processing.
The Post Windows Operating System
Aurimas Jankauskas IT3gr.
Windows 8 Hardware Certification Program and KIT Overview
Introduction to Computers
Debunking the Top 10 Myths of Small Business Server: Using Windows SBS in Larger Environments Abstract: This session will debunk some of the common myths.
Welcome To The WinHEC 2000 Device Driver Sessions Sandy Spinrad Device Driver Evangelist Microsoft Corporation.
CONFIGURING HARDWARE DEVICE & START UP PROCESS
Routing and Switching Essentials v6.0
Greg Bell Business Development Mgr Industrial & Security Markets
Windows Virtual PC / Hyper-V
Microsoft Core Storage Update
Outline Operating System Organization Operating System Examples
HD Audio 1.1 Overview David Flenniken
Core Audio API Augustinas Žiliukas IT 3 grupė.
Presentation transcript:

New Developments in WDM Audio Drivers in Windows XP Martin Puryear Development Lead Windows Core Audio Microsoft Corporation

Agenda Slides to be posted on WinHEC site New features DDK documentation additions/updates New/updated DDK samples New DDK tools Important OS changes Common problems Resources for WDM audio developers What can you do next?

New Features

New Features Added in Windows XP Improved multi-channel support Support for multi-channel volume/mute KS topology nodes Translates into appropriate mixer controls No Mixer API changes needed (waveOutSetVolume, DirectSound SetPan APIs not yet revised, still stereo only) DDK documentation and relevant sample code (in ac97smpl) to be added post-Beta 2 Increased SysAudio numChans 6->24

New Features Added in Windows XP (2) Additional multi-channel support Multi-channel volume property page Invoked from SndVol32 and Sounds CPL (Volume|Speaker Volume…) Manipulates individual volumes of multi-channel controls DirectSound SetSpeakerConfig API and CPL Volume|Advanced|Speakers pane New enums for 7.1 and “No speakers” Revamped bitmaps to better express configs Fixed KMixer SuperMix defaults

New Features Added in Windows XP (3) Extended capabilities Returns GUIDs for MID & PID, ULONGs for driver version & revision, plus GUID to specify a long name stored in registry (MediaCategories) by INF KS property on wave filter KSPROPSETID_General KSPROPERTY_GENERAL_COMPONENTID DDK sample: MSVAD\simple 1394 audio class driver (AVCAudio.sys) AC97 controller drivers Intel (ICH2), VIA, ALi, SiS Strong suggestion: new codecs pass all WHQL tests with Windows XP in-box controller drivers

New Features Added in Windows XP (4) 64-bit support All core components and DDK samples ported HW drivers for USBAudio, CS4281, AVCAudio Native 64-bit API support: DirectSound, DirectShow, KsProxy/KSUSER waveOut/In, midiOut/In, mixer, aux, MCI, ACM Not enabled: DirectMusic 32-bit WOW API support: DirectSound (emulation only), DirectShow waveOut/In, midiOut, mixer, aux, MCI, ACM Not enabled: KsProxy/KSUSER, DirectSound (non-emulated), midiIn, DirectMusic

New Features Added in Windows XP (5) Acoustic Echo Cancellation support Noise Suppression and Automatic Gain Control are optionally included Inserted at lowest level (post-mixer) Accessed via DSound8 full duplex object Can be hardware-accelerated MS system-supplied AEC AVStream component 8 kHz-22 kHz, 16-bit mono No clock rate matching for input/output

New Features Added in Windows XP (6) Global Effects Filters (GFX) Recommended for hardware-specific master effects (speaker compensation, mic array filters) Also useful for general audio processing (EQ) Applied to final playback mix or original capture signal for all APIs Hardware-specific effects automatically added Sounds control panel (Audio|Advanced…|Effects) used to add, reorder, manipulate effects Vendor-supplied UI invoked from Sounds CPL Vendor implements effect as AVStream filter Restricted to USB devices on Windows XP Future OS releases will allow application to any audio device with supporting HW driver

New Features Added in Windows Me Secure Audio Path (kernel mode DRM) Now required for Windows XP logo USB MIDI WinME QFE available for MIDI/audio devices Non-PCM output Also in Windows 2000 Service Pack 2 Also available in Windows 98 SE QFE Contact Microsoft Product Support Services for this Peakmeter support and supporting SndVol UI

New Features Added in QFE Releases QFEs are supersets, backward-inclusive Windows 98 SE QFE – 269601USA8.EXE Non-PCM, Windows 2000 fixes, SoftFM Not included: volume persistence, DSound cloning, waveOutGetPosition (non-PCM), IPortClsVersion Windows Me QFE – 280127USAM.EXE USB MIDI, CD slider, glitch reduction Talk to PSS for redist rights for 9x QFEs

New Features Added in Service Pack Releases Windows 2000 Service Pack 1 No audio changes Windows 2000 Service Pack 2 Non-PCM, volume persistence, DSound cloning, IPortClsVersion No further SP work expected at this time

(Un)Features What’s not present in Windows XP HW acceleration of DirectX 8 Planned for subsequent release USB2 support Support for tons of 1394 devices (mLan) Very low-latency PCM via DSound/wave Multi-channel peakmeters, SetPan, waveOutSetVolume, supermix API Dynamic changes in topology or format Support for custom mixer line controls

DDK Documentation Additions and Updates (big thanks to Windows DDK doc team, particularly Jerry Van Aken!)

DDK Doc Changes New Material Hardware Events DirectSound HW Acceleration Slider DirectSound speaker configuration settings Supporting non-PCM wave formats From hwdev/audio White Paper Digital Rights Management From Windows 2000 DDK addendum WDM Audio platform differences

DDK Doc Changes New Material (2) KMixer driver Sample Rate Conversion and mixing policy Factors governing Wave-output latency DirectSound capture effects Including AEC, AGC, NS Multifunction audio devices Installing and configuring Audio drivers Windows 2000 device-interface limits

DDK Doc Changes New Material (3) Extensions to legacy Windows Multimedia APIs Extended capabilities in WDM Audio drivers Accessing the preferred Device ID Media-Class INF Extensions AlsoInstall, Known Files Data-intersection handlers Power management for Audio drivers Version numbering for Audio drivers

DDK Doc Changes Existing information augmented USB Audio/MIDI class driver description Supporting hardware acceleration of DirectSound 2-dimensional mixing Kernel Streaming topology to Audio Mixer API translation Clarified use of: PcNewRegistryKey, NewMasterDmaChannel, PcRegisterPhysicalConnection*, PcAddAdapterDevice, and so on

DDK Doc Changes New Material Already Added post-Beta Global Effects filters AEC system filter Media-Class INF Extensions KnownRegEntries, SetupPreferredAudioDevices Control Panel branding by vendors Speaker configuration update Elaboration of driver implementation of DSSPEAKER_SURROUND and DSSPEAKER_DIRECTOUT modes

DDK Doc Changes New Material To Be Added post-Beta Update information about Microsoft’s AEC implementation 64-bit driver and API specifics Detecting different WDM platforms Including how to detect which QFE/SP is installed Differences between WDM audio platforms Including a taxonomy of the different QFEs/SPs Explain MME device limits in Win XP Chart showing non-PCM support among different WDM OSes Additional DRM documentation

DDK Doc Changes New Material To Be Added post-Beta (2) Using the migration DLL to retain a 9x WDM driver during upgrade to NTOS Document how a driver exposes multi-channel volume/mute nodes New default settings for sliders in Win XP DirectSound HW acceleration slider SRC quality (used for DSound output only) DSound support for mix of 2D/3D pins Overriding the IDmaChannel interface Info for audio bus drivers “Which sample to start with?” - Overview of the various DDK samples

Windows DDK Sample Driver Additions and Upgrades

Windows DDK Sample Driver Additions and Upgrades New: GFX – global effect filter MSVAD – virtual audio device Improved: AC97smpl – Intel ICH2 DDKSynth – kernel software synth DMusUART – MPU miniport SB16 – ISA sample

AC97 Sample Additions and Upgrades New interactive INF Viewer tool Contains migration DLL sample code New property page & CPL Speaker configuration property KSPROPERTY_AUDIO_CHANNEL_CONFIG Driver writes to registry upon set Driver reads registry value upon get Also at Miniport::Init Other custom properties - Get (and Set)

AC97 Sample Additions and Upgrades (2) WAVEFORMATPCMEX support for multi-channel streams Support for Intel 820 (multi-channel ac97 codecs) Multi-channel volume workarounds for past versions of Windows: How to add additional nodes/connections for surround and center/LFE Send sample rate change requests there, etc. How to add virtual master volume (mono) if 4 or 6 channel present How to change data range depending on number of ac97 codecs detected Multi-channel mute and volume handlers

AC97 Sample Additions and Upgrades (3) DRM support Note that it can't detect presence of S/PDIF on non-compliant ac97 codecs, so this is questionable Vastly improved INF Significant DataRangeIntersection handler cleanup Better synchronization MapLock not held during PortStream->GetMapping

AC97 Sample Additions and Upgrades (4) Treat D2 exactly like D3 now Disconnect interrupt anytime not in D0 now Note bug fix at minwave.cpp, line 570-72 (Win9x remove/add doesn’t destroy filter descriptor) GetAllocatorFraming FrameSize must be sample block aligned Pin's DataRange.SampleSize should be set to non-zero! Code clean up from Windows 2000

DDKSynth Sample Additions and Upgrades Vastly improved INF/install Now appropriate for SW devices FP protection Fixes for memory leaks, KS property handling

DMusUART Sample Additions and Upgrades Added IMusicTechnology, for clients to specify KSMUSIC_TECHNOLOGY_PORT KSMUSIC_TECHNOLOGY_WAVETABLE (KSMUSIC_TECHNOLOGY_SWSYNTH, _SQSYNTH and _FMSYNTH are N/A) Fixes for KS property handling Added IPowerNotify for proper power management behavior Reset MPU when returning to D0 Removed UART sample

Global Effects Sample Additions and Upgrades AVStream filter (GFXSwap) that performs global audio processing (in this case, L/R channel swap) Vendor UI property page, including custom KS property (Get and Set) INF for installation, with optional INF lines for hardware-specific installation

Virtual Audio Driver (MSVAD) Additions and Upgrades Simple Baseline miniport driver template Extended caps (MID, PID) AC3 AC3-over-SPDIF output pin Non-PCM DataRangeIntersection handler DrmSimp SetContentId implementation for simple IDrmAudioStream Emulates muting of HW with savedata

MSVAD Additions and Upgrades (2) DrmMult CreateContentMixed, GetContentRights, DestroyContent Like DrmSimp, emulates muting of individual HW streams with savedata Doesn't actually mix ds2dhw Volume, sum, SRC properties and nodes Correct node ordering for DS mixing MultStr > 1 output stream

MSVAD Additions and Upgrades (3) PcmEx Intersection handler for extensible format DDK sample migration paths: Simple --> AC3, PcmEx, DrmSimp, MultStr MultStr --> ds2dhw, DrmMult (DrmSimp --> DrmMult)

SB16 Additions and Upgrades HW event support (volume control callbacks) KSEVENT_CONTROL_CHANGE automation table and event handler AddEventToEventList Then on ISR we GenerateEventList DRM Also better comments in SetContentId IDmaChannel for indirection/buffer tweaking Resume from S4 SR fix

SB16 Additions and Upgrades (2) Extended caps (MID, PID) INF MediaCategories entry for NameGuid IPortClsVersion Plus comments for how to detect pre-IPortClsVersion QFEs DataRangeIntersection handler cleanup SetNotificationFreq FramingSize must be sample block aligned General code clean up

DDK Samples New Material To Be Added post-Beta Migration DLL sample with complete INF MSVAD sample for DSound 3D mixing Inclusion of AddContentHandlers and other DRM calls into MSVAD\DrmMult

New DDK Tools

New DDK Tools KsStudio (Grapher.2) Interactive INF viewer Tons of great new features Interactive INF viewer Multi-channel streaming tool New WHQL tests DRMTest AC3Test DmDrvTst KsDmTst GfxTest

Important Changes to Libs, Header Files, INFs

Lib and .h File Changes PortCls.lib Removed from PortCls.lib: PcNewIrpStreamPhysical, PcNewIrpStreamVirtual Added to PortCls.lib: PcAddContentHandlers, PcForwardContentToDeviceObject Not in Windows Me PcCompleteIrp, plus five DRM exports PcCreateContentMixed, PcDestroyContent, PcForwardContentToInterface, PcGetContentRights PcForwardContentToFileObject (deprecated)

Lib and .h File Changes PortCls.h New PortCls interfaces added to PortCls.h: IDrmPort interface declaration and implementation macro IDrmPort2, built on IDrmPort from Windows Me Adds AddContentHandlers & ForwardContentToDeviceObject IPortClsVersion for WDM audio platform detection IDmaOperations for HalAllocateCommonBuffer (since it is obsolete) Could use IDmaChannel IMusicTechnology for non-MPU devices with a UART interface

Lib and .h File Changes PortCls.h Removed from PortCls.h: NewIrpStream #defines PcRegisterIrpHandler Other Vtable declaration cleanup for ForwardContentToInterface Managment --> Management

INFs/Setup Dynamic Update Logo’d driver on Windows Update automatically pushed during upgrade if no in-box PNP ID match Windows 9x WDM drivers’ INF files are deleted upon upgrade to NTOS Unless Win 9x INF contains special section and installs Migration DLL Migration DLL entries shown in INF viewer tool Legacy detection removed for Windows XP PreCopySection removed for NT-only INFs Only needed for Windows 9x legacy detection Sample INFs’ 9x vs. NT sections cleaned up

Common Problems with Audio Drivers/Devices

Common Problems With WDM Audio Drivers Power Management Scatter-gather lists gets scrambled Test aggressively with PMTE & Lullaby Plug and Play Incorrect treatment of child devices Test aggressively with HCT tests FP problems Not saving FP state appropriately Direct CR0 manipulation Interrupt Storms Failures with new Verifier (deadlock, I/O)

Common Problems With Audio Devices Power Management HW issues C3 state issues Repeated power cycles, HW does not awaken Plug and Play HW issues Interactions with on-chip video, modem devices Not separable into MF-compliant subdevices HW cannot be partitioned HW incapable of redirecting final output to host Renderer includes analog processing USB: not providing a low-bandwidth pipe (non-zero, <20%) for bandwidth reservation

Resources for WDM Audio Driver Writers Windows DDK (of course!) Web resources www.microsoft.com/winhec www.microsoft.com/winhec/winhec2000.htm www.microsoft.com/hwdev/audio support.microsoft.com/directory/ groups.yahoo.com/group/wdmaudiodev Good external resource for audio developers Archive is full of lore Numerous books on WDM (Oney, et al)

Call to Action Take advantage of new audio features of Windows XP to create full-featured drivers Logo your drivers for Windows XP Keep in touch! DDK feedback is appreciated: Are samples/docs unclear or incomplete? What new samples or docs are needed? What features should be added to WDM audio? Send DDK feedback to HakonS@microsoft.com (program manager for WDM audio drivers) WinHEC is over; go forth and be fruitful