Re: [pulseaudio-discuss] [PATCH v2 3/3] bluetooth: add correct HFP rfcomm negotiation

2016-08-28 Thread Tanu Kaskinen
On Fri, 2016-08-26 at 11:04 -0400, James Bottomley wrote: > On Wed, 2016-08-24 at 16:17 +0300, Tanu Kaskinen wrote: > > > > On Tue, 2016-08-23 at 08:37 -0400, James Bottomley wrote: > > > > > > On Mon, 2016-08-22 at 15:12 +0300, Tanu Kaskinen wrote: > > > > > > > > and AT+CHLD=?. > > > > > >

Re: [pulseaudio-discuss] [PATCH v2 3/3] bluetooth: add correct HFP rfcomm negotiation

2016-08-26 Thread James Bottomley
On Wed, 2016-08-24 at 16:17 +0300, Tanu Kaskinen wrote: > On Tue, 2016-08-23 at 08:37 -0400, James Bottomley wrote: > > On Mon, 2016-08-22 at 15:12 +0300, Tanu Kaskinen wrote: > > > and AT+CHLD=?. > > > > This one is a bit weird: in theory the response should be call hold > > states, but we

Re: [pulseaudio-discuss] [PATCH v2 3/3] bluetooth: add correct HFP rfcomm negotiation

2016-08-24 Thread Tanu Kaskinen
On Tue, 2016-08-23 at 08:37 -0400, James Bottomley wrote: > On Mon, 2016-08-22 at 15:12 +0300, Tanu Kaskinen wrote: > > > > On Sun, 2016-08-21 at 16:16 -0400, James Bottomley wrote: > > > > > > On Sun, 2016-08-21 at 23:01 +0300, Tanu Kaskinen wrote: > > > > The commands are queries, so shouldn't

Re: [pulseaudio-discuss] [PATCH v2 3/3] bluetooth: add correct HFP rfcomm negotiation

2016-08-22 Thread Tanu Kaskinen
On Sun, 2016-08-21 at 16:16 -0400, James Bottomley wrote: > On Sun, 2016-08-21 at 23:01 +0300, Tanu Kaskinen wrote: > > > > On Sat, 2016-08-20 at 15:05 -0700, James Bottomley wrote: > > > > > > +static int hfp_rfcomm_handle(int fd, pa_bluetooth_transport *t, > > > const char *buf) > > > +{ > > >

Re: [pulseaudio-discuss] [PATCH v2 3/3] bluetooth: add correct HFP rfcomm negotiation

2016-08-21 Thread James Bottomley
On Sun, 2016-08-21 at 16:16 -0400, James Bottomley wrote: > The v1.6 version of the standard contains a diagram > which shows the minimum dialog you need. For this standard: https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=238193 it's figure 4.1 (service level connection

Re: [pulseaudio-discuss] [PATCH v2 3/3] bluetooth: add correct HFP rfcomm negotiation

2016-08-21 Thread James Bottomley
On Sun, 2016-08-21 at 23:01 +0300, Tanu Kaskinen wrote: > On Sat, 2016-08-20 at 15:05 -0700, James Bottomley wrote: > > +static int hfp_rfcomm_handle(int fd, pa_bluetooth_transport *t, > > const char *buf) > > +{ > > +struct hfp_config *c = t->config; > > +int val; > > + > > +/*

Re: [pulseaudio-discuss] [PATCH v2 3/3] bluetooth: add correct HFP rfcomm negotiation

2016-08-21 Thread Tanu Kaskinen
On Sat, 2016-08-20 at 15:05 -0700, James Bottomley wrote: > +static int hfp_rfcomm_handle(int fd, pa_bluetooth_transport *t, const char > *buf) > +{ > +struct hfp_config *c = t->config; > +int val; > + > +/* stateful negotiation */ > +if (c->state == 0 && sscanf(buf, "AT+BRSF=%d",

[pulseaudio-discuss] [PATCH v2 3/3] bluetooth: add correct HFP rfcomm negotiation

2016-08-20 Thread James Bottomley
HFP 1.6 requires a stateful negotiation of AT commands. The prior version got away with initialising HFP simply by replying 'OK' to every negotiation attempt. This one actually tries to parse the state and make sure the negotiation occurs correctly Signed-off-by: James Bottomley