Re: [PATCH 3/5] cdma-atmodem: Add CDMA MO Call Support

2010-12-16 Thread Denis Kenzior
Hi Dara,

On 12/13/2010 02:53 PM, Dara Spieker-Doyle wrote:
 Hi Denis
 
 On Fri, 2010-12-10 at 22:41 +0100, Spieker-Doyle Dara
 (Nokia-MS/SanDiego) wrote:
 Hi Denis

 On Thu, 2010-12-09 at 09:43 +0100, ext Denis Kenzior wrote:


  drivers/cdma-atmodem/atutil.c|   45 +
  drivers/cdma-atmodem/atutil.h|   65 +

 Are these verbatim copies of atmodem/atutil.[ch]?  If so, then there's
 no reason why you can't re-use those.  No need to copy them.

 No, they are not verbatim copies as e.g. error decoding is different.
 Would you prefer we clarify this by renaming the files cdmautil.(ch)?

 On second thoughts, I agree for this patch - I will correct this and
 re-use the drivers/atmodem/atutil.[ch].
 Additionally, for future feature support, I do envisage some delta with
 various AT utilities for CDMA. For example, with our current hardware,
 the AT return string can have a different format from the GSM AT command
 standard. 
 Do you have any particular preference in such cases as to whether we
 modify the e.g. gatchat sources directly to support this or whether we
 create CDMA specific functions within the cdma-atmodem driver?
 

This has to be considered on a case by case basis.  I can't predict what
is the better approach until I see specifics.  Having said that, I
really hope that we do not need to change the gatchat sources directly.
 But if these changes makes sense then I certainly don't see a problem
in doing so.

Regards,
-Denis
___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [PATCH 3/5] cdma-atmodem: Add CDMA MO Call Support

2010-12-13 Thread Dara Spieker-Doyle
Hi Denis

On Fri, 2010-12-10 at 22:41 +0100, Spieker-Doyle Dara
(Nokia-MS/SanDiego) wrote:
 Hi Denis
 
 On Thu, 2010-12-09 at 09:43 +0100, ext Denis Kenzior wrote:
 
  
drivers/cdma-atmodem/atutil.c|   45 +
drivers/cdma-atmodem/atutil.h|   65 +
  
  Are these verbatim copies of atmodem/atutil.[ch]?  If so, then there's
  no reason why you can't re-use those.  No need to copy them.
 
 No, they are not verbatim copies as e.g. error decoding is different.
 Would you prefer we clarify this by renaming the files cdmautil.(ch)?
 
On second thoughts, I agree for this patch - I will correct this and
re-use the drivers/atmodem/atutil.[ch].
Additionally, for future feature support, I do envisage some delta with
various AT utilities for CDMA. For example, with our current hardware,
the AT return string can have a different format from the GSM AT command
standard. 
Do you have any particular preference in such cases as to whether we
modify the e.g. gatchat sources directly to support this or whether we
create CDMA specific functions within the cdma-atmodem driver?

Thank you
Dara


___
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono


Re: [PATCH 3/5] cdma-atmodem: Add CDMA MO Call Support

2010-12-09 Thread Denis Kenzior
Hi Dara,

On 12/02/2010 05:31 PM, Dara Spieker-Doyle wrote:
 ---
  Makefile.am  |7 ++
  configure.ac |5 +
  drivers/cdma-atmodem/atmodem.c   |   47 +
  drivers/cdma-atmodem/atmodem.h   |   26 +

Lets call this cdmamodem/cdmamodem.[ch]

  drivers/cdma-atmodem/atutil.c|   45 +
  drivers/cdma-atmodem/atutil.h|   65 +

