We have moved to a new Sailfish OS Forum. Please start new discussions there.
8

BUG: A2DP profile does not get connected when BT headphones are turned on

asked 2019-05-14 16:54:21 +0300

saso gravatar image

I have this same problem with Sony headphones and Pioneer car stereo. When the BT device is switched on, only HFP profile is connected. A2DP does not get connected, so music does not get routed to the bluetooth device. But if I go to sailfish bluetooth settings and first disconnect and then connect the device again from there, A2DP is also connected. So I think the problem is that when connection is initiated from the other device, only HFP profile is connected, and when connection is initiated from the sailfish device, both profiles are connected.

Here is pactl list cards output after headphones are switched on:

Card #24
    Name: bluez_card.04_5D_XX_XX_XX_XX
    Driver: module-bluez5-device.c
    Owner Module: 48
    Properties:
            device.description = "MDR-ZX770BN"
            device.string = "04:5D:XX:XX:XX:XX"
            device.api = "bluez"
            device.class = "sound"
            device.bus = "bluetooth"
            device.form_factor = "headset"
            bluez.path = "/org/bluez/hci0/dev_04_5D_XX_XX_XX_XX"
            bluez.class = "0x240404"
            bluez.alias = "MDR-ZX770BN"
            device.icon_name = "audio-headset-bluetooth"
            device.intended_roles = "phone"
    Profiles:
            headset_head_unit: Headset Head Unit (HSP/HFP) (sinks: 1, sources: 1, priority: 30, available: yes)
            a2dp_sink: High Fidelity Playback (A2DP Sink) (sinks: 1, sources: 0, priority: 40, available: no)
            off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
    Active Profile: off
    Ports:
            headset-output: Headset (priority: 0, latency offset: 0 usec)
                    Part of profile(s): headset_head_unit, a2dp_sink
            headset-input: Headset (priority: 0, latency offset: 0 usec)
                    Part of profile(s): headset_head_unit

And here is the output after disconnecting and connecting from sailfish:

Card #26
    Name: bluez_card.04_5D_XX_XX_XX_XX
    Driver: module-bluez5-device.c
    Owner Module: 50
    Properties:
            device.description = "MDR-ZX770BN"
            device.string = "04:5D:XX:XX:XX:XX"
            device.api = "bluez"
            device.class = "sound"
            device.bus = "bluetooth"
            device.form_factor = "headset"
            bluez.path = "/org/bluez/hci0/dev_04_5D_XX_XX_XX_XX"
            bluez.class = "0x240404"
            bluez.alias = "MDR-ZX770BN"
            device.icon_name = "audio-headset-bluetooth"
            device.intended_roles = "phone"
    Profiles:
            headset_head_unit: Headset Head Unit (HSP/HFP) (sinks: 1, sources: 1, priority: 30, available: yes)
            a2dp_sink: High Fidelity Playback (A2DP Sink) (sinks: 1, sources: 0, priority: 40, available: yes)
            off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
    Active Profile: a2dp_sink
    Ports:
            headset-output: Headset (priority: 0, latency offset: 0 usec)
                    Part of profile(s): headset_head_unit, a2dp_sink
            headset-input: Headset (priority: 0, latency offset: 0 usec)
                    Part of profile(s): headset_head_unit
edit retag flag offensive close delete

1 Answer

Sort by » oldest newest most voted
0

answered 2020-03-06 21:24:03 +0300

bomo gravatar image

Maybe the methodology outlined here helps:

Use pacmd set-card-profile card_number a2dp_sink to switch the profile. card_number is obtained via pacmd list-cards.

Maybe even the autoload stuff:

For enabling automatic profile switching from A2DP to HSP when a recording stream appears without any role set, you can append auto_switch=2 to load-module module-bluetooth-policy in /etc/pulse/default.pa.

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
3 followers

Stats

Asked: 2019-05-14 16:54:21 +0300

Seen: 402 times

Last updated: Mar 06 '20