[PATCH 7/7] hfp_hf_bluez5: Handle org.bluez.Profile1.Release()

2013-09-10 Thread Vinicius Costa Gomes
There's nothing we can do in this case, so we only reply with a success. --- plugins/hfp_hf_bluez5.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugins/hfp_hf_bluez5.c b/plugins/hfp_hf_bluez5.c index 7e98a45..391a74e 100644 --- a/plugins/hfp_hf_bluez5.c +++

[PATCH 5/7] handsfree-audio: Fix keeping the socket open without defer_setup

2013-09-10 Thread Vinicius Costa Gomes
As we won't allow any card to be registered when the kernel doesn't support defer_setup, we don't need to have the listening SCO socket open in this case. --- src/handsfree-audio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/handsfree-audio.c b/src/handsfree-audio.c index

[PATCH 1/7] handsfree-audio: Add setting SCO air mode

2013-09-10 Thread Vinicius Costa Gomes
--- I did a few quick tests here, but it would be much appreciated if someone with access to more devices could test it. Sorry for the delay. Cheers, src/handsfree-audio.c | 32 1 file changed, 32 insertions(+) diff --git a/src/handsfree-audio.c

[PATCH 3/7] handsfree-audio: Set the voice setting for outgoing connections

2013-09-10 Thread Vinicius Costa Gomes
In the AG case, the voice setting needs to be set before we can use Transparent SCO mode, which is necessary for Wideband speech support. --- src/handsfree-audio.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/handsfree-audio.c b/src/handsfree-audio.c index 52d111a..5cfc939 100644

[PATCH 2/7] handsfree-audio: Add support for detecting Transparent SCO support

2013-09-10 Thread Vinicius Costa Gomes
--- include/handsfree-audio.h | 2 +- plugins/hfp_hf_bluez5.c | 2 +- src/handsfree-audio.c | 18 ++ 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/include/handsfree-audio.h b/include/handsfree-audio.h index 846a032..03e3b38 100644 ---

[PATCH 6/7] hfp_hf_bluez5: Handle org.bluez.Profile1.Cancel()

2013-09-10 Thread Vinicius Costa Gomes
Cancel() will be called when the ConnectProfile() is called, perhaps even replied with a success, and the user cancels the connection attempt. --- plugins/hfp_hf_bluez5.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugins/hfp_hf_bluez5.c b/plugins/hfp_hf_bluez5.c index

[PATCH 4/7] handsfree-audio: Do not allow cards to be registered if no defer_setup

2013-09-10 Thread Vinicius Costa Gomes
If the kernel doesn't support defer_setup for SCO, we shouldn't allow cards to be registered, because in that case we won't be able to properly send the file descriptor to the Agent. --- src/handsfree-audio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/handsfree-audio.c

Re: [PATCH 6/6] hfp_hf_bluez5: Handle org.bluez.Profile1.Release()

2013-08-19 Thread Vinicius Costa Gomes
Hi Denis, On 12:57 Mon 19 Aug, Denis Kenzior wrote: Hi Vinicius, On 08/15/2013 09:26 PM, Vinicius Costa Gomes wrote: There's nothing we can do in this case, so we only reply with a success. --- plugins/hfp_hf_bluez5.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff

Re: [PATCH 3/6] handsfree-audio: Add support for detecting Transparent SCO support

2013-08-19 Thread Vinicius Costa Gomes
Hi Denis, On 12:55 Mon 19 Aug, Denis Kenzior wrote: Hi Vinicius, On 08/15/2013 09:26 PM, Vinicius Costa Gomes wrote: --- include/handsfree-audio.h | 2 +- plugins/hfp_hf_bluez5.c | 2 +- src/handsfree-audio.c | 23 +-- 3 files changed, 19 insertions(+), 8

[PATCH] handsfree-audio: Fix replying to an empty D-Bus message

2013-05-02 Thread Vinicius Costa Gomes
In the case that ofono_handsfree_card_connect_sco() is called outside the context of a .Connect() call, there's no message we need to reply. This happens, for example, when the HFP AG plugin initiates a SCO connection when it receives an AT+BCC command from the HF. --- src/handsfree-audio.c | 9

Re: [PATCH] hfp_hf_bluez5: Fix re-registering a modem for a device

2013-04-25 Thread Vinicius Costa Gomes
Hi Denis, On 03:27 Thu 25 Apr, Denis Kenzior wrote: Hi Johan, Vinicius, On 04/25/2013 04:37 AM, Johan Hedberg wrote: Hi Mikel, On Thu, Apr 25, 2013, Mikel Astiz wrote: On Tue, Apr 23, 2013 at 7:28 PM, Johan Hedbergjohan.hedb...@gmail.com wrote: Hi Marcel, On Tue, Apr 23, 2013,

Re: [PATCH v2 3/3] hfp_hf_bluez5: Register the SDP record with correct features

2013-04-25 Thread Vinicius Costa Gomes
Hi Denis, On 03:41 Thu 25 Apr, Denis Kenzior wrote: Hi Vinicius, On 04/23/2013 04:21 PM, Vinicius Costa Gomes wrote: --- plugins/hfp_hf_bluez5.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) Patch has been applied, thanks. diff --git a/plugins/hfp_hf_bluez5.c b

[PATCH 2/3] handsfree-audio: Implement ofono_handsfree_audio_has_defer_setup()

