[meego-commits] 8730: Changes to MeeGo:1.1:IVI/hfdialer

Jimmy Huang no_reply at build.meego.com
Fri Oct 22 01:05:51 UTC 2010


Hi,
I have made the following changes to hfdialer in project MeeGo:1.1:IVI. Please review and accept ASAP.

Thank You,
Jimmy Huang

[This message was auto-generated]

---

Request #8730:

  submit:   home:jhuang:branches:MeeGo:1.1:IVI/hfdialer(r2)(cleanup) -> MeeGo:1.1:IVI/hfdialer


Message:
    Added patch to fix BMC#8650, #8651

State:   new          2010-10-21T18:05:50 jhuang
Comment: None



changes files:
--------------
--- hfdialer.changes
+++ hfdialer.changes
@@ -0,0 +1,5 @@
+* Wed Oct 20 2010 Jimmy Huang <jimmy.huang at intel.com> - 0.1.14
+- Added patch for the following fixes:
+- Fixed BMC#8650 - Dialer crashes when ending a call after pulseaudio is terminated
+- Fixed BMC#8651 - module-loopback not unloadded when ending a call after bt chip is down
+
@@ -3,3 +8,3 @@
-- Fixed #BMC7430 - Mute/Unmute button doesn't function
-- Fixed #BMC8226 - Hold/Swap button doesn't function
-- Fixed #BMC8227 - Merge button doesn't function
+- Fixed BMC#7430 - Mute/Unmute button doesn't function
+- Fixed BMC#8226 - Hold/Swap button doesn't function
+- Fixed BMC#8227 - Merge button doesn't function

new:
----
  0003-fix-dialer-not-handling-bluetooth-pulseaudio-errors.patch

spec files:
-----------
--- hfdialer.spec
+++ hfdialer.spec
@@ -16,6 +16,7 @@
 Source100:  hfdialer.yaml
 Patch0:     0001-temporarily-fix-for-reconnecting-modem.patch
 Patch1:     0002-fix-mute-holdswap-and-merge-buttons-not-functioning.patch
+Patch2:     0003-fix-dialer-not-handling-bluetooth-pulseaudio-errors.patch
 Requires:   ofono
 Requires:   voicecallhistory
 Requires:   hfdialer-branding
@@ -28,6 +29,7 @@
 BuildRequires:  pkgconfig(libpulse-mainloop-glib)
 BuildRequires:  libseaside-devel >= 0.0.31
 BuildRequires:  meegotouchcp-bluetooth-libmeegobluetooth-devel
+BuildRequires:  qt-mobility-devel
 BuildRequires:  desktop-file-utils
 Provides:   hfdialer
 
@@ -44,6 +46,8 @@
 %patch0 -p1
 # 0002-fix-mute-holdswap-and-merge-buttons-not-functioning.patch
 %patch1 -p1
+# 0003-fix-dialer-not-handling-bluetooth-pulseaudio-errors.patch
+%patch2 -p1
 # >> setup
 # << setup
 

other changes:
--------------

