# Perform Bluetooth A2DP source functions You can perform Bluetooth A2DP source functions using the `bluetoothctl` menu, `menu transport` submenu, and `paplay` commands. Bluetooth A2DP source functions include connecting or disconnecting to a remote device and listing available transport options. They allow you to retrieve information about codec capabilities, set the absolute volume, and play an audio file. You can also get a list of available sinks and play audio on a specific sink using the Bluetooth A2DP source functions. ## Prerequisites Before you begin, set up your device and go to the required menu as described in [Set up the device for A2DP functions](https://docs.qualcomm.com/doc/80-70030-13/topic/bluez-a2dp.html#section-fwp-mx5-mcc-08-25-24-1121-38-413). ## Connect a remote device To connect a remote device in the A2DP source role, run the following command from the `bluetoothctl` menu: connect Copy to clipboard **Parameters** `` is the Bluetooth address of the remote device. **Example** To connect to a paired remote device with `` `17:1A:35:8D:A2:A4`, run the following command: connect 17:1A:35:8D:A2:A4 Copy to clipboard **Sample output** [bluetooth]# connect 17:1A:35:8D:A2:A4 Attempting to connect to 17:1A:35:8D:A2:A4 [CHG] Device 17:1A:35:8D:A2:A4 Connected: yes [CHG] Device 17:1A:35:8D:A2:A4 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb [CHG] Device 17:1A:35:8D:A2:A4 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb [CHG] Device 17:1A:35:8D:A2:A4 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb [CHG] Device 17:1A:35:8D:A2:A4 ServicesResolved: yes [CHG] Device 17:1A:35:8D:A2:A4 Bonded: yes [CHG] Device 17:1A:35:8D:A2:A4 Paired: yes [NEW] Endpoint /org/bluez/hci0/dev_17_1A_35_8D_A2_A4/sep1 [NEW] Endpoint /org/bluez/hci0/dev_17_1A_35_8D_A2_A4/sep2 [NEW] Transport /org/bluez/hci0/dev_17_1A_35_8D_A2_A4/sep1/fd0 Connection successful [CHG] Transport /org/bluez/hci0/dev_17_1A_35_8D_A2_A4/sep1/fd0 State: active [CHG] Transport /org/bluez/hci0/dev_17_1A_35_8D_A2_A4/sep1/fd0 Volume: 0x0040 (64) [CHG] Transport /org/bluez/hci0/dev_17_1A_35_8D_A2_A4/sep1/fd0 State: idle [CHG] Transport /org/bluez/hci0/dev_17_1A_35_8D_A2_A4/sep1/fd0 Volume: 0x0044 (68) [CHG] Transport /org/bluez/hci0/dev_17_1A_35_8D_A2_A4/sep1/fd0 Volume: 0x0040 (64) [MySoundbar]# Copy to clipboard ## List available transport To list the available transport, run the following command from the `menu transport` submenu: list Copy to clipboard **Sample output** [MySoundbar]# list Transport /org/bluez/hci0/dev_17_1A_35_8D_A2_A4/sep1/fd0 Copy to clipboard ## Get information about codec capabilities To get the information about the codec capabilities of a transport, run the following command from the `menu transport` submenu: show Copy to clipboard **Parameters** `` is the transport path. **Example** To get the information about the codec capabilities of `` `/org/bluez/hci0/dev_17_1A_35_8D_A2_A4/sep1/fd0`, run the following command: show /org/bluez/hci0/dev_17_1A_35_8D_A2_A4/sep1/fd0 Copy to clipboard **Sample output** [MySoundbar]# show /org/bluez/hci0/dev_17_1A_35_8D_A2_A4/sep1/fd0 Transport /org/bluez/hci0/dev_17_1A_35_8D_A2_A4/sep1/fd0 UUID: 0000110a-0000-1000-8000-00805f9b34fb Codec: 0x00 (0) Configuration: 0x21 (33) Configuration: 0x15 (21) Configuration: 0x02 (2) Configuration: 0x35 (53) Device: /org/bluez/hci0/dev_17_1A_35_8D_A2_A4 State: idle Volume: 0x0040 (64) Copy to clipboard ## Set absolute volume Note Ensure that the DUT and the remote device support the `setabsvolume` feature. To set the absolute volume of a transport, run the following command from the `menu transport` submenu: volume [value] Copy to clipboard **Parameters** - `` is the transport path. - `[value]` is the volume level. **Example** To set the absolute volume of `` `/org/bluez/hci0/dev_17_1A_35_8D_A2_A4/sep1/fd0` as `50`, run the following command: volume /org/bluez/hci0/dev_17_1A_35_8D_A2_A4/sep1/fd0 50 Copy to clipboard **Sample output** [MySoundbar]# volume /org/bluez/hci0/dev_17_1A_35_8D_A2_A4/sep1/fd0 50 Changing Volume succeeded [CHG] Transport /org/bluez/hci0/dev_17_1A_35_8D_A2_A4/sep1/fd0 Volume: 0x0032 (50) [MySoundbar]# volume /org/bluez/hci0/dev_17_1A_35_8D_A2_A4/sep1/fd0 10 Changing Volume succeeded Copy to clipboard ## Play an audio file Note - The DUT doesn’t support an audio player. Use `paplay` commands to play music. - Only PCM audio sample is supported. To play songs from the DUT, do the following: 1. Run SSH. 2. Play a WAV file by running the following command: paplay -v Copy to clipboard **Parameters** `` is the filepath of the WAV file. **Example** To play a WAV file at `/tmp/playback.wav`, run the following command: paplay /tmp/playback.wav -v Copy to clipboard **Sample output** sh-5.1# paplay /tmp/playback.wav -v Opening a playback stream with sample specification 's16le 2ch 44100Hz' and channel map 'front-left,front-right'. Connection established. Stream successfully created. Buffer metrics: maxlength=4194304, tlength=352800, prebuf=349276, minreq=3528 Using sample spec 's16le 2ch 44100Hz', channel map 'front-left,front-right'. Connected to device bluez_output.17_1A_35_8D_A2_A4 (index: 68, suspended: no). Stream started. Copy to clipboard ## Get a list of sinks To get the list of sinks when multiple devices are connected, run the following command in SSH: pactl list sinks short Copy to clipboard Note The pactl tool isn’t available by default. Enable and build the tool on your device. **Sample output** sh-5.1# pactl list sinks short 54 combined_output_db PipeWire float32le 2ch 48000Hz SUSPENDED 56 combined_output_ll PipeWire float32le 2ch 48000Hz SUSPENDED 58 pal_sink_speaker_ll PipeWire s16le 2ch 48000Hz SUSPENDED 68 bluez_output.17_1A_35_8D_A2_A4 PipeWire float32le 2ch 48000Hz SUSPENDED Copy to clipboard ## Play audio on a specific sink To play audio on a specific sink when multiple devices are connected, run the following command in SSH: paplay --device= -v Copy to clipboard **Parameters** - `` is the filepath of the WAV file. - `` is the sink name. **Example** To play `pcmtest.wav` on the `bluez_output.17_1A_35_8D_A2_A4` sink, run the following command: paplay pcmtest.wav --device=bluez_output.17_1A_35_8D_A2_A4 -v Copy to clipboard **Sample output** sh-5.1# paplay pcmtest.wav --device=bluez_output.17_1A_35_8D_A2_A4 -v Opening a playback stream with sample specification 's16le 2ch 44100Hz' and channel map 'front-left,front-right'. Connection established. Stream successfully created. Buffer metrics: maxlength=4194304, tlength=352800, prebuf=349276, minreq=3528 Using sample spec 's16le 2ch 44100Hz', channel map 'front-left,front-right'. Connected to device bluez_output.17_1A_35_8D_A2_A4 (index: 68, suspended: no). Stream started. Time: 2.925 sec; Latency: 2062081 usec. Copy to clipboard ## Disconnect a remote device To disconnect a remote device, run the following command from the `bluetoothctl` menu: disconnect Copy to clipboard **Parameters** `` is the Bluetooth address of the remote device. **Example** To disconnect a paired remote device with `` `17:1A:35:8D:A2:A4`, run the following command: disconnect 17:1A:35:8D:A2:A4 Copy to clipboard **Sample output** [MySoundbar]# disconnect 17:1A:35:8D:A2:A4 Attempting to disconnect from 17:1A:35:8D:A2:A4 [DEL] Transport /org/bluez/hci0/dev_17_1A_35_8D_A2_A4/sep1/fd2 [DEL] Endpoint /org/bluez/hci0/dev_17_1A_35_8D_A2_A4/sep1 [DEL] Endpoint /org/bluez/hci0/dev_17_1A_35_8D_A2_A4/sep2 [CHG] Device 17:1A:35:8D:A2:A4 ServicesResolved: no Successful disconnected [CHG] Device 17:1A:35:8D:A2:A4 Connected: no Copy to clipboard Last Published: Jun 15, 2026 [Previous Topic Verify A2DP functions](https://docs.qualcomm.com/bundle/publicresource/80-70030-13/topics/bluez-a2dp.md) [Next Topic Perform Bluetooth A2DP sink functions](https://docs.qualcomm.com/bundle/publicresource/80-70030-13/topics/bluez-perform-bluetooth-a2dp-sink-functions.md)