Send commitlog mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:

   1. r2814 - in
      trunk/src/target/OM-2007.2/applications/openmoko-dialer2: . src
      ([EMAIL PROTECTED])
   2. r2815 - in
      trunk/src/target/OM-2007.2/applications/openmoko-today2: .        src
      ([EMAIL PROTECTED])
   3. r2816 - trunk/src/target/u-boot/patches
      ([EMAIL PROTECTED])
   4. r2817 - in
      trunk/src/target/OM-2007.2/applications/openmoko-dialer2: . src
      ([EMAIL PROTECTED])
   5. r2818 - in
      trunk/src/target/OM-2007.2/applications/openmoko-dialer2: . src
      ([EMAIL PROTECTED])
   6. r2819 - in
      trunk/src/target/OM-2007.2/applications/openmoko-dialer2: . src
      ([EMAIL PROTECTED])
   7. r2820 - in
      trunk/src/target/OM-2007.2/applications/openmoko-dialer2: . src
      ([EMAIL PROTECTED])
--- Begin Message ---
Author: njp
Date: 2007-08-23 16:51:59 +0200 (Thu, 23 Aug 2007)
New Revision: 2814

Modified:
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/configure.ac
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/dialer-main.c
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
Log:
2007-08-23  Neil J. Patel  <[EMAIL PROTECTED]>

        * configure.ac:
        * src/dialer-main.c: (main):
        * src/moko-notify.c: (play_timeout), (on_sound_finished),
        (moko_notify_start_ringtone), (moko_notify_stop_ringtone),
        (moko_notify_start), (moko_notify_stop), (moko_notify_init):
        Switch ringtone backend to a simple PulseAudio set-up, as the gstreamer
        backend was causing lock-ups and messed up the timing of functions.

Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog  
2007-08-23 14:38:27 UTC (rev 2813)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog  
2007-08-23 14:51:59 UTC (rev 2814)
@@ -1,3 +1,13 @@
+2007-08-23  Neil J. Patel  <[EMAIL PROTECTED]>
+
+       * configure.ac:
+       * src/dialer-main.c: (main):
+       * src/moko-notify.c: (play_timeout), (on_sound_finished),
+       (moko_notify_start_ringtone), (moko_notify_stop_ringtone),
+       (moko_notify_start), (moko_notify_stop), (moko_notify_init):
+       Switch ringtone backend to a simple PulseAudio set-up, as the gstreamer
+       backend was causing lock-ups and messed up the timing of functions.
+
 2007-08-22  Neil J. Patel  <[EMAIL PROTECTED]>
 
        * src/moko-dialer.c: (on_keypad_dial_clicked):

Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/configure.ac
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/configure.ac       
2007-08-23 14:38:27 UTC (rev 2813)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/configure.ac       
2007-08-23 14:51:59 UTC (rev 2814)
@@ -18,7 +18,7 @@
                   libmokojournal2
                   libmokogsmd2 
                   libmokoui2
-                  gstreamer-0.10)
+                  libpulse)
 
 old_cflags=$CFLAGS
 CFLAGS=$DIALER_CFLAGS

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/dialer-main.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/dialer-main.c  
2007-08-23 14:38:27 UTC (rev 2813)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/dialer-main.c  
2007-08-23 14:51:59 UTC (rev 2814)
@@ -16,7 +16,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <gtk/gtk.h>
-#include <gst/gst.h>
 #include <dbus/dbus-glib.h>
 #include <dbus/dbus-glib-bindings.h>
 
@@ -133,7 +132,6 @@
 
   /* Initialize Threading & GTK+ */
   gtk_init (&argc, &argv);
-  gst_init (&argc, &argv);
   moko_stock_register ();
 
   /* Try and setup our DBus service */

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c  
2007-08-23 14:38:27 UTC (rev 2813)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c  
2007-08-23 14:51:59 UTC (rev 2814)
@@ -29,7 +29,7 @@
 
 #include "moko-notify.h"
 
-#include <gst/gst.h>
+#include <pulse/pulseaudio.h>
 
 G_DEFINE_TYPE (MokoNotify, moko_notify, G_TYPE_OBJECT)
 
@@ -44,7 +44,8 @@
 {
   gboolean    started;
 
-  GstElement *bin;
+  /* Sound stuff */
+  pa_context *pac;
 };
 /*
 enum
@@ -56,8 +57,8 @@
 
 static guint notify_signals[LAST_SIGNAL] = {0, };
 */
