Exercise 3 - Use MXA to Verify that Audio is Offloaded During Full Screen Video Playback
Offloading audio processing on chipsets that support audio offload results in longer battery life during audio and audio/video playback scenarios that leverage the Media Engine in Windows. This exercise uses the Media eXperience Analyzer (MXA) tool to determine whether or not audio was offloaded to hardware during full screen video playback.
Step 1: Load an ETW trace that was captured during full screen video playback
Install the Media eXperience Analyzer (MXA) which is part of the Windows ADK.
Right-click on the Start menu and click on Command Prompt (Admin).
Navigate to the folder where you installed MXA.
Download AudioNotOffloaded.etl here.
Run the following command:
xa -i <AudioNotOffloaded.etl location>\AudioNotOffloaded.etl
For example, if you downloaded AudioNotOffloaded.etl to C:\Performance\Media\, you would type the following command:
xa -i C:\Performance\Media\AudioOffload\AudioNotOffloaded.etl
Press the Turn Symbols Off button to turn off symbol lookup.
Step 2: Verify audio was rendered when the ETW trace was collected
Once the trace loads, drag and drop the Microsoft-Windows-MediaFoundation-Performance provider into a panel.
Deselect all events in the Microsoft-Windows-MediaFoundation-Performance provider by clicking the checkbox next to this dataset two times.
Enable the Task Audio_Render – 482 events.
If your audio render events are fired throughout the trace, audio was playing when the trace was collected.
As we can see in the screenshot above, audio render events in the Microsoft-Windows-MediaFoundation-Performance provider (Task Audio_Render – 482) are logged throughout the entire trace. This verifies that audio was playing back.
Step 3: Determine whether audio was offloaded to hardware
Drag and drop the CPU Scheduler dataset into a panel.
Deselect all events by clicking on the checkbox at the root of the CPU Scheduler dataset twice.
Expand the CPU Scheduler dataset and Windows System Processes node.
Select the audiodg.exe process by clicking the checkbox once.
If there is audiodg.exe thread activity occurring every 10 ms throughout the entire playback session, then audio is not being offloaded. For an example, see MXA Screenshot #1.
If there is audiodg.exe thread activity only during start-up and shutdown, then audio is being offloaded. For an example, see MXA Screenshot #2.
Download the AudioOffloaded.etl trace file here.
Repeat steps 1, 2, and 3 using the AudioOffloaded.etl trace instead of AudioNotOffloaded.etl.
MXA Screenshot #1: Trace taken on a system where audio is NOT being offloaded
Notice that the audiodg.exe is waking up every 10ms to process audio samples throughout the entire trace.
MXA Screenshot #2: Trace taken on a system where audio is being offloaded
Notice the very low thread activity in the audiodg.exe process exists at start-up and shutdown phases of playback. Notice also that there is no thread activity during steady state.