Are these verbatim copies of atmodem/atutil.[ch]?  If so, then there's
no reason why you can't re-use those.  No need to copy them.

  drivers/cdma-atmodem/voicecall.c |  195 
 ++
  7 files changed, 390 insertions(+), 0 deletions(-)
  create mode 100644 drivers/cdma-atmodem/atmodem.c
  create mode 100644 drivers/cdma-atmodem/atmodem.h
  create mode 100644 drivers/cdma-atmodem/atutil.c
  create mode 100644 drivers/cdma-atmodem/atutil.h
  create mode 100644 drivers/cdma-atmodem/voicecall.c
 
 diff --git a/Makefile.am b/Makefile.am
 index f111f96..9aac08b 100644
 --- a/Makefile.am
 +++ b/Makefile.am
 @@ -242,6 +242,13 @@ conf_DATA += plugins/phonesim.conf
  endif
  endif
  
 +if CDMA_ATMODEM
 +builtin_modules += cdma_atmodem
 +builtin_sources += drivers/cdma-atmodem/atmodem.c \
 + drivers/cdma-atmodem/atmodem.h \
 + drivers/cdma-atmodem/voicecall.c
 +endif
 +
  builtin_modules += g1
  builtin_sources += plugins/g1.c
  
 diff --git a/configure.ac b/configure.ac
 index 0c1986a..090f3ee 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -158,6 +158,11 @@ AC_ARG_ENABLE(atmodem, 
 AC_HELP_STRING([--disable-atmodem],
   [enable_atmodem=${enableval}])
  AM_CONDITIONAL(ATMODEM, test ${enable_atmodem} != no)
  
 +AC_ARG_ENABLE(cdmaatmodem, AC_HELP_STRING([--disable-cdma-atmodem],
 + [disable CDMA AT modem support]),
 + [enable_cdma_atmodem=${enableval}])
 +AM_CONDITIONAL(CDMA_ATMODEM, test ${enable_cdma_atmodem} != no)
 +
  AC_ARG_ENABLE(phonesim, AC_HELP_STRING([--disable-phonesim],
   [disable Phone simulator support]),
   [enable_phonesim=${enableval}])
 diff --git a/drivers/cdma-atmodem/atmodem.c b/drivers/cdma-atmodem/atmodem.c
 new file mode 100644
 index 000..86dd074
 --- /dev/null
 +++ b/drivers/cdma-atmodem/atmodem.c
 @@ -0,0 +1,47 @@
 +/*
 + *
 + *  oFono - Open Source Telephony
 + *
 + *  Copyright (C) 2010 Nokia Corporation. All rights reserved.
 + *
 + *  This program is free software; you can redistribute it and/or modify
 + *  it under the terms of the GNU General Public License version 2 as
 + *  published by the Free Software Foundation.
 + *
 + *  This program is distributed in the hope that it will be useful,
 + *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + *  GNU General Public License for more details.
 + *
 + *  You should have received a copy of the GNU General Public License
 + *  along with this program; if not, write to the Free Software
 + *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  
 USA
 + *
 + */
 +
 +#ifdef HAVE_CONFIG_H
 +#include config.h
 +#endif
 +
 +#include glib.h
 +
 +#define OFONO_API_SUBJECT_TO_CHANGE
 +#include ofono/plugin.h
 +#include ofono/types.h
 +
 +#include atmodem.h
 +
 +static int cdma_atmodem_init(void)
 +{
 + cdma_at_voicecall_init();
 +
 + return 0;
 +}
 +
 +static void cdma_atmodem_exit(void)
 +{
 + cdma_at_voicecall_exit();
 +}
 +
 +OFONO_PLUGIN_DEFINE(cdma_atmodem, CDMA AT modem driver, VERSION,
 + OFONO_PLUGIN_PRIORITY_DEFAULT, cdma_atmodem_init, cdma_atmodem_exit)
 diff --git a/drivers/cdma-atmodem/atmodem.h b/drivers/cdma-atmodem/atmodem.h
 new file mode 100644
 index 000..32facbc
 --- /dev/null
 +++ b/drivers/cdma-atmodem/atmodem.h
 @@ -0,0 +1,26 @@
 +/*
 + *
 + *  oFono - Open Source Telephony
 + *
 + *  Copyright (C) 2010 Nokia Corporation. All rights reserved.
 + *
 + *  This program is free software; you can redistribute it and/or modify
 + *  it under the terms of the GNU General Public License version 2 as
 + *  published by the Free Software Foundation.
 + *
 + *  This program is distributed in the hope that it will be useful,
 + *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + *  GNU General Public License for more details.
 + *
 + *  You should have received a copy of the GNU General Public License
 + *  along with this program; if not, write to the Free Software
 + *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  
 USA
 + *
 + */
 +
 +extern void cdma_at_voicecall_init();
 +extern void cdma_at_voicecall_exit();
 +
 +extern void cdma_at_devinfo_init();
 +extern void cdma_at_devinfo_exit();
 diff --git a/drivers/cdma-atmodem/atutil.c b/drivers/cdma-atmodem/atutil.c

[PATCH 3/5] cdma-atmodem: Add CDMA MO Call Support

2010-12-02 Thread Dara Spieker-Doyle
---
 Makefile.am  |7 ++
 configure.ac |5 +
 drivers/cdma-atmodem/atmodem.c   |   47 +
 drivers/cdma-atmodem/atmodem.h   |   26 +
 drivers/cdma-atmodem/atutil.c|   45 +
 drivers/cdma-atmodem/atutil.h|   65 +
 drivers/cdma-atmodem/voicecall.c |  195 ++
 7 files changed, 390 insertions(+), 0 deletions(-)
 create mode 100644 drivers/cdma-atmodem/atmodem.c
 create mode 100644 drivers/cdma-atmodem/atmodem.h
 create mode 100644 drivers/cdma-atmodem/atutil.c
 create mode 100644 drivers/cdma-atmodem/atutil.h
 create mode 100644 drivers/cdma-atmodem/voicecall.c

diff --git a/Makefile.am b/Makefile.am
index f111f96..9aac08b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -242,6 +242,13 @@ conf_DATA += plugins/phonesim.conf
 endif
 endif
 
+if CDMA_ATMODEM
+builtin_modules += cdma_atmodem
+builtin_sources += drivers/cdma-atmodem/atmodem.c \
+   drivers/cdma-atmodem/atmodem.h \
+   drivers/cdma-atmodem/voicecall.c
+endif
+
 builtin_modules += g1
 builtin_sources += plugins/g1.c
 
diff --git a/configure.ac b/configure.ac
index 0c1986a..090f3ee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -158,6 +158,11 @@ AC_ARG_ENABLE(atmodem, AC_HELP_STRING([--disable-atmodem],
[enable_atmodem=${enableval}])
 AM_CONDITIONAL(ATMODEM, test ${enable_atmodem} != no)
 
+AC_ARG_ENABLE(cdmaatmodem, AC_HELP_STRING([--disable-cdma-atmodem],
+   [disable CDMA AT modem support]),
+   [enable_cdma_atmodem=${enableval}])
+AM_CONDITIONAL(CDMA_ATMODEM, test ${enable_cdma_atmodem} != no)
+
 AC_ARG_ENABLE(phonesim, AC_HELP_STRING([--disable-phonesim],
[disable Phone simulator support]),
[enable_phonesim=${enableval}])
diff --git a/drivers/cdma-atmodem/atmodem.c b/drivers/cdma-atmodem/atmodem.c
new file mode 100644
index 000..86dd074
--- /dev/null
+++ b/drivers/cdma-atmodem/atmodem.c
@@ -0,0 +1,47 @@
+/*
+ *
+ *  oFono - Open Source Telephony
+ *
+ *  Copyright (C) 2010 Nokia Corporation. All rights reserved.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include config.h
+#endif
+
+#include glib.h
+
+#define OFONO_API_SUBJECT_TO_CHANGE
+#include ofono/plugin.h
+#include ofono/types.h
+
+#include atmodem.h
+
+static int cdma_atmodem_init(void)
+{
+   cdma_at_voicecall_init();
+
+   return 0;
+}
+
+static void cdma_atmodem_exit(void)
+{
+   cdma_at_voicecall_exit();
+}
+
+OFONO_PLUGIN_DEFINE(cdma_atmodem, CDMA AT modem driver, VERSION,
+   OFONO_PLUGIN_PRIORITY_DEFAULT, cdma_atmodem_init, cdma_atmodem_exit)
diff --git a/drivers/cdma-atmodem/atmodem.h b/drivers/cdma-atmodem/atmodem.h
new file mode 100644
index 000..32facbc
--- /dev/null
+++ b/drivers/cdma-atmodem/atmodem.h
@@ -0,0 +1,26 @@
+/*
+ *
+ *  oFono - Open Source Telephony
+ *
+ *  Copyright (C) 2010 Nokia Corporation. All rights reserved.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+extern void cdma_at_voicecall_init();
+extern void cdma_at_voicecall_exit();
+
+extern void cdma_at_devinfo_init();
+extern void cdma_at_devinfo_exit();
diff --git a/drivers/cdma-atmodem/atutil.c b/drivers/cdma-atmodem/atutil.c
new file mode 100644
index 000..b58c1ee
--- /dev/null
+++ b/drivers/cdma-atmodem/atutil.c
@@ -0,0 +1,45 @@
+/*
+ *
+ *  oFono - Open Source Telephony
+ *
+ *  Copyright (C) 2010 Nokia Corporation. All rights reserved.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public