400 likes | 770 Views
HD Audio 1.1 Overview. David Flenniken Software Design Engineer Windows Media Devices Group uaa @ microsoft.com Microsoft Corporation. Soccer Liu Software Design Engineer Windows Media Devices Group uaa @ microsoft.com Microsoft Corporation. Session Outline. HD Audio Codec Configurability
E N D
HD Audio 1.1 Overview David Flenniken Software Design EngineerWindows Media Devices Groupuaa @ microsoft.com Microsoft Corporation Soccer Liu Software Design EngineerWindows Media Devices Groupuaa @ microsoft.com Microsoft Corporation
Session Outline • HD Audio Codec Configurability • Role of the Topology Parser • How the Topology Parser works • Programming Pin Configuration Registers • Common Device Experience • Validating Pin Configuration
HD Audio Codec Configurability Configuration Default Setting 1 Configuration Default Setting 2
Role of Topology Parser Provided by Microsoft IHV and ODM rd HD Audio Class Driver 3 Party HD Audio Driver Codec C specific Knowledge Topology Parser ( static lib ) HD Audio Codec HD Audio Codec HD Audio Codec
How HD Audio Class Driver Solve This Problem • Microsoft develops a HD Audio Topology Parser that handles HD audio codec’s topology parsing for all HD Audio specification compliant codecs • HD Audio Class Driver 1.1 statically links to Topology Parser lib to solve topology parsing issues
3rd Party IHVs Can Also Use Topology Parser • 3rd party driver can take advantage of Topology Parser by linking to this static library to replace their own parsing logics to simplify driver code • This Topology Parser will be released in the form of a static library. Its DDI is planned to be published when HD Audio Class Driver shipped in late 2005.
Role of Topology Parser Provided by Microsoft IHV and ODM rd rd 3 Party HD Audio Driver HD Audio Class Driver 3 Party HD Audio Driver Codec C specific Knowledge Topology Parser ( static lib ) Topology Parser ( static lib ) HD Audio Codec HD Audio Codec HD Audio Codec
How Topology Parser Works? • Enumerate all audio paths • Build Association list • Enumerate all Pin Path Combinations for each association • Prioritize combinations found • Pick the best Association Resource Mapping
Enumerate All Audio Paths • Audio path: a path that audio data could flow through starting at a resource widget and ending at a pin widget • Not all the possible paths are valid. There are rules set by parser for what an invalid audio path is. • Invalid audio paths: • Paths including loop • Paths including Vendor Defined Widget • Paths ending with a pin widget that has no physical connection • Output audio paths ending with input Pin • Input audio paths ending with output Pin • Paths contains widgets sitting between resource widget and HD Audio Link • Paths do not end with a pin widget
Build Association List Zero is not a valid Association Default number (Pin 15)
Prioritize Combinations Found • Base on a set of predefined rules to give each path the appropriate weight. Set the sum of weighted priority value to each Association Resource Mapping. • The rules are: • The lower the association number, the higher its priority • Known device types have higher priority than unknown device types • A path with a wider volume control range has higher priority
Pick the Best Association Resource Mapping • The highest sum of all weighted paths and associations will be chosen as the best Association Resource Mapping for final output. 1`
Use of Parser Output • The Class Driver uses the parser's output to program widget connections and settings • For each logical device, class driver builds a Windows Kernel Streaming filter to expose its audio functionality to system
Programming Pin Configuration Registers • The Microsoft Topology Parser relies on spec compliant HD Audio codecs • Follows Microsoft UAA “Pin Configuration Guidelines for High Definition Audio Devices” to ensure proper Pin Configuration Default settings
Detailed Pin Configuration register fields • Fields • Port Connectivity • Location • Default Device • Connection Type • Color • Misc. • Default Association • Sequence
Port Connectivity Field • Used to indicate existence • The Pin Widget can be either an external Jack or a fixed function device (like internal speakers) or it can be unconnected • 0x1 means no physical connection • The Class Driver ignores Pin Widgets with this value set to 0x1
Location Field • Denotes Physical location of the Pin Widget • Set as appropriate • The Class Driver uses this information to describe the jack location to the end user
Default Device Field • The Class Driver uses Default Device field to determine what Logical Device to create • The Class Driver recognizes the following: • Line Out, Speaker, HP Out, S/P-DIF Out, Line In, Mic In, CD, Aux and S/P-DIF In • Other devices supported by the parser • Digital Other Out and Digital Other In • Not currently supported • Modem Line Side, Modem Headset Side, Telephony, and Other
Interpretations and Clarifications • Specific Widget types • Line out - No build-in amplifier on the codec • Speaker - No build-in amplifier on the codec, but there is an external amp connected. • HP Out – There is a programmable build-in amplifier on the codec that can drive headphones. If the amp is turned off, the Pin acts like a Line Out pin (above)
Connection Type Field • Set as appropriate • Largely ignored by the Class Driver
Color Field • 16 possibilities – use them • Colors should be unique to each location • Pin with internal location should be set to color unknown (0x0) • The Class Driver uses this in it’s description of the jacks to the end user
Misc. Field • Jack Detect Override • 0 means enabled • System must provide “Audio Jack Detection Circuits” before setting to 0. • 1 means override (disabled) • This field should be enabled to empower dynamic device functionality
Default Association Field • Labels the priority of the Pin Widget • Lower numbers mean higher priority • Association 0 is invalid • 0xF means the pin is not associated to any other pin • The Class Driver uses this field to: • Indicate groupings for multi-pin logical devices • Resolve resource disputes (higher priority device wins)
Sequence Field • Orders pins in an association • All sequence numbers in an association must be unique • The Class Driver generally uses this field to determine how to map channels in a multi-channel device.
Sequence Number Meanings • Ordering in HD Audio Spec 1.0 • Location information is missing • The Class Driver assigns meanings for clarity • 0 means Front Left & Front Right • 1 means Front Center & Low frequency • 2 means Back Left & Back Right • 3 means Front Left of Center & Front Right of Center • 4 means Side Left & Side Right • Special meanings (examples) • (0,2) or (0,4) means Quadraphonic • (0,1,2) means Surround Sound Speakers • (0,1,2,4) means Home Theater Speakers • See Pin Config Guidelines for more info
Common Device Experience • Supported • Render • Line out, Speaker, Headphone and S/P-DIF Out • Capture • Microphone, LineIn, CDIn, AuxIn and S/P-DIF In • Not Supported • Digital Other Out, Modem Line Side, Modem Handset side, Telephony, Digital Other In or Other (or Reserved)
Render Device • Can’t mix Line Out widgets and Speaker widgets in the same association • Generally, there are 1 to 4 pins in a render logical device association • Sequence numbers determine channel mapping • Single pin render devices • Headphone • Line out • Speaker
Single Pin Devices • S/P-DIF Out Device • No analog functionality on audio path • Line In Device • Aux In Device • CD Device • S/P-DIF In Device • Microphone Device
Multi Purpose Devices • Muxed Capture Device • A collection of mutually exclusive input devices that share the same ADC • Mixed Capture Device • A collection of devices that share the same ADC that may work at the same time • Redirected Headphone Render Device • Combination render + headphone device where when the headphone is plugged in the output is redirected from the speakers to the headphone
Validate Pin Configurations • Parser relies on the Pin Configuration Default for successful parsing – getting them set right is very important • Use UAATest.exe • It validates Pin Configuration Default settings • It exercises the same parser logics to validate codecs and exposes audio paths • UAATest also checks HD Audio Spec compliance • Let Microsoft know about inconsistencies (or issues with the output)
Call to Action • Use Microsoft Topology Parser to simplify and unify yours HD Audio device driver support • Follow guidelines in “Pin Configuration Guidelines for High Definition Audio Devices” for HD Audio Codec Pin Configuration Default programming • Help your OEM/ODM customers expose parser supported device types through system BIOS programming of HD Audio Pin Configuration Default values • Build UAA class driver compatible HD Audio solutions
Additional Resources • Email uaa @ microsoft.comfor • Microsoft UAA Pin Configuration Guidelines for High Definition Audio Devices, Release date TBD • UAA Hardware Design Guideline White Paper • UAATest.exe • Microsoft UAA overview white paper on • http://www.microsoft.com/whdc/device/audio/uaa.mspx