summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2014-01-27 11:56:44 -0600
committerDenis Kenzior <denkenz@gmail.com>2014-10-20 13:40:28 -0500
commit299ffc962078048651dbe43739e7327c62e9a83b (patch)
treec68db00fa778acf22713d7012daf72a7b033c3d7
parent39f08a5e1ce8f183b6d4322623ba9ee5bdaca30b (diff)
downloadofono-299ffc962078048651dbe43739e7327c62e9a83b.tar.bz2
hfp: Notify core of HF indicators supported by AG
This information was obtained from SLC negotiation
-rw-r--r--drivers/hfpmodem/handsfree.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/hfpmodem/handsfree.c b/drivers/hfpmodem/handsfree.c
index c85aac28..2e47f715 100644
--- a/drivers/hfpmodem/handsfree.c
+++ b/drivers/hfpmodem/handsfree.c
@@ -232,6 +232,7 @@ static int hfp_handsfree_probe(struct ofono_handsfree *hf,
{
struct hfp_slc_info *info = data;
struct hf_data *hd;
+ unsigned int i;
DBG("");
hd = g_new0(struct hf_data, 1);
@@ -245,6 +246,14 @@ static int hfp_handsfree_probe(struct ofono_handsfree *hf,
ofono_handsfree_battchg_notify(hf,
info->cind_val[HFP_INDICATOR_BATTCHG]);
+ ofono_handsfree_set_hf_indicators(hf, info->hf_indicators,
+ info->num_hf_indicators);
+
+ for (i = 0; i < info->num_hf_indicators; i++)
+ ofono_handsfree_hf_indicator_active_notify(hf,
+ info->hf_indicators[i],
+ info->hf_indicator_active_map & (1 << i));
+
hd->register_source = g_idle_add(hfp_handsfree_register, hf);
return 0;