From f05a78a450af23a598f90ac9c4895503853e85b5 Mon Sep 17 00:00:00 2001 From: Mikel Astiz Date: Wed, 12 Oct 2011 14:35:26 +0200 Subject: hfpmodem: Set initial state for inband ringing According to the HFP specification, inband ringing will be enabled by default if the AG supports it. This setting could later be changed by the unsolicited result code +BSIR. --- drivers/hfpmodem/handsfree.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers') diff --git a/drivers/hfpmodem/handsfree.c b/drivers/hfpmodem/handsfree.c index d3b5b44c..6eb3fd85 100644 --- a/drivers/hfpmodem/handsfree.c +++ b/drivers/hfpmodem/handsfree.c @@ -44,14 +44,19 @@ struct hf_data { GAtChat *chat; + unsigned int ag_features; }; static gboolean hfp_handsfree_register(gpointer user_data) { struct ofono_handsfree *hf = user_data; + struct hf_data *hd = ofono_handsfree_get_data(hf); ofono_handsfree_register(hf); + if (hd->ag_features & HFP_AG_FEATURE_IN_BAND_RING_TONE) + ofono_handsfree_set_inband_ringing(hf, TRUE); + return FALSE; } @@ -64,6 +69,7 @@ static int hfp_handsfree_probe(struct ofono_handsfree *hf, DBG(""); hd = g_new0(struct hf_data, 1); hd->chat = g_at_chat_clone(info->chat); + hd->ag_features = info->ag_features; ofono_handsfree_set_data(hf, hd); -- cgit v1.2.3