2013-04-25 Thread Vinicius Costa Gomes
--- src/handsfree-audio.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/handsfree-audio.c b/src/handsfree-audio.c index dc37853..d78498a 100644 --- a/src/handsfree-audio.c +++ b/src/handsfree-audio.c @@ -562,6 +562,11 @@ ofono_bool_t ofono_handsfree_audio_has_wideband(void)

[PATCH 3/3] hfp_hf_bluez5: Only enable wideband speech if defer_setup is supported

2013-04-25 Thread Vinicius Costa Gomes
When setting the SDP features, only enable wideband speech support if the kernel has defer setup for SCO. It is possible that even if defer setup is supported the kernel is not able to use Transparent Mode for SCO. --- plugins/hfp_hf_bluez5.c | 10 -- 1 file changed, 8 insertions(+), 2

Re: [PATCH 1/3] bluez5: Add bt_register_profile_full()

2013-04-23 Thread Vinicius Costa Gomes
Hi Denis, On 03:46 Tue 23 Apr, Denis Kenzior wrote: Hi Vinicius, On 04/22/2013 12:54 PM, Vinicius Costa Gomes wrote: This function makes it easy to set up optional information in the profile service record. --- plugins/bluez5.c | 40 +--- plugins

Re: [PATCH] hfp_hf_bluez5: Fix re-registering a modem for a device

2013-04-23 Thread Vinicius Costa Gomes
Hi, On 20:28 Tue 23 Apr, Johan Hedberg wrote: Hi Marcel, On Tue, Apr 23, 2013, Marcel Holtmann wrote: I don't completely understand the rationale of wanting to make BlueZ's clients so fragile. You could in theory get new services way after pairing if this is configurable on the

[PATCH v2 2/3] hfp: Add defines for HFP SDP feature bits

2013-04-23 Thread Vinicius Costa Gomes
--- src/hfp.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/src/hfp.h b/src/hfp.h index b54de56..0d36ae5 100644 --- a/src/hfp.h +++ b/src/hfp.h @@ -45,6 +45,24 @@ enum hfp_hf_feature { HFP_HF_FEATURE_CODEC_NEGOTIATION = 0x80, }; +enum hfp_sdp_hf_features

[PATCH v2 3/3] hfp_hf_bluez5: Register the SDP record with correct features

2013-04-23 Thread Vinicius Costa Gomes
--- plugins/hfp_hf_bluez5.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/hfp_hf_bluez5.c b/plugins/hfp_hf_bluez5.c index 826796f..06b6fd3 100644 --- a/plugins/hfp_hf_bluez5.c +++ b/plugins/hfp_hf_bluez5.c @@ -636,10 +636,15 @@ static const GDBusMethodTable

[PATCH v2 1/3] bluez5: Unify bt_register_profile_* into a single function

2013-04-23 Thread Vinicius Costa Gomes
It was a cause of confusion for little gain to have separate functions for registering profiles with extra information, for example role and features. We remove those helper functions in favor of a single one with more parameters, role and feature when NULL, will be ignored. --- dundee/bluez5.c

[PATCH 2/3] hfp: Add defines for HFP SDP feature bits

2013-04-22 Thread Vinicius Costa Gomes
--- src/hfp.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/src/hfp.h b/src/hfp.h index b54de56..0d36ae5 100644 --- a/src/hfp.h +++ b/src/hfp.h @@ -45,6 +45,24 @@ enum hfp_hf_feature { HFP_HF_FEATURE_CODEC_NEGOTIATION = 0x80, }; +enum hfp_sdp_hf_features

[PATCH 3/3] hfp_hf_bluez5: Register the SDP record with correct features

2013-04-22 Thread Vinicius Costa Gomes
--- plugins/hfp_hf_bluez5.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/plugins/hfp_hf_bluez5.c b/plugins/hfp_hf_bluez5.c index 2b9275b..d975a42 100644 --- a/plugins/hfp_hf_bluez5.c +++ b/plugins/hfp_hf_bluez5.c @@ -636,10 +636,19 @@ static const

[PATCH 1/3] bluez5: Add bt_register_profile_full()

2013-04-22 Thread Vinicius Costa Gomes
This function makes it easy to set up optional information in the profile service record. --- plugins/bluez5.c | 40 +--- plugins/bluez5.h | 10 ++ 2 files changed, 43 insertions(+), 7 deletions(-) diff --git a/plugins/bluez5.c b/plugins/bluez5.c index

[PATCH] hfp_hf_bluez5: Fix re-registering a modem for a device

2013-04-22 Thread Vinicius Costa Gomes
Even for outgoing pairing requests we may receive the UUIDs property changed after the device is paired and try to register it twice. The easiest way to reproduce this is when Extended Inquiry Response is supported. When the device is paired, we receive the Paired PropertyChanged, inside

[PATCH] hfp_hf_bluez5: Fix not considering that UUIDs change after creation

2013-04-18 Thread Vinicius Costa Gomes
For example, in the case of a incoming connection the device may be created without UUIDs and the property changed is emitted later. --- plugins/hfp_hf_bluez5.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/hfp_hf_bluez5.c b/plugins/hfp_hf_bluez5.c index

[PATCH v3 4/6] handsfree-audio: Send the selected codec

