slide1 l.
Skip this Video
Loading SlideShow in 5 Seconds..
New Developments in WDM Audio Drivers in Windows XP Martin Puryear Development Lead Windows Core Audio Microsoft Corpor PowerPoint Presentation
Download Presentation
New Developments in WDM Audio Drivers in Windows XP Martin Puryear Development Lead Windows Core Audio Microsoft Corpor

Loading in 2 Seconds...

play fullscreen
1 / 50

New Developments in WDM Audio Drivers in Windows XP Martin Puryear Development Lead Windows Core Audio Microsoft Corpor - PowerPoint PPT Presentation

  • Uploaded on

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

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'New Developments in WDM Audio Drivers in Windows XP Martin Puryear Development Lead Windows Core Audio Microsoft Corpor' - candie

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

New Developments in WDM Audio Drivers in Windows XP Martin PuryearDevelopment LeadWindows Core AudioMicrosoft Corporation

  • 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 added in windows xp
New FeaturesAdded 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
New FeaturesAdded 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
New FeaturesAdded 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
    • 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
New FeaturesAdded 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
New FeaturesAdded 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
New FeaturesAdded 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
New FeaturesAdded in Windows Me
  • Secure Audio Path (kernel mode DRM)
    • Now required for Windows XP logo
    • 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
New FeaturesAdded 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
New FeaturesAdded 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
(Un)FeaturesWhat’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
DDK Doc ChangesNew 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
DDK Doc ChangesNew 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
DDK Doc ChangesNew 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
DDK Doc ChangesExisting 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
DDK Doc ChangesNew 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
DDK Doc ChangesNew 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
DDK Doc ChangesNew 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 upgrades24
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
AC97 SampleAdditions and Upgrades
  • New interactive INF Viewer tool
    • Contains migration DLL sample code
  • New property page & CPL
  • Speaker configuration property
    • 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
AC97 SampleAdditions 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
AC97 SampleAdditions 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
AC97 SampleAdditions 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
DDKSynth SampleAdditions 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
DMusUART SampleAdditions and Upgrades
  • Added IMusicTechnology, for clients to specify
  • 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
Global Effects SampleAdditions 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
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
MSVADAdditions 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
MSVADAdditions 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
SB16Additions 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
SB16Additions 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
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 tools39
New DDK Tools
  • KsStudio (Grapher.2)
    • Tons of great new features
  • Interactive INF viewer
  • Multi-channel streaming tool
  • New WHQL tests
    • DRMTest
    • AC3Test
    • DmDrvTst
    • KsDmTst
    • GfxTest
lib and h file changes portcls lib
Lib and .h File ChangesPortCls.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
Lib and .h File ChangesPortCls.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 h43
Lib and .h File ChangesPortCls.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 wdm audio drivers
Common ProblemsWith 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
Common ProblemsWith 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
Resources for WDM Audio Driver Writers
  • Windows DDK (of course!)
  • Web resources
      • Good external resource for audio developers
      • Archive is full of lore
  • Numerous books on WDM (Oney, et al)
call to action
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 (program manager for WDM audio drivers)
  • WinHEC is over; go forth and be fruitful