Tuesday, January 26, 2010

Choppy audio on Cisco Smartphone

UPDATE: After a couple hours of work, I now have a smoothly running system.  Performing the below tasks to identify the cause of the DPC latency I was able to discover that it was USBPORT.sys and NDIS.sys.  This means USB chipset and Network card in case you're wondering.  So I set out on a quest to find updated BIOS, drivers, and firmware for my motherboard, PCI network card, and Video card.  I managed to find a newer BIOS, newer chipset INFs, updated network driver, and updated video driver.  After this and a few reboots, I have success!  Check out the results on the DPC Latency Checker now:
You can't even tell where the call begins!


The Issue:
I'm getting some pretty poor quality audio when I use my USB headset (Tritton AX720) on my computer.  I've learned of some tools, and here they are:

DPC Latency Checker clearly shows the issue.  You can find this tool here: http://www.thesycon.de/deu/latency_check.shtml

Here's a screen shot of what I see:















Notice the jump up to yellow when the call starts.

Here is the process for finding out what is causing the DPC latency:
(Originally written by MagicAndre1981 on MSFN)

To get started you need the Windows Performance Tools Kit. Sadly Microsoft removed the stand alone installer from download. To get the installer, you have to install the Windows SDK.

Download the Web Installer and select the Win32 Development Tools and install them. Now go to the path:

C:\Program Files\Microsoft SDKs\Windows\v7.0\bin

and look for the 3 files wpt_ia64.msi, wpt_x64.msi and wpt_x86.msi. Now install the MSI which matches your Windows (IA64 if you're running an Itanium Windows, x64 if you run a 64Bit Windows Vista/7/Server 2008 (R2) or x86 if you run a 32Bit Vista/7/Server 2008).  (Francois' note: In my case it was C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\wpfperf.msi)

Now open an elevated command prompt and run the following commands:
xperf -on latency
Now cause the issue (in my case initiate a call) and wait a while to record the high DPC and interrupt activity.  To stop the trace run the following command:
xperf -d DPC_Interrupt.etl
This closes the trace and writes the result to the file DPC_Interrupt.etl.
In the next step, double click on the etl file to run the Viewer.
Now wait until the 2 passes are over.


Go to "Trace > Configure Symbol Paths" and type in the following:
srv*C:\symbols*http://msdl.microsoft.com/download/symbols
Click ok, to close the dialog.

Now go to the graphs "DPC CPU Usage" or "Interrupt CPU Usage" (depending where you see high CPU usage) and select the interval, right click and select "Load Symbols" and next click summary table.

Now, you have to accept the license agreement to download the public debugging symbols.

(NOTE, THE PDBs ARE SOMETIME VERY HUGE. BE AWARE THAT IT MAY TAKE SOME TIME IF YOU HAVE A SLOW INTERNET CONNECTION.

For me the cause is the NDIS.sys. This is a part of the networking system. The usage comes for me, when I have nearly 100% network speed usage on my 100MBit LAN adapter of my notebook.

In your case, you should see the driver which causes the issues.

For NDIS.sys, check your (W)LAN drivers for updates.
For usbport.sys, check your chipset drivers for updates.

Ok, I hope, this helps you to determine which driver is causing high DPC and interrupt usage.