2011-09-23 10:03:56

by Mikel Astiz

[permalink] [raw]
Subject: SCO control in HansfreeGateway

Hi all,

Some recent patches have made that the State property in
HandsfreeGateway exposes if the SCO connection is active or not. As far
as I understand, the state Playing is specifically added for this reason.

However, I don't see any way in the D-Bus API to control the state of
this connection. One example would be that a phone would drop the audio
connection (it is allowed to do so at any time) but the user wants this
connection to be re-established.

Wouldn't this require the addition of some methods like ConnectAudio and
DisconnectAudio in the HandsfreeGateway interface?

Regards,
Mikel



2011-09-23 10:19:15

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: SCO control in HansfreeGateway

Hi Mikel,

On Fri, Sep 23, 2011 at 1:03 PM, Mikel Astiz <[email protected]> wrote:
> Hi all,
>
> Some recent patches have made that the State property in HandsfreeGateway
> exposes if the SCO connection is active or not. As far as I understand, the
> state Playing is specifically added for this reason.
>
> However, I don't see any way in the D-Bus API to control the state of this
> connection. One example would be that a phone would drop the audio
> connection (it is allowed to do so at any time) but the user wants this
> connection to be re-established.

If you want to control the connection then you need to use the unix
socket or register a endpoint with org.bluez.Media.RegisterEndpoint
(recommended), for the latter you need this is your audio.conf

Enable=Media
Disable=Socket

There is some documentation about it in doc/media-api.txt and a test
script test/simple-endpoint

> Wouldn't this require the addition of some methods like ConnectAudio and
> DisconnectAudio in the HandsfreeGateway interface?

Nope, this was why we also deprecated Headset.Play/Stop, it is not up
to the application to decide when to connect but to the endpoints e.g.
if you are using PulseAudio make use of set_profile.

--
Luiz Augusto von Dentz