deva-ctrl-a2dp.so

Sound driver DLL for Advanced Audio Distribution Profile (A2DP) audio data streaming over Bluetooth

Syntax:

Direct invocation (also causes a new io-audio process to start):

io-audio -d a2dp [opt[,opt...]] &

Mounting (requires that io-audio already be running):

mount -Tio-audio [-oopt[,opt...]] /lib/dll/deva-ctrl-a2dp.so &

Runs on:

QNX Neutrino

Options:

a2dp_path=a2dp stream path
Set an A2DP stream path. See “A2DP stream path”.
debug
Enable to log clock cycles of a read or write activity.

For card options that apply to all sound drivers, see the entry for io-audio.

Description:

The deva-ctrl-a2dp.so shared object is a device driver DLL used by the io-audio manager. It uses the API described in the Audio Developer's Guide.

The deva-ctrl-a2dp.so driver is designed to work with the Bluetooth stack provided with the QNX SDK for Automotive Bluetooth Connectivity. It can work with other Bluetooth stacks as long as they use the required A2DP packet header format and provide the correct A2DP stream path to the driver.

A2DP packet header

The file ado_a2dp.h defines the following A2DP packet header structure:

typedef struct _a2dp_pkt_hdr_t{
	unsigned int    data_type;
	unsigned int    data_len;
}a2dp_pkt_hdr_t;

Where:

data_type
Either A2DP_PACKET_TYPE_FORMAT or A2DP_PACKET_TYPE_DATA. See “Data packet types”.
data_len
The data length.

Data packet types

The file ado_a2dp.h defines the following two types for data packets:
enum {
	A2DP_PACKET_TYPE_DATA = 1, A2DP_PACKET_TYPE_FORMAT,
};
When data_type is A2DP_PACKET_TYPE_FORMAT, deva-ctrl-a2dp.so expects the data to be an A2DP stream property that uses the following structure:
typedef struct _a2dp_strm_property_t{
	unsigned int    channels;
	int             frame_rate;
	int             sample_size;
} a2dp_strm_property_t;

Where:

channels
The number of channels in the A2DP stream.
frame_rate
The sample rate of the A2DP stream.
sample_size
The size of a sample in the stream, in bytes. The default value is 2.

When data_type is A2DP_PACKET_TYPE_DATA, deva-ctrl-a2dp.so expects the data to be decoded PCM audio data.

A2DP stream path

The file ado_a2dp.h defines the following A2DP stream path, which is the default path the QNX Bluetooth stack uses:

/dev/io-bluetooth/a2dp/audio_stream

Use a2dp_path to select a different path, if required.

Note: Graphics drivers run at a higher priority than applications, but they shouldn't run at a higher priority than the audio, or else breaks in the audio occur. You can use the on command to adjust the priorities of the audio and graphics drivers.

Examples:

Invoke deva-ctrl-a2dp.so directly from io-audio:

io-audio -d a2dp &

Mount deva-ctrl-a2dp.so (io-audio must be running):

mount -Tio-audio /lib/dll/deva-ctrl-a2dp.so &

Errors:

When an error occurs, deva-ctrl-a2dp.so sends a description of the error to the system logger (see slogger2).