+static void moko_notify_start_ringtone (MokoNotify *notify);
 
-
 /*
  * Check the current screen brightness, raise it if necessary 
  */
@@ -101,68 +102,46 @@
   close (fd);
 }
 
+static gboolean
+play_timeout (MokoNotify *notify)
+{
+  moko_notify_start_ringtone (notify);
+  return FALSE;
+}
+
 static void
-on_bus_eos (GstBus *bus, GstMessage *message, MokoNotify *notify)
+on_sound_finished (pa_context *pa, gint success, MokoNotify *notify)
 {
   MokoNotifyPrivate *priv;
   
   g_return_if_fail (MOKO_IS_NOTIFY (notify));
-  g_return_if_fail (GST_IS_ELEMENT (notify->priv->bin));
   priv = notify->priv;
 
-  g_print (".");
-  /* Rewind and play again */
-  gst_element_set_state (priv->bin, GST_STATE_PAUSED);
+  if (!priv->pac)
+    return;
+  
+  if (priv->started)
+    g_timeout_add (1000, (GSourceFunc)play_timeout, (gpointer)notify);
+}
 
-  /* Seek to 0 */
-  if (!gst_element_seek_simple (priv->bin, GST_FORMAT_TIME, 0, 0))
-    g_error ("Seek error\n");
-  return ;
-
-  gst_element_set_state (priv->bin, GST_STATE_PLAYING);
- 
-  g_print ("Audio finished\n");
- }
-
 static void
 moko_notify_start_ringtone (MokoNotify *notify)
 {
   MokoNotifyPrivate *priv;
-  GstElement *bin;
-  gchar *pipeline;
-  GError *err = NULL;
-
+  
   g_return_if_fail (MOKO_IS_NOTIFY (notify));
   priv = notify->priv;
-  
-  /* Create the pipeline */
-  pipeline = g_strdup_printf (
-    "filesrc location=%s ! decodebin ! audioconvert !audioresample ! alsasink",
-    PKGDATADIR DEFAULT_RINGTONE);
-  g_print ("%s\n", PKGDATADIR DEFAULT_RINGTONE);
-  
-  /* Try and gstreamer to parse it */
-  bin = gst_parse_launch (pipeline, &err);
-  if (err)
-  {
-    g_error ("err->message");
-    priv->bin = NULL;
-    g_free (pipeline);
+
+  if (!priv->pac)
     return;
-  }
-  priv->bin = bin;
 
-  g_signal_connect (gst_element_get_bus (bin), "message::eos",
-                    G_CALLBACK (on_bus_eos), (gpointer)notify);
+  pa_context_play_sample (priv->pac,
+                          "x11-bell",
+                          NULL,
+                          PA_VOLUME_NORM,
+                          (gpointer)on_sound_finished,
+                          (gpointer)notify);
 
-  /* Connect to eos signal to repeat the ringtone 
-  gst_bus_add_watch (gst_element_get_bus (bin), 
-                     (GstBusFunc)on_bus_message, (gpointer)notify);
-  */
-  /* Start playing */
-  gst_element_set_state (bin, GST_STATE_PLAYING);
-
-  g_free (pipeline);
 }
 
 static void
@@ -172,11 +151,6 @@
 
   g_return_if_fail (MOKO_IS_NOTIFY (notify));
   priv = notify->priv;
-
-  if  (GST_IS_ELEMENT (priv->bin))
-  {
-    gst_element_set_state (priv->bin, GST_STATE_NULL);
-  }
 }
 
 static void
@@ -258,7 +232,7 @@
 
   moko_notify_check_brightness ();
   moko_notify_start_vibrate ();
-  //moko_notify_start_ringtone (notify);
+  moko_notify_start_ringtone (notify);
 }
 
 /* Stop the ringtone and the vibration alert */
@@ -275,7 +249,7 @@
   priv->started = FALSE;
  
   moko_notify_stop_vibrate ();
-  //moko_notify_stop_ringtone (notify);
+  moko_notify_stop_ringtone (notify);
 }
 
 /* GObject functions */
