[pulseaudio-discuss] [PATCH 2/3] bluetooth: use native and ofono backends in parallel with headset=auto
Tanu Kaskinen
tanuk at iki.fi
Fri Mar 10 18:58:28 UTC 2017
On Fri, 2017-03-10 at 10:19 +0100, Georg Chini wrote:
> On 10.03.2017 08:13, Georg Chini wrote:
> > On 10.03.2017 00:33, Tanu Kaskinen wrote:
> > > On Thu, 2017-03-02 at 17:04 +0100, Georg Chini wrote:
> > > > This patch changes the behavior of the headset=auto switch for
> > > > module-bluez5-discover.
> > > > With headset=auto now both backends will be active at the same time
> > > > for the AG role and
> > > > the switching between the backends is only done for the HS role.
> > > > headset=ofono and headset=native remain unchanged.
> > > >
> > > > This allows to use old HSP only headsets while running ofono and to
> > > > have headset support
> > > > via pulseaudio if ofono is started with the --noplugin=hfp_ag_bluez5
> > > > option.
> > >
> > > Not really related to the patch, I'm just curious: Does hfp_ag_bluez5
> > > make ofono act in the AG role?
> >
> > Yes, it does. However this only works if you have a modem in your system
> > or simulate one with phonesim. When I tested it (at least a year ago),
> > ofono
> > would support the AT commands of the headset, but audio did not work.
> > This is why I switched the AG support off.
> >
> > > Is the plugin loaded by default?
> >
> > Yes.
> >
> > > Does
> > > that work nowadays? Or is it still work in progress?
> >
> > I'll pull a fresh ofono tree later today and check. The version on my
> > system
> > is rather old.
>
> It still does not work in multiple ways. More detail:
>
> - You need an enabled modem in your system before ofono exposes the
> HFP AG role. This means you must at least have phonesim installed and
> running and then use some D-Bus command to power on the simulated
> modem.
> - When the headset connects to ofono, you cannot switch the profile to HFP
> using pulesaudio (it says "not connected", although the headset is
> connected
> to ofono)
> - When I simulate a call with phonesim and ofono tries to pass the audio
> connection to pulse, pulse crashes with an assertion:
>
> module-bluez5-device.c: Assertion 'cp =
> pa_hashmap_get(u->card->profiles,
> pa_bluetooth_profile_to_string(t->profile))' failed at
> modules/bluetooth/module-bluez5-device.c:2068, function
> handle_transport_state_change(). Aborting.
>
> I'm investigating why that happens.
>
> So all in all I would say that the ofono AG role support is completely
> broken
> and I can only recommend to run ofono with the --noplugin=hfp_ag_bluez5
> to disable it.
Thanks for the report. It sounds like the Bluetooth page[1] should
recommend starting ofono with --noplugin=hfp_ag_bluez5.
[1] https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Bluetooth/
--
Tanu
https://www.patreon.com/tanuk
More information about the pulseaudio-discuss
mailing list