Skip to contentSkip to conversation

Huawei voice output port issue + patch

PATCH New Jarkko Lehtoranta 2 participants 3 messages Mar 9, 2012 – Mar 10, 2012

lore
Share & tools
lore
#0 lore raw

Hi,

Voice output serial port is enabled on some Huawei models (e.g. E169) without problems, but for example on E173u-2 it is never enabled during an incoming call. There might also be other Huawei models having the same issue.

I traced the issue down to "^DDSETEX" AT command, which is used to notify the device to start streaming audio. It seems that Ofono sends this command too early on incoming calls. The command should always be sent *after* the dial "D" or answer "A" command. The patch fixes this behavior and afterwards voice will also work on E173u-2.

Patch: https://bugs.meego.com/attachment.cgi?id=9702

-Jarkko

#1 lore raw

Hi Jarkko,

Quoted 5 lines

Voice output serial port is enabled on some Huawei models (e.g. E169) without problems, but for example on E173u-2 it is never enabled during an incoming call. There might also be other Huawei models having the same issue.

Quoted 8 lines

I traced the issue down to "^DDSETEX" AT command, which is used to notify the device to start streaming audio. It seems that Ofono sends this command too early on incoming calls. The command should always be sent *after* the dial "D" or answer "A" command. The patch fixes this behavior and afterwards voice will also work on E173u-2.

Patch: https://bugs.meego.com/attachment.cgi?id=9702

inline patches please. I am not digging patches out of Bugzilla.

Regards

Marcel

#2 lore raw

PATCH 1/1 huawei: fix AT^DDSETEX=2 timing

Quoted 7 lines · Marcel Holtmann

Hi Jarkko,

inline patches please. I am not digging patches out of Bugzilla.

Regards

Marcel

Here you go, patch for the Huawei voice output port issue.

Quoted 1 line

From db13dd1dcdadefc9325fd159aebef10ac4b388c6 Mon Sep 17 00:00:00 2001

From: Jarkko Lehtoranta <[email protected]>
Date: Fri, 9 Mar 2012 19:51:29 +0200
Subject: [PATCH] huawei: fix AT^DDSETEX=2 timing

---
 drivers/huaweimodem/voicecall.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
drivers/huaweimodem/voicecall.c +9 -3
index 1ea2613..3952b95 100644
@@ -78,9 +78,6 @@ static struct ofono_call *create_call(struct ofono_voicecall *vc, int type,
 
 	d->calls = g_slist_insert_sorted(d->calls, call, at_util_call_compare);
 
-	g_at_chat_send(d->chat, "AT^DDSETEX=2", none_prefix,
-						NULL, NULL, NULL);
-
 	return call;
 }
 
@@ -117,6 +114,7 @@ static void huawei_dial(struct ofono_voicecall *vc,
 				ofono_voicecall_cb_t cb, void *data)
 {
 	char buf[256];
+	struct voicecall_data *vd = ofono_voicecall_get_data(vc);
 
 	if (ph->type == 145)
 		snprintf(buf, sizeof(buf), "ATD+%s", ph->number);
@@ -137,12 +135,20 @@ static void huawei_dial(struct ofono_voicecall *vc,
 	strcat(buf, ";");
 
 	huawei_template(vc, buf, cb, data);
+	
+	g_at_chat_send(vd->chat, "AT^DDSETEX=2", none_prefix,
+						NULL, NULL, NULL);
 }
 
 static void huawei_answer(struct ofono_voicecall *vc,
 				ofono_voicecall_cb_t cb, void *data)
 {
+	struct voicecall_data *vd = ofono_voicecall_get_data(vc);
+	
 	huawei_template(vc, "ATA", cb, data);
+	
+	g_at_chat_send(vd->chat, "AT^DDSETEX=2", none_prefix,
+						NULL, NULL, NULL);
 }
 
 static void huawei_hangup(struct ofono_voicecall *vc,
Signature · 1 line
1.7.1