2013-04-15 Thread Vinicius Costa Gomes
From: Claudio Takahasi claudio.takah...@openbossa.org This patch removes the hard-coded CVSD codec, and adds the selected codec in the NewConnection method call, notifying the agent the codec previously selected for the audio connection. --- src/handsfree-audio.c | 7 +++ 1 file changed, 3

[PATCH v3 5/6] handsfree-audio: Keep track whether defer_setup is enabled

2013-04-15 Thread Vinicius Costa Gomes
'defer_setup' will be one of the inputs when enabling or disabling support for wideband speech codecs, we will only enable wideband speech support if the kernel supports deferred setup. So, we have to have this information available, in this case it means a global variable. ---

[PATCH v3 1/6] include: Add ofono_handsfree_card_set_codec()

2013-04-15 Thread Vinicius Costa Gomes
This will be used by the drivers that a given codec was negotiated for a card. It will return FALSE if the codec can't be used. For example, if the selected codec is mSBC and defer setup is not supported by the kernel. --- include/handsfree-audio.h | 2 ++ 1 file changed, 2 insertions(+) diff

[PATCH v3 3/6] hfp_hf_bluez5: Watch for changes in the selected codec

2013-04-15 Thread Vinicius Costa Gomes
This patch adds a function to monitor when the AG sends a new codec before establishing the SCO connection. --- plugins/hfp_hf_bluez5.c | 40 1 file changed, 40 insertions(+) diff --git a/plugins/hfp_hf_bluez5.c b/plugins/hfp_hf_bluez5.c index

[PATCH v3 2/6] handsfree-audio: Implement ofono_handsfree_card_set_codec()