@@ -306,10 +280,30 @@
 moko_notify_init (MokoNotify *notify)
 {
   MokoNotifyPrivate *priv;
+  pa_threaded_mainloop *mainloop = NULL;
+  pa_mainloop_api *mapi = NULL;
   
   priv = notify->priv = MOKO_NOTIFY_GET_PRIVATE (notify);
 
   priv->started = FALSE;
+  priv->pac = NULL;
+
+  /* Start up pulse audio */
+  mainloop = pa_threaded_mainloop_new ();
+  if (!mainloop)
+  {
+    g_warning ("Unable to create PulseAudio mainloop.");
+    return;
+  }
+  mapi = pa_threaded_mainloop_get_api (mainloop);
+  priv->pac = pa_context_new (mapi, "Openmoko Dialer");
+  if (!priv->pac)
+  {
+    g_warning ("Could create the PulseAudio context");
+    return;
+  }
+  pa_context_connect (priv->pac, NULL, 0, NULL);
+  pa_threaded_mainloop_start (mainloop);
 }
 
 MokoNotify*
@@ -321,3 +315,4 @@
 
   return notify;
 }
+




--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2007-08-23 17:07:44 +0200 (Thu, 23 Aug 2007)
New Revision: 2815

Modified:
   trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog
   trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-main.c
Log:
2007-08-23  Thomas Wood  <[EMAIL PROTECTED]>

        * src/today-main.c: (main): Don't force theme settings


Modified: trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog   
2007-08-23 14:51:59 UTC (rev 2814)
+++ trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog   
2007-08-23 15:07:44 UTC (rev 2815)
@@ -1,3 +1,7 @@
+2007-08-23  Thomas Wood  <[EMAIL PROTECTED]>
+
+       * src/today-main.c: (main): Don't force theme settings
+
 2007-08-23  Chris Lord,,,  <[EMAIL PROTECTED]>
 
        * src/today-launcher.c: (load_desktop_cb), (load_data_dir):

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-main.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-main.c    
2007-08-23 14:51:59 UTC (rev 2814)
+++ trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-main.c    
2007-08-23 15:07:44 UTC (rev 2815)
@@ -186,7 +186,7 @@
        g_signal_connect (G_OBJECT (data.window), "delete-event",
                G_CALLBACK (gtk_main_quit), NULL);
 
-#if 1
+#if 0
        /* Force theme settings */
        g_object_set (gtk_settings_get_default (),
                "gtk-theme-name", "openmoko-standard-2", 




--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-08-23 17:08:50 +0200 (Thu, 23 Aug 2007)
New Revision: 2816

Modified:
   trunk/src/target/u-boot/patches/uboot-gta02.patch
Log:
* add basic GTA02v2 support (GPIO init, ...)


Modified: trunk/src/target/u-boot/patches/uboot-gta02.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-gta02.patch   2007-08-23 15:07:44 UTC 
(rev 2815)
+++ trunk/src/target/u-boot/patches/uboot-gta02.patch   2007-08-23 15:08:50 UTC 
(rev 2816)
@@ -4,7 +4,7 @@
 ===================================================================
 --- u-boot.orig/Makefile
 +++ u-boot/Makefile
-@@ -2178,6 +2178,10 @@
+@@ -2178,6 +2178,13 @@
  sbc2410x_config: unconfig
        @$(MKCONFIG) $(@:_config=) arm arm920t sbc2410x NULL s3c24x0
  
@@ -12,6 +12,9 @@
 +gta02v1_config :      unconfig
 +      @sh board/neo1973/gta02/split_by_variant.sh $@
 +
++gta02v2_config :      unconfig
++      @sh board/neo1973/gta02/split_by_variant.sh $@
++
  gta01_config \
  gta01v3_config \
  gta01bv2_config \
@@ -88,7 +91,7 @@
 ===================================================================
 --- /dev/null
 +++ u-boot/board/neo1973/gta02/gta02.c
-@@ -0,0 +1,326 @@
+@@ -0,0 +1,356 @@
 +/*
 + * (C) 2006-2007 by OpenMoko, Inc.
 + * Author: Harald Welte <[EMAIL PROTECTED]>
@@ -205,6 +208,32 @@
 +      gpio->GPHUP = 0x000007FF;
 +
 +      gpio->GPJCON = 0x1545541;
++#elif defined(CONFIG_ARCH_GTA02_v2)
++      gpio->GPACON = 0x007E1FFF;
++      gpio->GPADAT |= (1 << 16);      /* Set GPA16 to high (nNAND_WP) */
++
++      gpio->GPBCON = 0x001555AA;
++      //gpio->GPBUP = 0x000007FF;
++
++      gpio->GPCCON = 0x55415155;
++      //gpio->GPCUP = 0x0000FFFF;
++
++      gpio->GPDCON = 0x55555555;
++      //gpio->GPDUP = 0x0000FFFF;
++
++      gpio->GPECON = 0xAAAAAAAA;
++      //gpio->GPEUP = 0x0000FFFF;
++
++      gpio->GPFCON = 0x0000AAAA;
++      //gpio->GPFUP = 0x000000FF;
++
++      gpio->GPGCON = 0x0156FE7A;
++      //gpio->GPGUP = 0x0000FFFF;
++
++      gpio->GPHCON = 0x001AAAAA;
++      //gpio->GPHUP = 0x000007FF;
++
++      gpio->GPJCON = 0x1551544;
 +#else
 +#error Please define GTA02 version
 +#endif
@@ -332,6 +361,8 @@
 +{
 +#if defined(CONFIG_ARCH_GTA02_v1)
 +      return 0x00000310;
++#elif defined(CONFIG_ARCH_GTA02_v2)
++      return 0x00000320;
 +#endif
 +}
 +
@@ -361,7 +392,8 @@
 +              gpio->GPGDAT |= (1 << 11);      /* GPG11 */
 +#elif defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3)
 +              gpio->GPBDAT |= (1 << 10);      /* GPB10 */
-+#elif defined(CONFIG_ARCH_GTA01B_v4) || defined(CONFIG_ARCH_GTA02_v1)
++#elif defined(CONFIG_ARCH_GTA01B_v4) || defined(CONFIG_ARCH_GTA02_v1) || \
++      defined(CONFIG_ARCH_GTA02_v2)
 +              gpio->GPBDAT |= (1 << 3);       /* GPB3 */
 +#endif
 +      else
@@ -369,7 +401,8 @@
 +              gpio->GPGDAT &= ~(1 << 11);     /* GPG11 */
 +#elif defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3)
 +              gpio->GPBDAT &= ~(1 << 10);     /* GPB10 */
-+#elif defined(CONFIG_ARCH_GTA01B_v4) || defined(CONFIG_ARCH_GTA02_v1)
++#elif defined(CONFIG_ARCH_GTA01B_v4) || defined(CONFIG_ARCH_GTA02_v1) || \
++      defined(CONFIG_ARCH_GTA02_v2)
 +              gpio->GPBDAT &= ~(1 << 3);      /* GPB3 */
 +#endif
 +}
