Summary: An overview of A2DP support, specifically the interaction between Bluetooth and Audio drivers.




Introduction

A2DP stands for Advanced Audio Distribution Profile and it defines procedures and protocols for sending high quality audio data to peer Bluetooth devices such Bluetooth headphones with stereo audio streaming capability. A2DP sits on top of AVDTP which uses L2CAP services. AVDTP stands for Audio/Video Distribution Transport Protocol. The audio payload is transferred over the L2CAP layer approximately in the range of 300-400 kbps. Here are some useful links to related topics:
* Bluetooth
* AVDTP
* A2DP
* A2DP Audio Driver

Enabling A2DP

A2DP is included into the image when the Bluetooth feature is added to the OS design. The following image flags can be used to remove Bluetooth and/or A2DP support from the image while keeping the rest of the Bluetooth stack:
*IMGNOBLUETOOTH=1. Excludes support for Bluetooth from the run-time image.
*IMGNOBLUETOOTHA2DP=1. Excludes support for the Bluetooth Advanced Audio Distribution Profile (A2DP) from the run-time image.

A2DP and Audio Interaction

The A2DP Audio Driver interacts with the rest of the Audio system like a regular waveform audio driver. It is a stream interface driver which supports audio driver interface IOCTLs.

When L2CAP detects a Bluetooth device with A2DP support it forwards this information to AVDTP. AVDTP sets the A2DP Audio Driver as the preferred audio device by using the appropriate Wave API functions. This makes the A2DP Audio Driver first in the list of available audio devices. This status change is propagated to registered applications via state change notifications and these applications are expected to close the streams they opened before and re-open them on the A2DP Audio Driver.

A2DP Audio Driver and Windows Media Player

Starting with Windows Mobile 6, Windows Media Player 10.2 Mobile and later and DirectShow no longer use WAVE_MAPPER to get an audio handle. Instead, they now use the preferred audio device, which is always device 0. Therefore, any audio device must now set itself to be the preferred audio device to receive audio from Windows Media Player 10.2 Mobile and later. This is especially important for Bluetooth implementations that support A2DP.

The following table shows the AudioDeviceChangeDelay value under the HKEYLOCALMACHINE\SOFTWARE\Microsoft\MediaPlayer\Preferences registry key.

Name Value Description
"AudioDeviceChangeDelay" : DWORD 0x0000000A (10) Delays the audio change in milliseconds. This is useful because sometimes the new preferred audio device is not ready to handle audio for a few milliseconds.

For more information on how the preferred audio device is switched, see Switching Preferred Audio Devices .

-oguzs / 24544



Go up to Features of a BSP
Go up to Big Book of BSP

Thank you for contributing to this BSP Wiki. To ensure your comments and concerns receive proper exposure, include bspwiki""@""microsoft"".""com when providing feedback or topical suggestions.





Microsoft Communities