2013-04-15 Thread Vinicius Costa Gomes
--- src/handsfree-audio.c | 20 1 file changed, 20 insertions(+) diff --git a/src/handsfree-audio.c b/src/handsfree-audio.c index 50be691..8e8d460 100644 --- a/src/handsfree-audio.c +++ b/src/handsfree-audio.c @@ -49,6 +49,7 @@ struct ofono_handsfree_card { char

[PATCH v3 6/6] handsfree-audio: Toggle wideband support when the agent registers

2013-04-15 Thread Vinicius Costa Gomes
Each time an agent registers itself, we check if we support deferred setup and if the agent has mSBC as a codec, if both checks are true, we enable wideband speech support. --- src/handsfree-audio.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git

[RFC 2/2] handsfree-audio: Add setting SCO air mode

2013-04-15 Thread Vinicius Costa Gomes
From: Claudio Takahasi claudio.takah...@openbossa.org --- src/handsfree-audio.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/src/handsfree-audio.c b/src/handsfree-audio.c index c24e787..a7da523 100644 --- a/src/handsfree-audio.c +++ b/src/handsfree-audio.c @@ -68,6

[RFC 0/2] Setting the SCO air mode

2013-04-15 Thread Vinicius Costa Gomes
Hi, Sending this as an RFC as this depends on an socket API that is still being discussed[1]. If the current proposed API (SCO_SETTINGS) is approved, this series can be promoted to 'PATCH'. If we want to send mSBC data over SCO, we need to enable the transparent mode in the SCO link, the only

[RFC 1/2] bluetooth: Add define for SCO voice settings

2013-04-15 Thread Vinicius Costa Gomes
From: Claudio Takahasi claudio.takah...@openbossa.org Add defines for SCO voice setting (Air Coding). Air mode Transparent Data shall be supported if wide band speech is supported. --- src/bluetooth.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/bluetooth.h

Re: [PATCH v2 2/7] include: ofono_handsfree_card_select_codec()

2013-04-13 Thread Vinicius Costa Gomes
Hi Denis, On 18:12 Fri 12 Apr, Denis Kenzior wrote: Hi Vinicius, On 04/10/2013 02:37 PM, Vinicius Costa Gomes wrote: This will be used by the drivers that a given codec was negotiated for a card. --- include/handsfree-audio.h | 2 ++ 1 file changed, 2 insertions(+) diff --git

Re: [PATCH v2 1/7] hfpmodem: Watch for changes in the selected codec

2013-04-12 Thread Vinicius Costa Gomes
Hi Denis, On 18:07 Fri 12 Apr, Denis Kenzior wrote: Hi Vinicius, On 04/10/2013 02:37 PM, Vinicius Costa Gomes wrote: This patch adds a function to monitor when the AG sends a new codec before establishing the SCO connection. --- plugins/hfp_hf_bluez5.c | 51

Re: [PATCH 1/8] hfpmodem: Add codec watcher register

2013-04-10 Thread Vinicius Costa Gomes
Hi Denis, [snip] +guint hfp_slc_codec_watch_register(struct hfp_slc_info *info, +hfp_slc_codec_watch_cb_t cb, void *user_data) +{ +struct codec_watch *watch = g_new0(struct codec_watch, 1); + +watch-slc = info; +watch-cb = cb; +watch-user_data

[PATCH v2 2/7] include: ofono_handsfree_card_select_codec()

2013-04-10 Thread Vinicius Costa Gomes
This will be used by the drivers that a given codec was negotiated for a card. --- include/handsfree-audio.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/handsfree-audio.h b/include/handsfree-audio.h index 82d1312..2e58c43 100644 --- a/include/handsfree-audio.h +++

[PATCH v2 1/7] hfpmodem: Watch for changes in the selected codec

2013-04-10 Thread Vinicius Costa Gomes
This patch adds a function to monitor when the AG sends a new codec before establishing the SCO connection. --- plugins/hfp_hf_bluez5.c | 51 + 1 file changed, 51 insertions(+) diff --git a/plugins/hfp_hf_bluez5.c b/plugins/hfp_hf_bluez5.c index

[PATCH v2 3/7] handsfree-audio: Implement ofono_handsfree_card_select_codec()

2013-04-10 Thread Vinicius Costa Gomes
--- src/handsfree-audio.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/handsfree-audio.c b/src/handsfree-audio.c index 50be691..3d6804d 100644 --- a/src/handsfree-audio.c +++ b/src/handsfree-audio.c @@ -49,6 +49,7 @@ struct ofono_handsfree_card { char *local;

[PATCH v2 5/7] handsfree-audio: Send the selected codec

2013-04-10 Thread Vinicius Costa Gomes
From: Claudio Takahasi claudio.takah...@openbossa.org This patch removes the hard-coded CVSD codec, and adds the selected codec in the NewConnection method call, notifying the agent the codec previously selected for the audio connection. --- src/handsfree-audio.c | 7 +++ 1 file changed, 3

[PATCH v2 6/7] handsfree-audio: Set CVSD as default in the card

2013-04-10 Thread Vinicius Costa Gomes
From: Claudio Takahasi claudio.takah...@openbossa.org If the device doesn't support codec negotiation, the selected codec is not being initialized. For this case set CVSD as default. --- src/handsfree-audio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/handsfree-audio.c

[PATCH v2 7/7] handsfree-audio: Enable wideband speech if defer is enabled

2013-04-10 Thread Vinicius Costa Gomes
From: Claudio Takahasi claudio.takah...@openbossa.org Only enable support for wideband speech codecs, at this point mSBC, if the kernel supports defer setup. --- src/handsfree-audio.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/handsfree-audio.c

[PATCH 0/8] HFP 1.6 codec selection

2013-04-09 Thread Vinicius Costa Gomes
the selected codec handsfree-audio: Set CVSD as default in the card handsfree-audio: Enable wideband speech if defer is enabled Vinicius Costa Gomes (3): hfpmodem: Add codec watcher register include: ofono_handsfree_card_select_codec() handsfree-audio: Implement

[PATCH 1/8] hfpmodem: Add codec watcher register

2013-04-09 Thread Vinicius Costa Gomes
This patch adds a function to monitor when the AG sends a new codec before establishing the SCO connection. --- drivers/hfpmodem/slc.c | 62 ++ drivers/hfpmodem/slc.h | 4 2 files changed, 66 insertions(+) diff --git a/drivers/hfpmodem/slc.c

[PATCH 2/8] hfp_hf_bluez5: Register codec watcher

2013-04-09 Thread Vinicius Costa Gomes
From: Claudio Takahasi claudio.takah...@openbossa.org This patch registers the codec watcher when the Handsfree Audio Card driver probe callback gets called. --- plugins/hfp_hf_bluez5.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/plugins/hfp_hf_bluez5.c

[PATCH 3/8] include: ofono_handsfree_card_select_codec()

2013-04-09 Thread Vinicius Costa Gomes
This will be used by the drivers that a given codec was negotiated for a card. --- include/handsfree-audio.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/handsfree-audio.h b/include/handsfree-audio.h index 82d1312..5d8e2b2 100644 --- a/include/handsfree-audio.h +++

[PATCH 4/8] handsfree-audio: Implement ofono_handsfree_card_select_codec()

2013-04-09 Thread Vinicius Costa Gomes
--- src/handsfree-audio.c | 12 1 file changed, 12 insertions(+) diff --git a/src/handsfree-audio.c b/src/handsfree-audio.c index 50be691..12d49db 100644 --- a/src/handsfree-audio.c +++ b/src/handsfree-audio.c @@ -49,6 +49,7 @@ struct ofono_handsfree_card { char *local;

[PATCH 5/8] hfp_hf_bluez5: Set the audio codec in the card

2013-04-09 Thread Vinicius Costa Gomes
From: Claudio Takahasi claudio.takah...@openbossa.org This patch updates the handsfree audio card codec when the AG notifies the codec for the succeeding incoming SCO connection. --- plugins/hfp_hf_bluez5.c | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/hfp_hf_bluez5.c

[PATCH 6/8] handsfree-audio: Send the selected codec

2013-04-09 Thread Vinicius Costa Gomes
From: Claudio Takahasi claudio.takah...@openbossa.org This patch removes the hard-coded CVSD codec, and adds the selected codec in the NewConnection method call, notifying the agent the codec previously selected for the audio connection. --- src/handsfree-audio.c | 7 +++ 1 file changed, 3

[PATCH 8/8] handsfree-audio: Enable wideband speech if defer is enabled

2013-04-09 Thread Vinicius Costa Gomes
From: Claudio Takahasi claudio.takah...@openbossa.org Only enable support for wideband speech codecs, at this point mSBC, if the kernel support defer setup. --- src/handsfree-audio.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/handsfree-audio.c

[PATCH 1/6] hfp_hf_bluez5: Add audio card .connect() for HFP 1.6

2013-04-08 Thread Vinicius Costa Gomes
--- plugins/hfp_hf_bluez5.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/plugins/hfp_hf_bluez5.c b/plugins/hfp_hf_bluez5.c index ac6189d..d4a9b23 100644 --- a/plugins/hfp_hf_bluez5.c +++ b/plugins/hfp_hf_bluez5.c @@ -324,11 +324,39 @@ static

[PATCH 2/6] include: Add ofono_handsfree_audio_has_wideband()

2013-04-08 Thread Vinicius Costa Gomes
As we can assume that the CVSD codec will be always available, the only information that we need to export is if we have support for wideband codecs, right now, only mSBC is defined. --- include/handsfree-audio.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/handsfree-audio.h

[PATCH 4/6] include: Make HFP 1.6 codecs definition public

2013-04-08 Thread Vinicius Costa Gomes
As there is some knowledge about the codecs in both the core (handsfree-audio) and the hfpmodem driver, this information should be available from a single location. --- include/types.h | 6 ++ src/handsfree-audio.c | 6 -- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git

[PATCH 5/6] hfpmodem: Send AT+BAC with the supported codecs

2013-04-08 Thread Vinicius Costa Gomes
Before, the AT+BAC command was being sent with fixed information, now we send the command (that inform the AG of the codecs supported by the HF) with the codecs supported by the registered Handsfree Audio Agent. --- drivers/hfpmodem/slc.c | 12 +++- 1 file changed, 11 insertions(+), 1

[PATCH 6/6] handsfree-audio: Remove unused 'codecs' field from agent

2013-04-08 Thread Vinicius Costa Gomes
Now that we only keep track whether we support wideband speech or not, we don't have to keep track of the list of codecs supported by the Agent. --- src/handsfree-audio.c | 5 - 1 file changed, 5 deletions(-) diff --git a/src/handsfree-audio.c b/src/handsfree-audio.c index 69d033d..188deee

Re: [PATCH 2/5] hfp_hf_bluez5: Add audio card .connect() for HFP 1.6

2013-04-05 Thread Vinicius Costa Gomes
Hi Denis, On 12:22 Fri 05 Apr, Denis Kenzior wrote: Hi Vinicius, On 04/03/2013 06:24 PM, Vinicius Costa Gomes wrote: --- plugins/hfp_hf_bluez5.c | 41 - 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/plugins/hfp_hf_bluez5.c b

Re: [PATCH 4/5] handsfree-audio: Add function to get the codecs

2013-04-05 Thread Vinicius Costa Gomes
Hi Denis, On 12:32 Fri 05 Apr, Denis Kenzior wrote: +int ofono_handsfree_get_codecs(unsigned char *buffer, int buffer_len) +{ +int len; + +if (agent == NULL) +return -EIO; + +len = MIN(buffer_len, agent-codecs_len); +memcpy(buffer, agent-codecs, len); + +

Re: [PATCH 4/5] handsfree-audio: Add function to get the codecs

2013-04-05 Thread Vinicius Costa Gomes
Hi Denis, On 16:40 Fri 05 Apr, Denis Kenzior wrote: Hi Vinicius, On 04/05/2013 03:56 PM, Vinicius Costa Gomes wrote: Hi Denis, On 12:32 Fri 05 Apr, Denis Kenzior wrote: +int ofono_handsfree_get_codecs(unsigned char *buffer, int buffer_len) +{ + int len; + + if (agent == NULL

[PATCH 1/5] hfp_hf_bluez5: Add extracting version

2013-04-03 Thread Vinicius Costa Gomes
From: Claudio Takahasi claudio.takah...@openbossa.org This patch parses and reads the profile Version that comes in the fd dictionary of the NewConnection method. Version is input for Audio Card registration. --- plugins/hfp_hf_bluez5.c | 49 - 1

[PATCH 2/5] hfp_hf_bluez5: Add audio card .connect() for HFP 1.6

2013-04-03 Thread Vinicius Costa Gomes
--- plugins/hfp_hf_bluez5.c | 41 - 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/plugins/hfp_hf_bluez5.c b/plugins/hfp_hf_bluez5.c index a6cc156..4c8f412 100644 --- a/plugins/hfp_hf_bluez5.c +++ b/plugins/hfp_hf_bluez5.c @@ -67,6 +67,8 @@

[PATCH 4/5] handsfree-audio: Add function to get the codecs

2013-04-03 Thread Vinicius Costa Gomes
From: Claudio Takahasi claudio.takah...@openbossa.org This patch adds a new handsfree-audio public function to read the available codecs registered by the agent. --- include/handsfree-audio.h | 1 + src/handsfree-audio.c | 13 + 2 files changed, 14 insertions(+) diff --git

[PATCH 3/5] hfp_hf_bluez5: Select the audio card driver based on version

2013-04-03 Thread Vinicius Costa Gomes
--- plugins/hfp_hf_bluez5.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/plugins/hfp_hf_bluez5.c b/plugins/hfp_hf_bluez5.c index 4c8f412..41ea549 100644 --- a/plugins/hfp_hf_bluez5.c +++ b/plugins/hfp_hf_bluez5.c @@ -436,7 +436,7 @@ static DBusMessage

[PATCH 5/5] hfpmodem: Send AT+BAC with the supported codecs

2013-04-03 Thread Vinicius Costa Gomes
Before, the AT+BAC command was being sent with fixed information, now we send the command (that inform the AG of the codecs supported by the HF) with the codecs supported by the registered Handsfree Audio Agent. --- drivers/hfpmodem/slc.c | 21 - 1 file changed, 20

Re: [PATCH 5/5] handsfree-audio: Handle when .Connect() was already replied to

2013-04-02 Thread Vinicius Costa Gomes
Hi Denis, Sorry for the delay. On 09:41 Thu 28 Mar, Denis Kenzior wrote: Hi Vinicius, On 03/27/2013 07:13 PM, Vinicius Costa Gomes wrote: In some cases, it is possible that when sco_connect_cb() is called the .Connect() message (stored in card-msg) is not valid anymore. Can you tell me

Re: [PATCH] handsfree-audio: Add .Connect using the card driver

2013-03-27 Thread Vinicius Costa Gomes
Hi Denis, On 23:59 Tue 26 Mar, Denis Kenzior wrote: Hi Vinicius, On 03/26/2013 04:28 PM, Vinicius Costa Gomes wrote: Now each handsfree implementation may be notified that a card wants its audio to be connected. In case, that the cards wishes to fallback to the default SCO connection

Re: [PATCH] handsfree-audio: Add .Connect using the card driver

2013-03-27 Thread Vinicius Costa Gomes
Hi Denis, On 09:32 Wed 27 Mar, Denis Kenzior wrote: Yes. This behaviour is even covered in one of the PTS tests: TP/ACC/BV-03-I (from the description of the test, To verify the capability of the HF initiating a legacy audio connection with an AG that does not support the Codec Connection

[PATCH 1/5] hfp_hf_bluez5: Add a card driver for HFP 1.6

2013-03-27 Thread Vinicius Costa Gomes
This is just the skeleton of a Handsfree Audio Card for the HF side of HFP 1.6. --- plugins/hfp_hf_bluez5.c | 37 + 1 file changed, 37 insertions(+) diff --git a/plugins/hfp_hf_bluez5.c b/plugins/hfp_hf_bluez5.c index ff8afba..e2fa70c 100644 ---

[PATCH 2/5] include: Add ofono_handsfree_card_connect_sco()

2013-03-27 Thread Vinicius Costa Gomes
This will be used by HFP plugins to tell the core that a SCO connection needs to be established. --- include/handsfree-audio.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/handsfree-audio.h b/include/handsfree-audio.h index 8c16b22..49b0605 100644 --- a/include/handsfree-audio.h

[PATCH 3/5] handsfree-audio: Add ofono_handsfree_card_connect_sco

2013-03-27 Thread Vinicius Costa Gomes
--- src/handsfree-audio.c | 87 ++- 1 file changed, 44 insertions(+), 43 deletions(-) diff --git a/src/handsfree-audio.c b/src/handsfree-audio.c index f8df6d6..571ed54 100644 --- a/src/handsfree-audio.c +++ b/src/handsfree-audio.c @@ -236,40 +236,6

[PATCH 4/5] handsfree-audio: Add .Connect using the card driver

2013-03-27 Thread Vinicius Costa Gomes
Now each handsfree implementation may be notified that a card wants its audio to be connected. --- src/handsfree-audio.c | 25 + 1 file changed, 25 insertions(+) diff --git a/src/handsfree-audio.c b/src/handsfree-audio.c index 571ed54..3f24a2a 100644 ---

[PATCH 5/5] handsfree-audio: Handle when .Connect() was already replied to

2013-03-27 Thread Vinicius Costa Gomes
In some cases, it is possible that when sco_connect_cb() is called the .Connect() message (stored in card-msg) is not valid anymore. --- src/handsfree-audio.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/handsfree-audio.c

Re: [PATCH 5/5] handsfree-audio: Add .Connect using the card driver

2013-03-26 Thread Vinicius Costa Gomes
Hi, On 19:05 Mon 25 Mar, Vinicius Costa Gomes wrote: --- src/handsfree-audio.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a/src/handsfree-audio.c b/src/handsfree-audio.c index f8df6d6..9d3d64e 100644 --- a/src/handsfree-audio.c +++ b/src

[PATCH] handsfree-audio: Add .Connect using the card driver

2013-03-26 Thread Vinicius Costa Gomes
Now each handsfree implementation may be notified that a card wants its audio to be connected. In case, that the cards wishes to fallback to the default SCO connection procedure, it just needs to return -ENOSYS. --- src/handsfree-audio.c | 34 +- 1 file changed,

[PATCH 1/5] handsfree-audio: Add support for initiating SCO connections

2013-03-25 Thread Vinicius Costa Gomes
When calling the card's .Connect() method, we should be able to establish a SCO connection. Right now, we only have support for establishing the SCO connection directly, this is what is expected from HFP 1.5 HF/AG devices. --- src/handsfree-audio.c | 93

[PATCH 2/5] handsfree-audio: Add support for sending the SCO socket

2013-03-25 Thread Vinicius Costa Gomes
Send the SCO socket to the agent associated with the card that just got connected. --- src/handsfree-audio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/handsfree-audio.c b/src/handsfree-audio.c index 795a68b..4232074 100644 --- a/src/handsfree-audio.c +++ b/src/handsfree-audio.c @@

[PATCH 3/5] handsfree-audio: Reject .Connect() from other senders

2013-03-25 Thread Vinicius Costa Gomes
Only the agent should be able to call .Connect() on the card. --- src/handsfree-audio.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/handsfree-audio.c b/src/handsfree-audio.c index 4232074..f8df6d6 100644 --- a/src/handsfree-audio.c +++ b/src/handsfree-audio.c @@ -312,11 +312,17

[PATCH 4/5] hfp_hf_bluez5: Add a card driver for HFP 1.6

2013-03-25 Thread Vinicius Costa Gomes
This is just the skeleton of a Handsfree Audio Card for the HF side of HFP 1.6. --- plugins/hfp_hf_bluez5.c | 37 + 1 file changed, 37 insertions(+) diff --git a/plugins/hfp_hf_bluez5.c b/plugins/hfp_hf_bluez5.c index ff8afba..89b60c8 100644 ---

Re: [PATCH 2/3] handsfree-audio: Add support for initiating SCO connections

2013-03-20 Thread Vinicius Costa Gomes
Hi Denis, On 22:38 Tue 19 Mar, Denis Kenzior wrote: Hi Vinicius, On 03/19/2013 07:10 PM, Vinicius Costa Gomes wrote: When calling the card's .Connect() method, we should be able to establish a SCO connection. Right now, we only have support for establishing the SCO connection directly

[PATCH 1/4] handsfree-audio: Add support for initiating SCO connections

2013-03-20 Thread Vinicius Costa Gomes
When calling the card's .Connect() method, we should be able to establish a SCO connection. Right now, we only have support for establishing the SCO connection directly, this is what is expected from HFP 1.5 HF/AG devices. --- src/handsfree-audio.c | 97

[PATCH 2/4] handsfree-audio: Add support for sending the SCO socket

2013-03-20 Thread Vinicius Costa Gomes
Send the SCO socket to the agent associated with the card that just got connected. --- src/handsfree-audio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/handsfree-audio.c b/src/handsfree-audio.c index 1da2224..3600255 100644 --- a/src/handsfree-audio.c +++ b/src/handsfree-audio.c @@

[PATCH 3/4] handsfree-audio: Reject .Connect() from other senders

2013-03-20 Thread Vinicius Costa Gomes
Only the agent should be able to call .Connect() on the card. --- src/handsfree-audio.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/handsfree-audio.c b/src/handsfree-audio.c index 3600255..c2bdc7f 100644 --- a/src/handsfree-audio.c +++ b/src/handsfree-audio.c @@ -314,11 +314,17

[PATCH 4/4] doc: Add Handsfree Audio Card Connect errors

2013-03-20 Thread Vinicius Costa Gomes
From: Claudio Takahasi claudio.takah...@openbossa.org --- doc/handsfree-audio-api.txt | 6 ++ 1 file changed, 6 insertions(+) diff --git a/doc/handsfree-audio-api.txt b/doc/handsfree-audio-api.txt index 6c3c8b5..89b5aab 100644 --- a/doc/handsfree-audio-api.txt +++

Re: [PATCH v2 00/13] Add support for BlueZ 5 Profile1 API to dundee

2013-03-19 Thread Vinicius Costa Gomes
Hi Daniel, On 10:55 Mon 18 Mar, Daniel Wagner wrote: Hi Paulo, I have tested this version and it seems to work. I say 'seems' because I was not able keep open the connection. All phones I have tested open the connection and close them right after. I am not sure if just my setup is

[PATCH 1/3] ofono.conf: Punch hole for HandsfreeAudioAgent

2013-03-19 Thread Vinicius Costa Gomes
--- src/ofono.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ofono.conf b/src/ofono.conf index 8a83cd0..ed56d3b 100644 --- a/src/ofono.conf +++ b/src/ofono.conf @@ -14,6 +14,7 @@ allow send_interface=org.ofono.PushNotificationAgent/ allow

[PATCH 2/3] handsfree-audio: Add support for initiating SCO connections

2013-03-19 Thread Vinicius Costa Gomes
When calling the card's .Connect() method, we should be able to establish a SCO connection. Right now, we only have support for establishing the SCO connection directly, this is what is expected from HFP 1.5 HF/AG devices. --- src/handsfree-audio.c | 94

[PATCH 3/3] handsfree-audio: Add support for sending the SCO socket

2013-03-19 Thread Vinicius Costa Gomes
When there's an agent registered, send the SCO file descriptor to the agent associated with the card after the connection is established. --- src/handsfree-audio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/handsfree-audio.c b/src/handsfree-audio.c index 9eecb8e..129f33f 100644

Re: [RFC v0 06/20] hfp_hf_bluez5: Add HFP 1.6 connect implementation

2013-03-14 Thread Vinicius Costa Gomes
Hi, On 11:21 Tue 12 Mar, Claudio Takahasi wrote: This patch implements the HF initiate SCO connection for devices compliant with HFP 1.6. HF sends AT+BCC to inform the AG that audio connection is required. --- plugins/hfp_hf_bluez5.c | 13 - 1 file changed, 12 insertions(+), 1

Re: [RFC v0 10/20] hfpmodem: Send AT+BAC with the supported codecs

2013-03-12 Thread Vinicius Costa Gomes
Hi, On 11:21 Tue 12 Mar, Claudio Takahasi wrote: From: Vinicius Costa Gomes vinicius.go...@openbossa.org Before, the AT+BAC command was being sent with fixed information, now we send the command (that inform the AG of the codecs supported by the HF) with the codecs supported

[PATCH 2/4] bluez5: Add support for Connecting/Disconnecting per UUID

2013-02-01 Thread Vinicius Costa Gomes
This adds supports for sending the ConnectProfile() and DisconnectProfile() messages for the org.bluez.Device1 interface. --- plugins/bluez5.c | 92 plugins/bluez5.h | 10 ++ 2 files changed, 102 insertions(+) diff --git

[PATCH 1/4] bluez5: Rename BlueZ Profile registration functions

2013-02-01 Thread Vinicius Costa Gomes
From: Claudio Takahasi claudio.takah...@openbossa.org This patch renames external profile registration functions replacing the prefix from 'bluetooth_' to 'bt_' in order to follow the name convention adopted for bluez5 functions. --- plugins/bluez5.c| 4 ++-- plugins/bluez5.h| 4

[PATCH 4/4] hfp_hf_bluez5: Add support for Enabling/Disabling the modem

2013-02-01 Thread Vinicius Costa Gomes
Now that we have the support for sending the correct messages to BlueZ, we are able to dynamically power up/down the HFP modem. We add another property to the modem to be able to get the D-Bus object path that represents the remote device. --- plugins/hfp_hf_bluez5.c | 39

[PATCH 3/4] hfp_hf_bluez5: Add Profile RequestDisconnection

2013-02-01 Thread Vinicius Costa Gomes
From: Claudio Takahasi claudio.takah...@openbossa.org This patch implements RequestDisconnection method of the Profile1 interface. This method gets called when the profile gets disconnected. The profile implementation needs to cleanup the resources related to the informed device. ---

[PATCH] hfp_hf_bluez5: Remove error handling for g_io_channel_unix_new()

2013-01-31 Thread Vinicius Costa Gomes
Apart from g_io_channel_unix_new() not setting errno, it never returns an NULL pointer on error, because in practice it only calls g_new(). --- plugins/hfp_hf_bluez5.c | 5 - 1 file changed, 5 deletions(-) diff --git a/plugins/hfp_hf_bluez5.c b/plugins/hfp_hf_bluez5.c index 8cac945..ff4dbad

[PATCH] TODO: Add task for supporting BlueZ 5 in dundee

2013-01-30 Thread Vinicius Costa Gomes
--- TODO | 9 + 1 file changed, 9 insertions(+) diff --git a/TODO b/TODO index 1fef651..c579718 100644 --- a/TODO +++ b/TODO @@ -159,6 +159,15 @@ Modem Emulator Priority: Medium Depends: HFP AG emulator as BlueZ service +- Add support for BlueZ 5 Profile1 API to dundee + BlueZ 5

Re: [PATCH 01/10] hfp_hf_bluez5: Initial GDBusClient for BlueZ

2013-01-23 Thread Vinicius Costa Gomes
Hi Denis, On 22:30 Tue 22 Jan, Denis Kenzior wrote: Hi Vinicius, On 01/22/2013 03:43 PM, Vinicius Costa Gomes wrote: This patch adds the initial callbacks to track when BlueZ connects or disconnects from the system bus. And tracks the interfaces added or removed. --- plugins/bluez5.h

Re: [PATCH 03/10] hfp_hf_bluez5: Register modem for HFP AG capable devices

2013-01-23 Thread Vinicius Costa Gomes
Hi Denis, On 22:59 Tue 22 Jan, Denis Kenzior wrote: Hi Vinicius, On 01/22/2013 03:43 PM, Vinicius Costa Gomes wrote: Now that we are able to keep track of devices appearing and disappearing from BlueZ, we are able to register the modem when a device that supports the HFP AG UUID appears

Re: AW: [PATCH 05/10] hfp_hf_bluez5: Handle NewConnection from BlueZ

2013-01-23 Thread Vinicius Costa Gomes
Hi, On 08:49 Wed 23 Jan, Denis Kenzior wrote: Hi Andreas, snip I assume returning NULL is ok here if nothing went wrong? I'm not familiar with plain dbus API, just using glib gdbus, there I would expect to create an answer to the call. The NewConnection method is marked as 'ASYNC' in

[PATCH v1 00/10] HFP Service Level Connection establishment

2013-01-23 Thread Vinicius Costa Gomes
Hi, Changes from last version (from review comments): - Better error handling when using GDBusProxy; - Fixed some indentation issues; - Proper use of the ofono_modem functionality to keep associated data; - Simplifications that these changes allowed; Cheers, Vinicius Costa Gomes (10

[PATCH v1 01/10] hfp_hf_bluez5: Initial GDBusClient for BlueZ

2013-01-23 Thread Vinicius Costa Gomes
This patch adds the initial callbacks to track when BlueZ connects so we can register our HFP external profile handler. And tracks the interfaces added or removed. --- plugins/bluez5.h| 3 ++- plugins/hfp_hf_bluez5.c | 51 + 2 files

[PATCH v1 02/10] hfp_hf_bluez5: Add GDBusProxy for Bluetooth devices

2013-01-23 Thread Vinicius Costa Gomes
This patch tracks the GDBusProxy for Bluetooth devices in order to be able to get its properties. --- plugins/bluez5.h| 1 + plugins/hfp_hf_bluez5.c | 23 --- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/plugins/bluez5.h b/plugins/bluez5.h index

  1   2   >