++++++ 0003-fix-dialer-not-handling-bluetooth-pulseaudio-errors.patch (new)
--- 0003-fix-dialer-not-handling-bluetooth-pulseaudio-errors.patch
+++ 0003-fix-dialer-not-handling-bluetooth-pulseaudio-errors.patch
+diff -Naur hfdialer-0.1.14/src/callmanager.cpp hfdialer-0.1.14-new/src/callmanager.cpp
+--- hfdialer-0.1.14/src/callmanager.cpp	2010-10-05 13:58:44.000000000 -0700
++++ hfdialer-0.1.14-new/src/callmanager.cpp	2010-10-20 18:58:45.809482186 -0700
+@@ -47,6 +47,23 @@
+ {
+     TRACE
+     // FIXME: Do something here!!!
++#ifdef IVI_HFP
++    qDebug() << QString("Destroying VoiceCallManager");
++    qDebug() << QString("Purging all CallItems");
++    foreach (CallItem *item, m_callItems) {
++        disconnect(item, SIGNAL(stateChanged()));
++        delete item;
++    }
++    m_callItems.clear();
++    if(m_audioRouted)
++    {
++        qDebug() << QString("Unroute microphone and speakers");
++        unrouteAudio();
++        m_btSourceReady = false;
++        m_btSinkReady = false;
++    }
++    emit disconnected();
++#endif
+ }
+ 
+ bool CallManager::isValid()
+@@ -382,6 +399,7 @@
+             else
+             {
+                 PAControl* paControl = PAControl::instance();
++                connect(paControl, SIGNAL(paFailed()), this, SLOT(paFailed()));
+                 //connect(paControl, SIGNAL(moduleAdded(PAModule*)), this, SLOT(moduleAdded(PAModule*)));
+                 if(paControl->findBluezSource() != NULL && paControl->findBluezSink() != NULL)
+                 {
+@@ -505,6 +523,21 @@
+     calls   = qdbus_cast<QList<QDBusObjectPath> >(props["Calls"]);
+     mpcalls = qdbus_cast<QList<QDBusObjectPath> >(props["MultipartyCalls"]);
+ 
++#ifdef IVI_HFP
++    // Emit the connected() signal before calling setCalls, so it can trigger
++    // the other objects to reconnect the slots for callsChanged() Signal
++
++    // Indicate for this instance, that we've actually performed at least
++    // one round trip call to this VoiceCallManager and we are in sync with it
++    // First sucessfull GetProperties == connected
++    if (!m_connected) {
++        m_connected = true;
++        emit connected();
++    }
++
++    setCalls(calls);
++    setMultipartyCalls(mpcalls);
++#else
+     setCalls(calls);
+     setMultipartyCalls(mpcalls);
+ 
+@@ -515,6 +548,7 @@
+         m_connected = true;
+         emit connected();
+     }
++#endif
+ }
+ 
+ void CallManager::dialFinished(QDBusPendingCallWatcher *watcher)
+@@ -774,6 +808,13 @@
+     }
+ }
+ 
++void CallManager::paFailed()
++{
++    qCritical() << "Pulseaudio failed or restarted";
++    PAControl* paControl = PAControl::instance();
++    paControl->reconnect();
++}
++
+ void CallManager::routeAudio()
+ {
+     PADevice* source;
+diff -Naur hfdialer-0.1.14/src/callmanager.h hfdialer-0.1.14-new/src/callmanager.h
+--- hfdialer-0.1.14/src/callmanager.h	2010-10-01 14:26:26.000000000 -0700
++++ hfdialer-0.1.14-new/src/callmanager.h	2010-10-20 15:23:47.264035852 -0700
+@@ -112,6 +112,7 @@
+     void sourceAdded(PADevice* device);
+     void sinkAdded(PADevice* device);
+     void moduleAdded(PAModule* module);
++    void paFailed();
+     void routeAudio();
+     void unrouteAudio();
+ #endif
+diff -Naur hfdialer-0.1.14/src/dialerkeypad.cpp hfdialer-0.1.14-new/src/dialerkeypad.cpp
+--- hfdialer-0.1.14/src/dialerkeypad.cpp	2010-10-06 12:24:17.000000000 -0700
++++ hfdialer-0.1.14-new/src/dialerkeypad.cpp	2010-10-20 15:24:08.602507583 -0700
+@@ -764,7 +764,8 @@
+     if (!cm || !cm->isValid()) {
+         qDebug() << "Unable to dial, no valid connection";
+ #ifdef IVI_HFP
+-        emit cm_invalid();
++        if(checked)
++            emit cm_invalid();
+ #endif
+         return;
+     }
+diff -Naur hfdialer-0.1.14/src/dialerpage.cpp hfdialer-0.1.14-new/src/dialerpage.cpp
+--- hfdialer-0.1.14/src/dialerpage.cpp	2010-10-05 10:57:48.000000000 -0700
++++ hfdialer-0.1.14-new/src/dialerpage.cpp	2010-10-20 15:24:38.701995921 -0700
+@@ -193,14 +193,19 @@
+ }
+ 
+ #ifdef IVI_HFP
+-void DialerPage::updateCallManager()
++void DialerPage::callManagerConnected()
+ {
+     CallManager *cm = ManagerProxy::instance()->callManager();
+ 
+     if (cm && cm->isValid())
+         connect(cm, SIGNAL(callsChanged()), this, SLOT(updateCalls()));
+-    else
+-        qCritical("DialerPage: CallManager not ready yet!");
++}
++
++void DialerPage::callManagerDisconnected()
++{
++    //disconnect(this, SIGNAL(callsChanged()));
++    mainWindow()->keypad()->setTarget(m_entry);
++    mainWindow()->keypad()->appear();
+ }
+ #endif
+ 
+diff -Naur hfdialer-0.1.14/src/dialerpage.h hfdialer-0.1.14-new/src/dialerpage.h
+--- hfdialer-0.1.14/src/dialerpage.h	2010-09-29 16:25:59.000000000 -0700
++++ hfdialer-0.1.14-new/src/dialerpage.h	2010-10-20 15:24:44.470664220 -0700
+@@ -29,7 +29,8 @@
+ 
+ #ifdef IVI_HFP
+ public Q_SLOTS:
+-    void updateCallManager();
++    void callManagerConnected();
++    void callManagerDisconnected();
+ #endif
+ 
+ private Q_SLOTS:
+diff -Naur hfdialer-0.1.14/src/mainwindow.cpp hfdialer-0.1.14-new/src/mainwindow.cpp
+--- hfdialer-0.1.14/src/mainwindow.cpp	2010-10-06 12:21:23.000000000 -0700
++++ hfdialer-0.1.14-new/src/mainwindow.cpp	2010-10-20 19:00:16.105419987 -0700
+@@ -413,8 +413,11 @@
+ {
+     TRACE
+     qDebug() << QString("CallManager disconnected");
+-    //% "Handsfree disonnected - CallManager disconnected"
+-    this->displayBannerMessage(qtTrId("xx_handsfree_connected_callmanager_disconnected"));
++
++    /* since the keypad has state tied to the callmanager, destroy the keypad */
++    disconnect(keypad(), SIGNAL(callsChanged()));
++    delete m_keypad;
++    m_keypad = NULL;
+ }
+ 
+ void MainWindow::connectCallManager()
+@@ -459,7 +462,10 @@
+ 
+         DialerPage* page = dynamic_cast<DialerPage*>(m_pages.at(GenericPage::PAGE_DIALER));
+         connect(mp->callManager(), SIGNAL(connected()), page,
+-                                            SLOT(updateCallManager()));
++                                            SLOT(callManagerConnected()));
++
++        connect(mp->callManager(), SIGNAL(disconnected()), page,
++                                            SLOT(callManagerDisconnected()));
+         m_tries--;
+     }
+     else
+diff -Naur hfdialer-0.1.14/src/pacontrol.cpp hfdialer-0.1.14-new/src/pacontrol.cpp
+--- hfdialer-0.1.14/src/pacontrol.cpp	2010-10-06 12:15:00.000000000 -0700
++++ hfdialer-0.1.14-new/src/pacontrol.cpp	2010-10-20 19:00:43.028473543 -0700
+@@ -16,6 +16,8 @@
+ 
+ // Define our pulse audio loop and connection variables
+ static PAControl* paControl = new PAControl;
++// Create a mainloop API and connection to the default server
++static pa_glib_mainloop *pa_ml = NULL;
+ 
+ static void pa_subscribed_events_cb(pa_context *c, enum pa_subscription_event_type t, uint32_t , void *);
+ 
+@@ -99,64 +101,69 @@
+ 
+ static void pa_state_cb(pa_context *c, void *) {
+ 
+-	pa_context_state_t state = pa_context_get_state(c);
+-	if( state == PA_CONTEXT_READY)
+-	{
+-		paControl->setState(true);
+-		pa_context_set_subscribe_callback(c, pa_subscribed_events_cb, NULL);
+-		pa_operation *o;
+-		if (!(o = pa_context_subscribe(c, (pa_subscription_mask_t)
++    pa_context_state_t state = pa_context_get_state(c);
++    if(state == PA_CONTEXT_READY)
++    {
++        paControl->setState(true);
(372 more lines skipped)

++++++ hfdialer.yaml
--- hfdialer.yaml
+++ hfdialer.yaml
@@ -8,8 +8,9 @@
 Sources:
     - "%{name}-%{version}.tar.gz"
 Patches:
-    - 0001-temporarily-fix-for-reconnecting-modem.patch
-    - 0002-fix-mute-holdswap-and-merge-buttons-not-functioning.patch
+    - "0001-temporarily-fix-for-reconnecting-modem.patch"
+    - "0002-fix-mute-holdswap-and-merge-buttons-not-functioning.patch"
+    - "0003-fix-dialer-not-handling-bluetooth-pulseaudio-errors.patch"
 Description: MeeGo Touch Framework based Dialer Application with HFP support
 Requires:
     - ofono
@@ -19,6 +20,7 @@
 PkgBR:
     - libseaside-devel >= 0.0.31
     - meegotouchcp-bluetooth-libmeegobluetooth-devel
+    - qt-mobility-devel
 PkgConfigBR:
     - QtOpenGL
     - QtContacts >= 1.0.2




More information about the MeeGo-commits mailing list