include: add HFP features types for HF and AG
Hi Frédéric,
Quoted 4 lines · Frédéric Danis
--- include/types.h | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-)
All four patches in this series have been applied, thanks.
Regards,
-Denis
PATCH v2 1/4 include: add HFP features types for HF and AG
--- include/types.h | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-)
include/types.h +24 -0
@@ -115,6 +115,30 @@ struct ofono_uuid {unsigned char uuid[OFONO_SHA1_UUID_LEN ]; }; +/* HFP AG supported features bitmap. Bluetooth HFP 1.5 spec page 77 */ +enum hfp_ag_feature { +HFP_AG_FEATURE_3WAY =0x1 , +HFP_AG_FEATURE_ECNR =0x2 , +HFP_AG_FEATURE_VOICE_RECOG =0x4 , +HFP_AG_FEATURE_IN_BAND_RING_TONE =0x8 , +HFP_AG_FEATURE_ATTACH_VOICE_TAG =0x10 , +HFP_AG_FEATURE_REJECT_CALL =0x20 , +HFP_AG_FEATURE_ENHANCED_CALL_STATUS =0x40 , +HFP_AG_FEATURE_ENHANCED_CALL_CONTROL =0x80 , +HFP_AG_FEATURE_EXTENDED_RES_CODE =0x100 +}; + +/* HFP HF supported features bitmap. Bluetooth HFP 1.5 spec page 77 */ +enum hfp_hf_feature { +HFP_HF_FEATURE_ECNR =0x1 , +HFP_HF_FEATURE_3WAY =0x2 , +HFP_HF_FEATURE_CLIP =0x4 , +HFP_HF_FEATURE_VOICE_RECOGNITION =0x8 , +HFP_HF_FEATURE_REMOTE_VOLUME_CONTROL =0x10 , +HFP_HF_FEATURE_ENHANCED_CALL_STATUS =0x20 , +HFP_HF_FEATURE_ENHANCED_CALL_CONTROL =0x40 +}; +const char *ofono_uuid_to_str (const struct ofono_uuid *uuid);void ofono_call_init (struct ofono_call *call);
Signature · 1 line
1.7.1
PATCH v2 2/4 hfp_hf: update to use new HFP enums
--- plugins/hfp_hf.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)
plugins/hfp_hf.c +6 -6
@@ -174,7 +174,7 @@ static void cmer_cb(gboolean ok, GAtResult *result, gpointer user_data)return ; } -if (data->ag_features &AG_FEATURE_3WAY ) +if (data->ag_features &HFP_AG_FEATURE_3WAY )g_at_chat_send (data->chat,"AT+CHLD=?" , chld_prefix, chld_cb, modem,NULL );else
@@ -418,11 +418,11 @@ static int hfp_create_modem(const char *device, const char *dev_addr,if (data ==NULL ) goto free; - data->hf_features |=HF_FEATURE_3WAY ; - data->hf_features |=HF_FEATURE_CLIP ; - data->hf_features |=HF_FEATURE_REMOTE_VOLUME_CONTROL ; - data->hf_features |=HF_FEATURE_ENHANCED_CALL_STATUS ; - data->hf_features |=HF_FEATURE_ENHANCED_CALL_CONTROL ; + data->hf_features |=HFP_HF_FEATURE_3WAY ; + data->hf_features |=HFP_HF_FEATURE_CLIP ; + data->hf_features |=HFP_HF_FEATURE_REMOTE_VOLUME_CONTROL ; + data->hf_features |=HFP_HF_FEATURE_ENHANCED_CALL_STATUS ; + data->hf_features |=HFP_HF_FEATURE_ENHANCED_CALL_CONTROL ; data->handsfree_path =g_strdup (device);if (data->handsfree_path ==NULL )
Signature · 1 line
1.7.1
PATCH v2 3/4 hfpmodem: remove previous HFP defines
In reply to Frédéric Danis--- drivers/hfpmodem/hfpmodem.h | 19 ------------------- 1 files changed, 0 insertions(+), 19 deletions(-)
drivers/hfpmodem/hfpmodem.h +0 -19
@@ -22,25 +22,6 @@#include <drivers/atmodem/atutil.h> #include <ofono/dbus.h> -/* AG supported features bitmap. Bluetooth HFP 1.5 spec page 77 */ -#define AG_FEATURE_3WAY 0x1 -#define AG_FEATURE_ECNR 0x2 -#define AG_FEATURE_VOICE_RECOG 0x4 -#define AG_FEATURE_IN_BAND_RING_TONE 0x8 -#define AG_FEATURE_ATTACH_VOICE_TAG 0x10 -#define AG_FEATURE_REJECT_CALL 0x20 -#define AG_FEATURE_ENHANCED_CALL_STATUS 0x40 -#define AG_FEATURE_ENHANCED_CALL_CONTROL 0x80 -#define AG_FEATURE_EXTENDED_RES_CODE 0x100 - -#define HF_FEATURE_ECNR 0x1 -#define HF_FEATURE_3WAY 0x2 -#define HF_FEATURE_CLIP 0x4 -#define HF_FEATURE_VOICE_RECOGNITION 0x8 -#define HF_FEATURE_REMOTE_VOLUME_CONTROL 0x10 -#define HF_FEATURE_ENHANCED_CALL_STATUS 0x20 -#define HF_FEATURE_ENHANCED_CALL_CONTROL 0x40 -#define AG_CHLD_0 0x01#define AG_CHLD_1 0x02#define AG_CHLD_1x 0x04
Signature · 1 line
1.7.1
PATCH v2 4/4 emulator: fix local HFP AG features
In reply to Frédéric Danis--- src/emulator.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
src/emulator.c +5 -2
@@ -882,8 +882,11 @@ struct ofono_emulator *ofono_emulator_create(struct ofono_modem *modem,return NULL ; em->type = type; -/* TODO: Check real local features */ - em->l_features =32 ; + em->l_features |=HFP_AG_FEATURE_3WAY ; + em->l_features |=HFP_AG_FEATURE_REJECT_CALL ; + em->l_features |=HFP_AG_FEATURE_ENHANCED_CALL_STATUS ; + em->l_features |=HFP_AG_FEATURE_ENHANCED_CALL_CONTROL ; + em->l_features |=HFP_AG_FEATURE_EXTENDED_RES_CODE ; em->events_mode =3 ;/* default mode is forwarding events */ em->cmee_mode =0 ;/* CME ERROR disabled by default */
Signature · 1 line
1.7.1