All of lore.kernel.org
 help / color / mirror / Atom feed
* GSM patches for Sierra modem
@ 2013-06-20  0:11 TengChou Yang
  2013-06-21 16:03 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: TengChou Yang @ 2013-06-20  0:11 UTC (permalink / raw)
  To: ofono

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

Hi all,
I had made some patches, Which can support Voicecall manager, for Sierra
modem. Please see attached file.

Sincerely,
TengChou Yang

[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 230 bytes --]

[-- Attachment #3: 0001-Enable-sierra-modem-s-voicecall-manager-and-setup-di.patch --]
[-- Type: application/octet-stream, Size: 2055 bytes --]

From 3abe22520f1b994d1f0b4c18a7f75349f8e6529d Mon Sep 17 00:00:00 2001
From: TengChou Yang <tyang@cercacor.com>
Date: Mon, 6 May 2013 17:55:59 -0700
Subject: [PATCH 1/4] Enable sierra modem's voicecall manager and setup
 different node

ofono will destory the sierra at modem's driver due to node function
comparison. net node had been set to "02" (the second node) so that
it won't be a null pointer and cause "setup_sierra" to return false.
for the voicecall manager just simply call ofono_voicecall_create
in sierra_set_online. vender id: OFONO_VENDOR_QUALCOMM_MSM is neened
for our sierra modem. It is because of the AT+COLP command will make
ATD# command work in different way.

Signed-off-by: TengChou Yang
---
 plugins/sierra.c |    6 ++++--
 plugins/udevng.c |    2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/plugins/sierra.c b/plugins/sierra.c
index a458e38..7995e75 100644
--- a/plugins/sierra.c
+++ b/plugins/sierra.c
@@ -39,6 +39,7 @@
 #include <ofono/gprs.h>
 #include <ofono/gprs-context.h>
 #include <ofono/phonebook.h>
+#include <ofono/voicecall.h>
 #include <ofono/log.h>
 
 #include <drivers/atmodem/atutil.h>
@@ -203,9 +204,10 @@ static void sierra_set_online(struct ofono_modem *modem, ofono_bool_t online,
 	DBG("modem %p %s", modem, online ? "online" : "offline");
 
 	if (g_at_chat_send(data->modem, command, none_prefix,
-					set_online_cb, cbd, g_free) > 0)
+					set_online_cb, cbd, g_free) > 0) {
+		ofono_voicecall_create(modem, OFONO_VENDOR_QUALCOMM_MSM, "atmodem", data->modem);
 		return;
-
+	}
 	CALLBACK_WITH_FAILURE(cb, cbd->data);
 
 	g_free(cbd);
diff --git a/plugins/udevng.c b/plugins/udevng.c
index afb02ca..ea93e1f 100644
--- a/plugins/udevng.c
+++ b/plugins/udevng.c
@@ -235,7 +235,7 @@ static gboolean setup_sierra(struct modem_info *modem)
 				mdm = info->devnode;
 			else if (g_strcmp0(info->number, "04") == 0)
 				app = info->devnode;
-			else if (g_strcmp0(info->number, "07") == 0)
+			else if (g_strcmp0(info->number, "02") == 0)
 				net = info->devnode;
 		}
 	}
-- 
1.7.9.5


