summaryrefslogtreecommitdiffstats
path: root/audio/headset.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-11-27 18:38:03 +0200
committerJohan Hedberg <johan.hedberg@nokia.com>2008-11-27 18:38:03 +0200
commita04f48420ffc2c1a33e743d5075f24809161b2fd (patch)
tree14f017095e84aeb5f01189cc09de2f7df731cec2 /audio/headset.c
parent7fa0fd3049a4034fc347d7035d56ca1682a24856 (diff)
Implement support for AT+NREC
This patch adds support for the AT+NREC command which can be used for disabling noice reduction and echo canceling features on the AG side.
Diffstat (limited to 'audio/headset.c')
-rw-r--r--audio/headset.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/audio/headset.c b/audio/headset.c
index be07e424..c21c208d 100644
--- a/audio/headset.c
+++ b/audio/headset.c
@@ -1007,6 +1007,11 @@ int telephony_call_hold_rsp(void *telephony_device, cme_error_t err)
return telephony_generic_rsp(telephony_device, err);
}
+int telephony_disable_nr_and_ec_rsp(void *telephony_device, cme_error_t err)
+{
+ return telephony_generic_rsp(telephony_device, err);
+}
+
int telephony_operator_selection_ind(int mode, const char *oper)
{
if (!active_devices)
@@ -1037,6 +1042,16 @@ static int operator_selection(struct audio_device *device, const char *buf)
return 0;
}
+static int disable_nr_and_ec(struct audio_device *device, const char *buf)
+{
+ if (strlen(buf) < 9)
+ return -EINVAL;
+
+ telephony_disable_nr_and_ec_req(device);
+
+ return 0;
+}
+
static struct event event_callbacks[] = {
{ "ATA", answer_call },
{ "ATD", dial_number },
@@ -1056,6 +1071,7 @@ static struct event event_callbacks[] = {
{ "AT+CMEE", extended_errors },
{ "AT+CCWA", call_waiting_notify },
{ "AT+COPS", operator_selection },
+ { "AT+NREC", disable_nr_and_ec },
{ 0 }
};