Phone call audio route to bluetooth connected loudspeaker?

I wonder if its possible to route the audio signal of the voicecall application to the via bluetooth connected loudspeaker (JBL FLIP 5, just a loudspeaker, specs A2DP V1.3, AVRCP V1.6)?

Other apps are using the BT speakers. Music application plays the mp3 via this BT loudspeaker. Android messenger application also has the audio output routed to the BT loudspeaker.

Any hints? Thanks!

You could check whether you are able to change the device type from ‘loudspeaker’ to ‘headset’ or ‘hands-free device’ in Settings > Bluetooth (enable Bluetooth) > Long-tap the according device > Show device settings (or something along these lines) > adapt the device type.

The change of the device type should also enable the speakter for the voicecall-ui.

2 Likes

PulseAudio routing is controlled by the resource class, that may be override by NEMO_RESOURCE_CLASS_OVERRIDE env. variable and then by /etc/pulse/xpolicy.conf config file. I have similar issue with navigation application. See https://github.com/mer-hybris/droid-hal-configs/pull/234 , Playing audio file with QMediaPlayer pause Media player - #4 by karry Try to add route_audio flag to some groups like call, ipcall… You can try to debug and manually update audio routing with some of the pactl commands…

What application is problematic for you?

2 Likes

Initially I was not aware of this setting. That was looking very promising and I
was sure that this setting would lead to a solution but it has not …

I tested any category there - no difference. It seems that the voice call app is hard-wired to the internal loudspeaker (at the bottom of the phone). Its okay when the app starts to route the audio to the internal ear-speaker (for privacy). My expectation is that at least when the user press the ui button to route the audio to the speaker, that it uses the “current” selected main speaker (in this case the BT connected one) but it does not, its every time the internal loudspeaker at the bottom of the phone.

@karry thanks for this hints. But to be honest, this should be done by jolladevs. I do not have all scenarios at the hand. For example when having a wired headset connected, the routing of the voicecall app is already “correctly” different compared when having just the plain phone et cetera. So, before I mess this up I would like to call for attention to this issue @vige . Thank you!

(BTW, its about the voicecall app)

The voicecall-ui displays a toggle that enables you to select the corresponding audio device in case a bluetooth device is connected and detected as supported.

If that is not the case for you, then try to remove the pairaing with the corresponding bluetooth speaker, re-pair them again and set a proper device type in the settings. This should do the trick, since the latest two SFOS updates improved the audio handling of connected Bluetooth devices (see Unable to route phone call audio to bluetooth headset for more details).

Ok, I did the whole process individually for every possible BT class setting. Deleting the pairing, repairing, class config, and testing with the voicecall app, and reiterated. Unfortunately no success (means no additional UI element for the BT device in the voicecall app).

Just for the case someone else read this here: this JBL Flip 5 device works perfectly with music apps, audio is played, media keys works, even Android messaging app Threema is usable with this speaker.
The issue is just with voicecall usage when you want to listen to your call via BT speaker.

Here some logs of the repairing:

# journalctl | grep -i bluetooth
Nov 21 20:33:59 Sailfish kernel: Bluetooth: hci0 advertising data length corrected
Nov 21 20:34:00 Sailfish kernel: Bluetooth: hci0 advertising data length corrected
Nov 21 20:34:01 Sailfish kernel: Bluetooth: hci0 advertising data length corrected
Nov 21 20:34:01 Sailfish kernel: Bluetooth: hci0 advertising data length corrected
Nov 21 20:34:01 Sailfish kernel: Bluetooth: hci0 advertising data length corrected
Nov 21 20:34:02 Sailfish kernel: Bluetooth: hci0 advertising data length corrected
Nov 21 20:34:09 Sailfish bluetoothd[3599]: bluetoothd[3599]: profiles/audio/avctp.c:uinput_create() Can't open input device: No such file or directory (2)
Nov 21 20:34:09 Sailfish bluetoothd[3599]: bluetoothd[3599]: profiles/audio/avctp.c:init_uinput() AVRCP: failed to init uinput for JBL Flip 5
Nov 21 20:34:09 Sailfish bluetoothd[3599]: profiles/audio/avctp.c:uinput_create() Can't open input device: No such file or directory (2)
Nov 21 20:34:09 Sailfish bluetoothd[3599]: profiles/audio/avctp.c:init_uinput() AVRCP: failed to init uinput for JBL Flip 5
Nov 21 20:34:12 Sailfish bluetoothd[3599]: bluetoothd[3599]: /org/bluez/hci0/dev_D8_37_3B_XX_XX_XX/sep1/fd13: fd(28) ready
Nov 21 20:34:12 Sailfish bluetoothd[3599]: /org/bluez/hci0/dev_D8_37_3B_XX_XX_XX/sep1/fd13: fd(28) ready
Nov 21 20:34:18 Sailfish lipstick-bluetooth-ui[1823]: [D] onTriggered:78 - lipstick-bluetooth-ui: exiting...

The device

# bluetoothctl 
Agent registered
[JBL Flip 5]# devices
Device D8:37:3B:XX:XX:XX JBL Flip 5
[JBL Flip 5]# info D8:37:3B:XX:XX:XX
Device D8:37:3B:XX:XX:XX (public)
	Name: JBL Flip 5
	Alias: JBL Flip 5
	Class: 0x00240414
	Icon: audio-card
	Paired: yes
	Trusted: yes
	Blocked: no
	Connected: yes
	LegacyPairing: no
	UUID: Serial Port               (00001101-0000-1000-8000-00805f9b34fb)
	UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
	UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
	UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)

@jovirkku - any chance to take a look at it? Thanks!

I have a Jolla1 and Jolla C phones with SFOS 3.4 and 4.3 respectively. I used them with JBL Elite NC 150 (A basic “sport” type noise-cancelling bt headset) and JBL Charge 4 BT speaker. Both phones automatically switch voice call audio output to the currently connect BT device (and mike input too, if it is the headset) without any actions from my side. I have never changed any settings concerning this behaviour from the default. The voicecall-ui does have a button to switch from BT to internal speaker and it works, but I sometimes have to run to the phone to answer a call and prevent it being amplified outdoors :deciduous_tree: :loudspeaker: :notes: :deciduous_tree: to “enjoyment” of my :rage: :poop: :angry: neighbours instead of regular private talk.

I do not like it! I would rather disable automatic switching of phone calls to BT speakers :roll_eyes: but I do not know how.

1 Like