[-- Attachment #4: 0002-drivers-atmodem-voicecall-Create-another-path-for-si.patch --]
[-- Type: application/octet-stream, Size: 2424 bytes --]

From 8818c2c15ecbc23e46e037ffcbcf6a1b0bb7a6dd Mon Sep 17 00:00:00 2001
From: TengChou Yang <tyang@cercacor.com>
Date: Mon, 3 Jun 2013 09:57:20 -0700
Subject: [PATCH 2/4] drivers: atmodem: voicecall: Create another path for
 sierra

Since Sierra has some modem dependent behavior and at commends we
Use OFONO_VENDOR_QUALCOMM_MSM instead of using OFONO_VENDOR_QUALCOMM_MSM.
Create a vender path in atmodem\voicecall to avoid CME ERROR. It
seems to be safe to ignore CME ERROR: 100 in sierra modem.

Signed-off-by: TengChou Yang<tyang@cercacor.com>
---
 drivers/atmodem/voicecall.c |    5 ++++-
 plugins/sierra.c            |    2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/atmodem/voicecall.c b/drivers/atmodem/voicecall.c
index e27eb47..bd33ee4 100644
--- a/drivers/atmodem/voicecall.c
+++ b/drivers/atmodem/voicecall.c
@@ -155,7 +155,8 @@ static void clcc_poll_cb(gboolean ok, GAtResult *result, gpointer user_data)
 		 * with a CME ERROR: 100.  It seems to be safe to ignore
 		 * it and continue polling anyway
 		 */
-		if (vd->vendor == OFONO_VENDOR_QUALCOMM_MSM &&
+		if ( (vd->vendor == OFONO_VENDOR_QUALCOMM_MSM ||
+				vd->vendor == OFONO_VENDOR_SIERRA) &&
 				error.type == OFONO_ERROR_TYPE_CME &&
 				error.error == 100) {
 			poll_again = TRUE;
@@ -177,6 +178,7 @@ static void clcc_poll_cb(gboolean ok, GAtResult *result, gpointer user_data)
 		oc = o ? o->data : NULL;
 
 		switch (vd->vendor) {
+		case OFONO_VENDOR_SIERRA:
 		case OFONO_VENDOR_QUALCOMM_MSM:
 			poll_again = TRUE;
 			break;
@@ -1120,6 +1122,7 @@ static int at_voicecall_probe(struct ofono_voicecall *vc, unsigned int vendor,
 	g_at_chat_send(vd->chat, "AT+CNAP=1", NULL, NULL, NULL, NULL);
 
 	switch (vd->vendor) {
+	case OFONO_VENDOR_SIERRA:
 	case OFONO_VENDOR_QUALCOMM_MSM:
 		g_at_chat_send(vd->chat, "AT+COLP=0", NULL, NULL, NULL, NULL);
 		break;
diff --git a/plugins/sierra.c b/plugins/sierra.c
index 7995e75..0e752e4 100644
--- a/plugins/sierra.c
+++ b/plugins/sierra.c
@@ -205,7 +205,7 @@ static void sierra_set_online(struct ofono_modem *modem, ofono_bool_t online,
 
 	if (g_at_chat_send(data->modem, command, none_prefix,
 					set_online_cb, cbd, g_free) > 0) {
-		ofono_voicecall_create(modem, OFONO_VENDOR_QUALCOMM_MSM, "atmodem", data->modem);
+		ofono_voicecall_create(modem, OFONO_VENDOR_SIERRA, "atmodem", data->modem);
 		return;
 	}
 	CALLBACK_WITH_FAILURE(cb, cbd->data);
-- 
1.7.9.5


[-- Attachment #5: 0003-driver-atmodem-network-registration.patch --]
[-- Type: application/octet-stream, Size: 1719 bytes --]

From 14b4b273b58b6861799e243bba2200a100cdae3d Mon Sep 17 00:00:00 2001
From: TengChou Yang <tyang@cercacor.com>
Date: Mon, 17 Jun 2013 17:18:31 -0700
Subject: [PATCH 3/4] driver: atmodem: network-registration

Although sierra support AT+CIND it will influence voicecall ATD
command. After "AT+CIND?" command ATD command will have different
behavior. ATD won't return 'OK' immediately, it will block until
someone picked up. The only way to hangup is sending a randon
ASCII charactor. This kind of behavior will cause voicecall manager
dial function to break. AT+CSQ is the right choice for sierra modem.

Signed-off-by: TengChou Yang<tyang@cercacor.com>
---
 drivers/atmodem/network-registration.c |    1 +
 plugins/sierra.c                       |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/atmodem/network-registration.c b/drivers/atmodem/network-registration.c
index 24b71a3..2451cb7 100644
--- a/drivers/atmodem/network-registration.c
+++ b/drivers/atmodem/network-registration.c
@@ -1753,6 +1753,7 @@ static void at_creg_set_cb(gboolean ok, GAtResult *result, gpointer user_data)
 	}
 
 	switch (nd->vendor) {
+	case OFONO_VENDOR_SIERRA:
 	case OFONO_VENDOR_PHONESIM:
 		g_at_chat_register(nd->chat, "+CSQ:",
 					csq_notify, FALSE, netreg, NULL);
diff --git a/plugins/sierra.c b/plugins/sierra.c
index 0e752e4..e4c68f5 100644
--- a/plugins/sierra.c
+++ b/plugins/sierra.c
@@ -251,7 +251,7 @@ static void sierra_post_online(struct ofono_modem *modem)
 
 	DBG("%p", modem);
 
-	ofono_netreg_create(modem, 0, "atmodem", data->modem);
+	ofono_netreg_create(modem, OFONO_VENDOR_SIERRA, "atmodem", data->modem);
 }
 
 static struct ofono_modem_driver sierra_driver = {
-- 
1.7.9.5


[-- Attachment #6: 0004-drivers-atmodem-voicecall-select-external-pcm-interf.patch --]
[-- Type: application/octet-stream, Size: 1178 bytes --]

From 73ff1aec4c6a507174e7fbcfe8fa9d493cd79b0d Mon Sep 17 00:00:00 2001
From: TengChou Yang <tyang@cercacor.com>
Date: Tue, 4 Jun 2013 17:19:02 -0700
Subject: [PATCH 4/4] drivers: atmodem: voicecall: select external pcm
 interface for audio

MC8795V use analog audio interface as default setting. AT!AVSETPROFILE=
7,0,0,0,7 turned on primary external PCM with 2MHz clock, unmute mic,
earpiece, selected audio type to voice, volume level 7.

Signed-off-by: TengChou Yang <tyang@cercacor.com>
---
 drivers/atmodem/voicecall.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/atmodem/voicecall.c b/drivers/atmodem/voicecall.c
index bd33ee4..a8a690c 100644
--- a/drivers/atmodem/voicecall.c
+++ b/drivers/atmodem/voicecall.c
@@ -1120,6 +1120,7 @@ static int at_voicecall_probe(struct ofono_voicecall *vc, unsigned int vendor,
 	g_at_chat_send(vd->chat, "AT+CLIP=1", NULL, NULL, NULL, NULL);
 	g_at_chat_send(vd->chat, "AT+CDIP=1", NULL, NULL, NULL, NULL);
 	g_at_chat_send(vd->chat, "AT+CNAP=1", NULL, NULL, NULL, NULL);
+	g_at_chat_send(vd->chat, "AT!AVSETPROFILE=7,0,0,0,7", NULL, NULL, NULL, NULL);
 
 	switch (vd->vendor) {
 	case OFONO_VENDOR_SIERRA:
-- 
1.7.9.5


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

* Re: GSM patches for Sierra modem
  2013-06-20  0:11 GSM patches for Sierra modem TengChou Yang
@ 2013-06-21 16:03 ` Denis Kenzior
  0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2013-06-21 16:03 UTC (permalink / raw)
  To: ofono

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

Hi,

On 06/19/2013 07:11 PM, TengChou Yang wrote:
> Hi all,
> I had made some patches, Which can support Voicecall manager, for Sierra
> modem. Please see attached file.

Please use git send-email to submit your patches.  Patches sent via 
attachment will not be reviewed.

Regards,
-Denis


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

end of thread, other threads:[~2013-06-21 16:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-20  0:11 GSM patches for Sierra modem TengChou Yang
2013-06-21 16:03 ` Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.