@@ -482,7 +515,7 @@
 ===================================================================
 --- /dev/null
 +++ u-boot/include/configs/neo1973_gta02.h
-@@ -0,0 +1,272 @@
+@@ -0,0 +1,274 @@
 +/*
 + * (C) Copyright 2007 OpenMoko, Inc.
 + * Author: Harald Welte <[EMAIL PROTECTED]>
@@ -608,6 +641,8 @@
 +#define       CFG_LONGHELP                            /* undef to save memory 
        */
 +#if defined(CONFIG_ARCH_GTA02_v1)
 +#define       CFG_PROMPT              "GTA02v1 # "    /* Monitor Command 
Prompt       */
++#elif defined(CONFIG_ARCH_GTA02_v2)
++#define       CFG_PROMPT              "GTA02v2 # "    /* Monitor Command 
Prompt       */
 +#endif
 +#define       CFG_CBSIZE              256             /* Console I/O Buffer 
Size      */
 +#define       CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer 
Size */
@@ -734,7 +769,7 @@
 +#define CFG_VIDEO_LOGO_MAX_SIZE       (640*480+1024+100) /* 100 = slack */
 +#define CONFIG_VIDEO_BMP_GZIP
 +#define CONFIG_VGA_AS_SINGLE_DEVICE
-+#define CONFIG_UNZIP
++#define CONFIG_CMD_UNZIP
 +
 +#define VIDEO_KBD_INIT_FCT    0
 +#define VIDEO_TSTC_FCT                serial_tstc
@@ -759,7 +794,7 @@
 ===================================================================
 --- /dev/null
 +++ u-boot/board/neo1973/gta02/split_by_variant.sh
-@@ -0,0 +1,37 @@
+@@ -0,0 +1,42 @@
 +#!/bin/sh
 +# ---------------------------------------------------------
 +#  Set the core module defines according to Core Module
@@ -784,6 +819,11 @@
 +      echo "CONFIG_USB_DFU_REVISION=0x0310" > $CFGTMP
 +      ;;
 +
++      gta02v2_config)
++      echo "#define CONFIG_ARCH_GTA02_v2" > $CFGINC
++      echo "CONFIG_USB_DFU_REVISION=0x0320" > $CFGTMP
++      ;;
++
 +      *)
 +      echo "$0:: Unrecognised config - using GTA02v1 config"
 +      echo "#define CONFIG_ARCH_GTA02_v1" > $CFGINC
@@ -1260,21 +1300,22 @@
  #define B1_Tah                        0x0     /*  0clk */
  #define B1_Tacp                       0x0
  #define B1_PMC                        0x0
-@@ -112,7 +112,7 @@
+@@ -112,7 +112,8 @@
  #if defined (CONFIG_ARCH_GTA01_v3) || defined(CONFIG_ARCH_GTA01_v4)
  #define B6_SCAN                       0x1     /* 9bit */
  #elif defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) || \
 -      defined(CONFIG_ARCH_GTA01B_v4)
-+      defined(CONFIG_ARCH_GTA01B_v4) || defined(CONFIG_ARCH_GTA02_v1)
++      defined(CONFIG_ARCH_GTA01B_v4) || defined(CONFIG_ARCH_GTA02_v1) || \
++      defined(CONFIG_ARCH_GTA02_v2)
  #define B6_SCAN                       0x2     /* 10bit */
  #endif
  
-@@ -165,6 +165,18 @@
+@@ -165,6 +166,27 @@
        str     r1, [r0]
  #endif
  
 +#if defined(CONFIG_ARCH_GTA02_v1)
-+      /* enable KEEPACT to make sure PMU keeps us alive */
++      /* enable KEEPACT(GPJ3) to make sure PMU keeps us alive */
 +      ldr     r0, =0x56000000 /* GPJ base */
 +      ldr     r1, [r0, #0xd0] /* GPJCON */
 +      orr     r1, r1, #(1 << 6)
@@ -1283,8 +1324,17 @@
 +      ldr     r1, [r0, #0xd4] /* GPJDAT */
 +      orr     r1, r1, #(1 << 3)
 +      str     r1, [r0, #0xd4]
++#elif defined(CONFIG_ARCH_GTA02_v2)
++      /* enable KEEPACT(GPJ8) to make sure PMU keeps us alive */
++      ldr     r0, =0x56000000 /* GPJ base */
++      ldr     r1, [r0, #0xd0] /* GPJCON */
++      orr     r1, r1, #(1 << 16)
++      str     r1, [r0, #0xd0]
++
++      ldr     r1, [r0, #0xd4] /* GPJDAT */
++      orr     r1, r1, #(1 << 8)
++      str     r1, [r0, #0xd4]
 +#endif
-+
        /* everything is fine now */
        mov     pc, lr
  
@@ -1678,7 +1728,7 @@
  #if defined(CONFIG_ARCH_GTA01_v4) || defined(CONFIG_ARCH_GTA01B_v2) || \
 -    defined(CONFIG_ARCH_GTA01B_v3) || defined(CONFIG_ARCH_GTA01B_v4)
 +    defined(CONFIG_ARCH_GTA01B_v3) || defined(CONFIG_ARCH_GTA01B_v4) || \
-+    defined(CONFIG_ARCH_GTA02_v1)
++    defined(CONFIG_ARCH_GTA02_v1) || defined(CONFIG_ARCH_GTA02_v2)
                if (param)
                        gpio->GPBDAT |= (1 << 9);
                else
@@ -1686,7 +1736,7 @@
      defined(CONFIG_ARCH_GTA01B_v2) || defined(CONFIG_ARCH_GTA01B_v3) || \
      defined(CONFIG_ARCH_GTA01B_v4)
                pcf50606_charge_autofast(param);
-+#elif defined(CONFIG_ARCH_GTA02_v1)
++#elif defined(CONFIG_ARCH_GTA02_v1) || defined(CONFIG_ARCH_GTA02_v2)
 +              if (param)
 +                      pcf50633_usb_maxcurrent(500);
 +              else




--- End Message ---
--- Begin Message ---
Author: njp
Date: 2007-08-23 17:10:35 +0200 (Thu, 23 Aug 2007)
New Revision: 2817

Modified:
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
Log:
2007-08-23  Neil J. Patel  <[EMAIL PROTECTED]>

        * src/moko-notify.c: (on_sound_finished),
        (moko_notify_start_ringtone):
        Add some printf's. Change the sample name to one we know is working.

Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog  
2007-08-23 15:08:50 UTC (rev 2816)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog  
2007-08-23 15:10:35 UTC (rev 2817)
@@ -1,5 +1,11 @@
 2007-08-23  Neil J. Patel  <[EMAIL PROTECTED]>
 
+       * src/moko-notify.c: (on_sound_finished),
+       (moko_notify_start_ringtone):
+       Add some printf's. Change the sample name to one we know is working.
+
+2007-08-23  Neil J. Patel  <[EMAIL PROTECTED]>
+
        * configure.ac:
        * src/dialer-main.c: (main):
        * src/moko-notify.c: (play_timeout), (on_sound_finished),

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c  
2007-08-23 15:08:50 UTC (rev 2816)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c  
2007-08-23 15:10:35 UTC (rev 2817)
@@ -119,7 +119,8 @@
 
   if (!priv->pac)
     return;
-  
+  g_print ("Tone finished");
+ 
   if (priv->started)
     g_timeout_add (1000, (GSourceFunc)play_timeout, (gpointer)notify);
 }
@@ -134,9 +135,10 @@
 
   if (!priv->pac)
     return;
-
+  
+  g_print ("Playing tone");
   pa_context_play_sample (priv->pac,
-                          "x11-bell",
+                          "touchscreen",
                           NULL,
                           PA_VOLUME_NORM,
                           (gpointer)on_sound_finished,




--- End Message ---
--- Begin Message ---
Author: njp
Date: 2007-08-23 17:40:44 +0200 (Thu, 23 Aug 2007)
New Revision: 2818

Modified:
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
Log:
2007-08-23  Neil J. Patel  <[EMAIL PROTECTED]>

        * src/moko-notify.c: (on_sound_finished),
        (moko_notify_start_ringtone):
        Remove debugging printf's as everything works!

Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog  
2007-08-23 15:10:35 UTC (rev 2817)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog  
2007-08-23 15:40:44 UTC (rev 2818)
@@ -2,6 +2,12 @@
 
        * src/moko-notify.c: (on_sound_finished),
        (moko_notify_start_ringtone):
+       Remove debugging printf's as everything works!
+
+2007-08-23  Neil J. Patel  <[EMAIL PROTECTED]>
+
+       * src/moko-notify.c: (on_sound_finished),
+       (moko_notify_start_ringtone):
        Add some printf's. Change the sample name to one we know is working.
 
 2007-08-23  Neil J. Patel  <[EMAIL PROTECTED]>

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c  
2007-08-23 15:10:35 UTC (rev 2817)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c  
2007-08-23 15:40:44 UTC (rev 2818)
@@ -119,10 +119,9 @@
 
   if (!priv->pac)
     return;
-  g_print ("Tone finished");
- 
+  
   if (priv->started)
-    g_timeout_add (1000, (GSourceFunc)play_timeout, (gpointer)notify);
+    g_timeout_add (1500, (GSourceFunc)play_timeout, (gpointer)notify);
 }
 
 static void
@@ -135,10 +134,9 @@
 
   if (!priv->pac)
     return;
-  
-  g_print ("Playing tone");
+
   pa_context_play_sample (priv->pac,
-                          "touchscreen",
+                          "x11-bell",
                           NULL,
                           PA_VOLUME_NORM,
                           (gpointer)on_sound_finished,




--- End Message ---
--- Begin Message ---
Author: njp
Date: 2007-08-23 17:50:14 +0200 (Thu, 23 Aug 2007)
New Revision: 2819

Modified:
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer.c
Log:
2007-08-23  Neil J. Patel  <[EMAIL PROTECTED]>

        * src/moko-dialer.c: (on_talking_accept_call), (on_incoming_call):
        Make sure we don't do anything on an incmong call if we have already
        accepted it.

Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog  
2007-08-23 15:40:44 UTC (rev 2818)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog  
2007-08-23 15:50:14 UTC (rev 2819)
@@ -1,5 +1,11 @@
 2007-08-23  Neil J. Patel  <[EMAIL PROTECTED]>
 
+       * src/moko-dialer.c: (on_talking_accept_call), (on_incoming_call):
+       Make sure we don't do anything on an incmong call if we have already
+       accepted it.
+
+2007-08-23  Neil J. Patel  <[EMAIL PROTECTED]>
+
        * src/moko-notify.c: (on_sound_finished),
        (moko_notify_start_ringtone):
        Remove debugging printf's as everything works!

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer.c  
2007-08-23 15:40:44 UTC (rev 2818)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer.c  
2007-08-23 15:50:14 UTC (rev 2819)
@@ -318,7 +318,6 @@
     return;
 
   moko_gsmd_connection_voice_accept (priv->connection);
-  
   priv->status = DIALER_STATUS_TALKING;
 
   /* Stop the notification */
@@ -465,7 +464,8 @@
   priv = dialer->priv;
 
   /* We sometimes get the signals multiple times */
-  if (priv->status == DIALER_STATUS_INCOMING)
+  if (priv->status == DIALER_STATUS_INCOMING  
+        || priv->status == DIALER_STATUS_TALKING)
   {
     /*g_print ("We are already showing the incoming page\n");*/
     return;




--- End Message ---
--- Begin Message ---
Author: njp
Date: 2007-08-23 18:30:55 +0200 (Thu, 23 Aug 2007)
New Revision: 2820

Modified:
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
Log:
2007-08-23  Neil J. Patel  <[EMAIL PROTECTED]>

        * src/moko-notify.c: (play), (play_timeout),
        (moko_notify_start_ringtone), (moko_notify_stop_ringtone):
        Some ringtone fixes, so there is a gap between playback.

Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog  
2007-08-23 15:50:14 UTC (rev 2819)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog  
2007-08-23 16:30:55 UTC (rev 2820)
@@ -1,5 +1,11 @@
 2007-08-23  Neil J. Patel  <[EMAIL PROTECTED]>
 
+       * src/moko-notify.c: (play), (play_timeout),
+       (moko_notify_start_ringtone), (moko_notify_stop_ringtone):
+       Some ringtone fixes, so there is a gap between playback.
+
+2007-08-23  Neil J. Patel  <[EMAIL PROTECTED]>
+
        * src/moko-dialer.c: (on_talking_accept_call), (on_incoming_call):
        Make sure we don't do anything on an incmong call if we have already
        accepted it.

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c  
2007-08-23 15:50:14 UTC (rev 2819)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c  
2007-08-23 16:30:55 UTC (rev 2820)
@@ -46,6 +46,7 @@
 
   /* Sound stuff */
   pa_context *pac;
+  pa_operation *operation;
 };
 /*
 enum
@@ -103,25 +104,33 @@
 }
 
 static gboolean
-play_timeout (MokoNotify *notify)
+play (MokoNotify *notify)
 {
   moko_notify_start_ringtone (notify);
   return FALSE;
 }
 
-static void
-on_sound_finished (pa_context *pa, gint success, MokoNotify *notify)
+static gboolean
+play_timeout (MokoNotify *notify)
 {
   MokoNotifyPrivate *priv;
   
-  g_return_if_fail (MOKO_IS_NOTIFY (notify));
+  g_return_val_if_fail (MOKO_IS_NOTIFY (notify), FALSE);
   priv = notify->priv;
 
   if (!priv->pac)
-    return;
-  
-  if (priv->started)
-    g_timeout_add (1500, (GSourceFunc)play_timeout, (gpointer)notify);
+    return FALSE;
+
+  if (!priv->operation)
+    return FALSE;
+
+  if (pa_operation_get_state (priv->operation) == PA_OPERATION_DONE)
+  {
+    g_timeout_add (1500, (GSourceFunc)play, (gpointer)notify);
+    return FALSE;
+  }
+
+  return TRUE;  
 }
 
 static void
@@ -135,13 +144,13 @@
   if (!priv->pac)
     return;
 
-  pa_context_play_sample (priv->pac,
-                          "x11-bell",
-                          NULL,
-                          PA_VOLUME_NORM,
-                          (gpointer)on_sound_finished,
-                          (gpointer)notify);
-
+  priv->operation = pa_context_play_sample (priv->pac,
+                                            "x11-bell",
+                                            NULL,
+                                            PA_VOLUME_NORM,
+                                            NULL, 
+                                            NULL);
+  g_timeout_add (500, (GSourceFunc)play_timeout, (gpointer)notify);
 }
 
 static void
@@ -151,6 +160,11 @@
 
   g_return_if_fail (MOKO_IS_NOTIFY (notify));
   priv = notify->priv;
+
+  if (priv->operation)
+    pa_operation_cancel (priv->operation);
+
+  priv->operation = NULL;
 }
 
 static void




--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to