diff options
author | Jarkko Lehtoranta <devel@jlranta.com> | 2012-03-24 16:03:44 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2012-03-24 11:50:34 -0700 |
commit | 8b11ee67d757ba2c2aa5ae9d2ca836ffd6c1bfc2 (patch) | |
tree | dee68c8d64385770b6ae2a5dcd465af4e5e53756 /drivers/huaweimodem | |
parent | 31e1b2e6ce0c5c3d0152661e37150490700c34f8 (diff) | |
download | ofono-8b11ee67d757ba2c2aa5ae9d2ca836ffd6c1bfc2.tar.gz |
huaweimodem: Fix AT^DDSETEX=2 timing for voice calls
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.
Diffstat (limited to 'drivers/huaweimodem')
-rw-r--r-- | drivers/huaweimodem/voicecall.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/huaweimodem/voicecall.c b/drivers/huaweimodem/voicecall.c index 1ea2613a..f55568d3 100644 --- a/drivers/huaweimodem/voicecall.c +++ b/drivers/huaweimodem/voicecall.c @@ -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; } @@ -116,6 +113,7 @@ static void huawei_dial(struct ofono_voicecall *vc, enum ofono_clir_option clir, ofono_voicecall_cb_t cb, void *data) { + struct voicecall_data *vd = ofono_voicecall_get_data(vc); char buf[256]; if (ph->type == 145) @@ -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, |