From: Vinicius Costa Gomes <[email protected]>
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 that come from the profile implementation.
---
drivers/hfpmodem/slc.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/hfpmodem/slc.c b/drivers/hfpmodem/slc.c
index 288afdd..e9427a9 100644
--- a/drivers/hfpmodem/slc.c
+++ b/drivers/hfpmodem/slc.c
@@ -316,10 +316,21 @@ static void brsf_cb(gboolean ok, GAtResult *result,
gpointer user_data)
if (info->ag_features & HFP_AG_FEATURE_CODEC_NEGOTIATION &&
info->hf_features & HFP_HF_FEATURE_CODEC_NEGOTIATION) {
+ GString *str = g_string_new("AT+BAC=");
+ int i;
+
+ for (i = 0; i < info->codecs_len; i++) {
+ g_string_append_printf(str, "%d", info->codecs[i]);
+ if (i + 1 < info->codecs_len)
+ str = g_string_append(str, ",");
+ }
slc_establish_data_ref(sed);
- g_at_chat_send(info->chat, "AT+BAC=1", NULL, bac_cb, sed,
+ g_at_chat_send(info->chat, str->str, NULL, bac_cb, sed,
slc_establish_data_unref);
+
+ g_string_free(str, TRUE);
+
return;
}
--
1.7.11.7
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono