Hi,
When i connect with bluetooth device i see only handsfree_head_unit in yes, but A2DP why ?
How do i set both profiles available.
Card #5
Name: bluez_card.DB_56_7E_A2_02_60
Driver: module-bluez5-device.c
Owner Module: 25
Properties:
device.description = "Mivi Roam 2"
device.string = "DB:56:7E:A2:02:60"
device.api = "bluez"
device.class = "sound"
device.bus = "bluetooth"
device.form_factor = "headset"
bluez.path = "/org/bluez/hci0/dev_DB_56_7E_A2_02_60"
bluez.class = "0x340404"
bluez.alias = "Mivi Roam 2"
bluetooth.battery = "90%"
device.icon_name = "audio-headset-bluetooth"
device.intended_roles = "phone"
bluetooth.codec = "CVSD"
Profiles:
a2dp_sink: High Fidelity Playback (A2DP Sink) (sinks: 1, sources: 0, priority: 40, available: no)
handsfree_head_unit: Handsfree Head Unit (HFP) (sinks: 1, sources: 1, priority: 30, available: yes)
off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
Active Profile: handsfree_head_unit
Ports:
headset-output: Headset (type: Headset, priority: 0, latency offset: 0 usec, availability unknown)
Part of profile(s): a2dp_sink, handsfree_head_unit
headset-input: Headset (type: Headset, priority: 0, latency offset: 0 usec, availability unknown)
Part of profile(s): handsfree_head_unit
cat /etc/pulse/default.pa
### Automatically load driver modules for Bluetooth hardware
.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
.endif
.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover headset=native
.endif
load-module module-switch-on-connect
load-module module-bluez5-device
load-module module-bluez5-discover
///////////////////////
with the above if i set headset to auto or ofono devices doesn't show up in the pactl list.
/////////////////////////////
cat /etc/bluetooth/main.conf
[General]
Enable=Control,Gateway,Headset,Media,Sink,Source,socket
MultiProfile=multiple
#Disable=socket
Hello,
Sink profile is supported until version 12.1.0_2.0.0.
A2DP Sink is implemented in Android but is not enabled by default(A2DP Source is the default option).
In Andorid_User's_Gudie, it showed how to enable A2DP Sink profile, but to make A2DP Sink work it still needs other configurations.
As automotive BSP configures android as A2DP sink, I suggest you check Automotive specific configs for reference.
Best regards.
Hi @JorgeCas
We are working in linux yocto build.
Hello,
Got it, thank you for the information.
A2DP works on UART interface and HSP/HFP protocol works on PCM interface.
Once hci0 is up, you need to follow the next steps:
Start HCI-Dump Log
hcidump -Xt >> hcidump1.log &
Setup pulseaudio
pulseaudio --start --log-target=syslog &
pacmd set-default-sink 2
Start bluetooth-player
/usr/bin/bluetooth-player &
Open a new terminal start bluetoothctl
/usr/bin/bluetoothctl
Connect to Android Phone from bluetoothctl terminal
power on
agent on
default-agent
scan on
Wait to see name of desired device and BD Addr
scan off
connect <BD_Address>
Play music from Phone
Best regards,