Navigation instructions doesn't play via bluetooth headphones (but phone speaker)

REPRODUCIBILITY: always
OS VERSION: 4.1.0.24
HARDWARE: X10 II
UI LANGUAGE: cs
REGRESSION: no

DESCRIPTION:

OSM Scout and Pure Maps applications are using “navigator” audio (resource?) class by setting NEMO_RESOURCE_CLASS_OVERRIDE environment variable. With this resource class, music player is paused when application is playing voice instructions, and resumed after. But this resource class also affects pulseaudio routing. Navigation instructions are played via phone speakers even bluetooth headphones are connected (or car speakers are connected via bluetooth). But music is routed via headphones / car speakers properly.

When “game” resource class is used, voice instructions are routed to bluetooth headphones properly and even music player is paused and resumed properly. But using “game” class sounds weird for map/navigation software.

Routing may be fixed easily. It is just necessary to add route_audio flag to navigator group in /etc/pulse/xpolicy.conf:

[group]
name   = navigator
flags  = set_sink, set_source, route_audio
sink   = droid.output.media_latency@equals:"true"
source = droid.input.builtin@equals:"true"

STEPS TO REPRODUCE:

  1. pair and connect bluetooth heaphones
  2. play some music in Media application, it should be routed via bluetooth
  3. open OSM Scout, settings page…
  4. download some navigation voice
  5. select voice, play sample - it is routed to phone speaker

EXPECTED RESULT:

  1. should be routed to bluetooth headphones

ACTUAL RESULT:

  1. voice is routed to phone speakers

ADDITIONAL INFORMATION:

resource class override support: Implement more full resource policy features. · qt/qtmultimedia@1c5ea95 · GitHub
issue with paused media player: Playing audio file with QMediaPlayer pause Media player - #5 by karry
Pure maps issue: [SFOS] Prevent voice navigation stopping other audio · Issue #120 · rinigus/pure-maps · GitHub

5 Likes

Bump. Can someone from Jolla take a look into it?

@karry: you can add PR to fix the file at https://github.com/mer-hybris/droid-hal-configs/blob/master/sparse/etc/pulse/xpolicy.conf . This is the one that is pulled to all ports as a part of the base config.

This is to confirm that https://github.com/sailfishos-sony-tama/droid-config-sony-tama-pie/commit/db104ce9a803bd4c0366e4a8ebfef76418734940 fixed it for Xperia Tama port

In this case, I took /etc/pulse/xpolicy.conf and made a port-specific copy of it. But would be way better to fix it upstream

Here is the merge request to upstream: https://github.com/mer-hybris/droid-hal-configs/pull/234

3 Likes

I’ll hijack this thread and ask if the bug of the ringtone not playing through BT headphones is of similar nature.

For reference:

The nature of the issue may be similar, but I can’t reproduce it with my bluetooth headphones connected to Xperia 10 II, SFOS 4.2 :frowning: I heard ringing in headphones…