Open Source Telephony
 help / color / mirror / Atom feed
* [PATCH] huawei: fix AT^DDSETEX=2 timing
@ 2012-03-10 16:46 devel
  2012-03-10 16:46 ` devel
  0 siblings, 1 reply; 9+ messages in thread
From: devel @ 2012-03-10 16:46 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 832 bytes --]

From: Jarkko Lehtoranta <devel@jlranta.com>

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.

Best regards,
Jarkko

Jarkko Lehtoranta (1):
  huawei: fix AT^DDSETEX=2 timing

 drivers/huaweimodem/voicecall.c |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

-- 
1.7.9.3


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] huawei: fix AT^DDSETEX=2 timing
  2012-03-10 16:46 [PATCH] huawei: fix AT^DDSETEX=2 timing devel
@ 2012-03-10 16:46 ` devel
  2012-03-23 19:13   ` Marcel Holtmann
  0 siblings, 1 reply; 9+ messages in thread
From: devel @ 2012-03-10 16:46 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1521 bytes --]

From: Jarkko Lehtoranta <devel@jlranta.com>

---
 drivers/huaweimodem/voicecall.c |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/huaweimodem/voicecall.c b/drivers/huaweimodem/voicecall.c
index 1ea2613..3952b95 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;
 }
 
@@ -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,
-- 
1.7.9.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] huawei: fix AT^DDSETEX=2 timing
  2012-03-10 16:46 ` devel
@ 2012-03-23 19:13   ` Marcel Holtmann
  2012-03-24  2:06     ` [PATCH v2] " devel
  0 siblings, 1 reply; 9+ messages in thread
From: Marcel Holtmann @ 2012-03-23 19:13 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 280 bytes --]

Hi Jarkko,

> ---
>  drivers/huaweimodem/voicecall.c |   12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)

can I get a patch where the long explanation summary is actually the
commit message. I want this recorded in the git log.

Regards

Marcel



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2] huawei: fix AT^DDSETEX=2 timing
  2012-03-23 19:13   ` Marcel Holtmann
@ 2012-03-24  2:06     ` devel
  2012-03-24  2:06       ` devel
  0 siblings, 1 reply; 9+ messages in thread
From: devel @ 2012-03-24  2:06 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 296 bytes --]

From: Jarkko Lehtoranta <devel@jlranta.com>

Added a more detailed explanation to git commit, as requested.

Jarkko Lehtoranta (1):
  huawei: fix AT^DDSETEX=2 timing

 drivers/huaweimodem/voicecall.c |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

-- 
1.7.9.3


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2] huawei: fix AT^DDSETEX=2 timing
  2012-03-24  2:06     ` [PATCH v2] " devel
@ 2012-03-24  2:06       ` devel
  2012-03-24  4:14         ` Marcel Holtmann
  0 siblings, 1 reply; 9+ messages in thread
From: devel @ 2012-03-24  2:06 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 2146 bytes --]

From: Jarkko Lehtoranta <devel@jlranta.com>

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.

Signed-off-by: Jarkko Lehtoranta <devel@jlranta.com>
---
 drivers/huaweimodem/voicecall.c |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/huaweimodem/voicecall.c b/drivers/huaweimodem/voicecall.c
index 1ea2613..3952b95 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;
 }
 
@@ -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,
-- 
1.7.9.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] huawei: fix AT^DDSETEX=2 timing
  2012-03-24  2:06       ` devel
@ 2012-03-24  4:14         ` Marcel Holtmann
  2012-03-24 14:03           ` [PATCH v3] " devel
  0 siblings, 1 reply; 9+ messages in thread
From: Marcel Holtmann @ 2012-03-24  4:14 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1858 bytes --]

Hi Jarkko,

> 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.
> 
> Signed-off-by: Jarkko Lehtoranta <devel@jlranta.com>
> ---
>  drivers/huaweimodem/voicecall.c |   12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)

Applying: huawei: fix AT^DDSETEX=2 timing
/data/devel/ofono/.git/rebase-apply/patch:31: trailing whitespace.
	
/data/devel/ofono/.git/rebase-apply/patch:40: trailing whitespace.
	
/data/devel/ofono/.git/rebase-apply/patch:42: trailing whitespace.
	
fatal: 3 lines add whitespace errors.

> diff --git a/drivers/huaweimodem/voicecall.c b/drivers/huaweimodem/voicecall.c
> index 1ea2613..3952b95 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;
>  }
>  
> @@ -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);

Put this struct declaration first please.

Regards

Marcel



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v3] huawei: fix AT^DDSETEX=2 timing
  2012-03-24  4:14         ` Marcel Holtmann
@ 2012-03-24 14:03           ` devel
  2012-03-24 14:03             ` devel
  0 siblings, 1 reply; 9+ messages in thread
From: devel @ 2012-03-24 14:03 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 322 bytes --]

From: Jarkko Lehtoranta <devel@jlranta.com>

Removed whitespaces and changed the variable declaration order.

Best regards,
Jarkko

Jarkko Lehtoranta (1):
  huawei: fix AT^DDSETEX=2 timing

 drivers/huaweimodem/voicecall.c |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

-- 
1.7.9.3


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v3] huawei: fix AT^DDSETEX=2 timing
  2012-03-24 14:03           ` [PATCH v3] " devel
@ 2012-03-24 14:03             ` devel
  2012-03-24 18:51               ` Marcel Holtmann
  0 siblings, 1 reply; 9+ messages in thread
From: devel @ 2012-03-24 14:03 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 2124 bytes --]

From: Jarkko Lehtoranta <devel@jlranta.com>

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.

Signed-off-by: Jarkko Lehtoranta <devel@jlranta.com>
---
 drivers/huaweimodem/voicecall.c |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/huaweimodem/voicecall.c b/drivers/huaweimodem/voicecall.c
index 1ea2613..f55568d 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,
-- 
1.7.9.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v3] huawei: fix AT^DDSETEX=2 timing
  2012-03-24 14:03             ` devel
@ 2012-03-24 18:51               ` Marcel Holtmann
  0 siblings, 0 replies; 9+ messages in thread
From: Marcel Holtmann @ 2012-03-24 18:51 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 912 bytes --]

Hi Jarkko,

> 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.
> 
> Signed-off-by: Jarkko Lehtoranta <devel@jlranta.com>

I forgot one thing, we do not do Signed-off-by lines. I fixed this for
you.

> ---
>  drivers/huaweimodem/voicecall.c |   12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)

Patch has been applied.

Regards

Marcel



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-03-24 18:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-10 16:46 [PATCH] huawei: fix AT^DDSETEX=2 timing devel
2012-03-10 16:46 ` devel
2012-03-23 19:13   ` Marcel Holtmann
2012-03-24  2:06     ` [PATCH v2] " devel
2012-03-24  2:06       ` devel
2012-03-24  4:14         ` Marcel Holtmann
2012-03-24 14:03           ` [PATCH v3] " devel
2012-03-24 14:03             ` devel
2012-03-24 18:51               ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox