summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-09-03 17:07:27 +0300
committerJohan Hedberg <johan.hedberg@nokia.com>2008-09-03 17:07:27 +0300
commit40c0305b1f780a2c969f0491bd0dd1276910bc3e (patch)
treefab37c9f7369874aed32247c2568f28b3c31c19d
parent2bda864bfb74be61f189d4c0855cf1cd6cd51327 (diff)
Remove HFP AG features from audio.conf since they should come from the telephony plugin
-rw-r--r--audio/audio.conf12
-rw-r--r--audio/headset.c92
-rw-r--r--audio/telephony.h10
3 files changed, 10 insertions, 104 deletions
diff --git a/audio/audio.conf b/audio/audio.conf
index 7f760ea6..f50c826d 100644
--- a/audio/audio.conf
+++ b/audio/audio.conf
@@ -23,18 +23,6 @@
# Defaults to false
HFP=false
-# HFP Gateway features
-# Defaults to false
-3WayCalling=false
-EchoCancelNoiseCancel=false
-VoiceRecognition=false
-InBandRingtone=false
-VoiceTags=false
-RejectingCalls=false
-EnhancedCallStatus=false
-EnhancedCallControl=false
-ExtendedErrorResultCodes=false
-
# Just an example of potential config options for the other interfaces
#[A2DP]
#SBCSources=1
diff --git a/audio/headset.c b/audio/headset.c
index 7edb0d30..bf4d64cd 100644
--- a/audio/headset.c
+++ b/audio/headset.c
@@ -67,16 +67,6 @@
#define HEADSET_GAIN_SPEAKER 'S'
#define HEADSET_GAIN_MICROPHONE 'M'
-#define AG_FEATURE_THREE_WAY_CALLING 0x0001
-#define AG_FEATURE_EC_ANDOR_NR 0x0002
-#define AG_FEATURE_VOICE_RECOGNITION 0x0004
-#define AG_FEATURE_INBAND_RINGTONE 0x0008
-#define AG_FEATURE_ATTACH_NUMBER_TO_VOICETAG 0x0010
-#define AG_FEATURE_REJECT_A_CALL 0x0020
-#define AG_FEATURE_ENHANCES_CALL_STATUS 0x0040
-#define AG_FEATURE_ENHANCES_CALL_CONTROL 0x0080
-#define AG_FEATURE_EXTENDED_ERROR_RESULT_CODES 0x0100
-
static uint32_t ag_features = 0;
static gboolean sco_hci = TRUE;
@@ -1614,7 +1604,6 @@ register_iface:
uint32_t headset_config_init(GKeyFile *config)
{
GError *err = NULL;
- gboolean value;
char *str;
/* Use the default values if there is no config file */
@@ -1637,87 +1626,6 @@ uint32_t headset_config_init(GKeyFile *config)
g_free(str);
}
- value = g_key_file_get_boolean(config, "Headset", "3WayCalling",
- &err);
- if (err) {
- debug("audio.conf: %s", err->message);
- g_error_free(err);
- err = NULL;
- } else if (value)
- ag_features |= AG_FEATURE_THREE_WAY_CALLING;
-
- value = g_key_file_get_boolean(config, "Headset", "EchoCancelNoiseCancel",
- &err);
- if (err) {
- debug("audio.conf: %s", err->message);
- g_error_free(err);
- err = NULL;
- } else if (value)
- ag_features |= AG_FEATURE_EC_ANDOR_NR;
-
- value = g_key_file_get_boolean(config, "Headset", "VoiceRecognition",
- &err);
- if (err) {
- debug("audio.conf: %s", err->message);
- g_error_free(err);
- err = NULL;
- } else if (value)
- ag_features |= AG_FEATURE_VOICE_RECOGNITION;
-
- value = g_key_file_get_boolean(config, "Headset", "InBandRingtone",
- &err);
- if (err) {
- debug("audio.conf: %s", err->message);
- g_error_free(err);
- err = NULL;
- } else if (value)
- ag_features |= AG_FEATURE_INBAND_RINGTONE;
-
- value = g_key_file_get_boolean(config, "Headset", "VoiceTags",
- &err);
- if (err) {
- debug("audio.conf: %s", err->message);
- g_error_free(err);
- err = NULL;
- } else if (value)
- ag_features |= AG_FEATURE_ATTACH_NUMBER_TO_VOICETAG;
-
- value = g_key_file_get_boolean(config, "Headset", "RejectingCalls",
- &err);
- if (err) {
- debug("audio.conf: %s", err->message);
- g_error_free(err);
- err = NULL;
- } else if (value)
- ag_features |= AG_FEATURE_REJECT_A_CALL;
-
- value = g_key_file_get_boolean(config, "Headset", "EnhancedCallStatus",
- &err);
- if (err) {
- debug("audio.conf: %s", err->message);
- g_error_free(err);
- err = NULL;
- } else if (value)
- ag_features |= AG_FEATURE_ENHANCES_CALL_STATUS;
-
- value = g_key_file_get_boolean(config, "Headset", "EnhancedCallControl",
- &err);
- if (err) {
- debug("audio.conf: %s", err->message);
- g_error_free(err);
- err = NULL;
- } else if (value)
- ag_features |= AG_FEATURE_ENHANCES_CALL_CONTROL;
-
- value = g_key_file_get_boolean(config, "Headset",
- "ExtendedErrorResultCodes", &err);
- if (err) {
- debug("audio.conf: %s", err->message);
- g_error_free(err);
- err = NULL;
- } else if (value)
- ag_features |= AG_FEATURE_EXTENDED_ERROR_RESULT_CODES;
-
return ag_features;
}
diff --git a/audio/telephony.h b/audio/telephony.h
index 2fca71ab..6c40d8e3 100644
--- a/audio/telephony.h
+++ b/audio/telephony.h
@@ -24,6 +24,16 @@
#include <stdint.h>
+#define AG_FEATURE_THREE_WAY_CALLING 0x0001
+#define AG_FEATURE_EC_ANDOR_NR 0x0002
+#define AG_FEATURE_VOICE_RECOGNITION 0x0004
+#define AG_FEATURE_INBAND_RINGTONE 0x0008
+#define AG_FEATURE_ATTACH_NUMBER_TO_VOICETAG 0x0010
+#define AG_FEATURE_REJECT_A_CALL 0x0020
+#define AG_FEATURE_ENHANCES_CALL_STATUS 0x0040
+#define AG_FEATURE_ENHANCES_CALL_CONTROL 0x0080
+#define AG_FEATURE_EXTENDED_ERROR_RESULT_CODES 0x0100
+
struct indicator {
const char *desc;
const char *range;