Ticket #1267: qtopia-enable-echo-suppression-on-dialing-and-accepting.patch

File qtopia-enable-echo-suppression-on-dialing-and-accepting.patch, 3.8 KB (added by Treviño, 5 years ago)

Another Qtopia echo suppression for TI Calypso patch.

  • devices/ficgta01/src/plugins/phonevendors/ficgta01/vendor_ficgta01.cpp

    From 265ed1ab8b29adb2ae5b827df11191f37fc816cf Mon Sep 17 00:00:00 2001
    From: =?utf-8?q?Marco=20Trevisan=20(Trevi=C3=B1o)?= <mail@3v1n0.net>
    Date: Wed, 15 Oct 2008 02:04:41 +0200
    Subject: [PATCH] Enable echo suppression on Dialing and on Accepting
     This patch replaces the first echo cancellation implementation using the TI Calypso
     "hidden" AT commands as suggested by Micheal Lauer on voice dialout and when accepting
     a call. According to some tests, in fact, it seems that the echo suppression is enabled
     only after the first AT query.
    
    ---
     .../phonevendors/ficgta01/vendor_ficgta01.cpp      |   25 ++++++++++++++++---
     .../phonevendors/ficgta01/vendor_ficgta01_p.h      |    3 ++
     2 files changed, 24 insertions(+), 4 deletions(-)
    
    diff --git a/devices/ficgta01/src/plugins/phonevendors/ficgta01/vendor_ficgta01.cpp b/devices/ficgta01/src/plugins/phonevendors/ficgta01/vendor_ficgta01.cpp
    index ae96eb4..afd5d37 100644
    a b QString Ficgta01CallProvider::dialServiceCommand(const QDialOptions& options) co 
    186186    return cmd.arg(QAtUtils::quote(options.number(), codec)); 
    187187} 
    188188 
     189// Use the enable the echo suppression for TI Calypso before dialing 
     190QString Ficgta01CallProvider::dialVoiceCommand(const QDialOptions& options) const 
     191{ 
     192        Ficgta01ModemService::echoCancellation(atchat()); 
     193        return QModemCallProvider::dialVoiceCommand(options); 
     194} 
     195 
     196// Use the enable the echo suppression for TI Calypso before accepting calls 
     197QString Ficgta01CallProvider::acceptCallCommand( bool otherActiveCalls ) const 
     198{ 
     199        Ficgta01ModemService::echoCancellation(atchat()); 
     200        return QModemCallProvider::acceptCallCommand(otherActiveCalls); 
     201} 
     202 
    189203Ficgta01PhoneBook::Ficgta01PhoneBook( QModemService *service ) 
    190204    : QModemPhoneBook( service ) 
    191205    , m_phoneBookWasReady(false) 
    Ficgta01ModemService::Ficgta01ModemService 
    453467    // Enable %CPRI for ciphering indications. 
    454468//    chat( "AT%CPRI=1" ); 
    455469 
    456     // Set the side to the minimum value, enable echo/noise reduction 
    457     chat("AT@ST=\"-26\"" ); 
    458     chat("AT%N0187" ); 
    459  
    460470    // Make the modem send unsolicited reports at any time 
    461471    // the "user is not typing".  i.e. don't intersperse unsolicited 
    462472    // notifications and command echo as it will confuse QAtChat. 
    void Ficgta01ModemService::modemDied() 
    759769        m_vibratorService->setVibrateNow(false); 
    760770} 
    761771 
     772void Ficgta01ModemService::echoCancellation(QAtChat * atChat) 
     773{ 
     774        atChat->chat( "AT@ST=\"-26\"" ); // audio side tone: set to minimum 
     775        atChat->chat( "AT%N028B" );      // Long Echo Cancellation: active, -6db 
     776        atChat->chat( "AT%N0125" );      // Noise reduction: active, -6db 
     777} 
     778 
    762779 Ficgta01VibrateAccessory::Ficgta01VibrateAccessory 
    763780        ( QModemService *service ) 
    764781    : QVibrateAccessoryProvider( service->service(), service ) 
  • devices/ficgta01/src/plugins/phonevendors/ficgta01/vendor_ficgta01_p.h

    diff --git a/devices/ficgta01/src/plugins/phonevendors/ficgta01/vendor_ficgta01_p.h b/devices/ficgta01/src/plugins/phonevendors/ficgta01/vendor_ficgta01_p.h
    index 6426a93..b5cc651 100644
    a b protected: 
    5353    QModemCallProvider::AtdBehavior atdBehavior() const; 
    5454    void abortDial( uint modemIdentifier, QPhoneCall::Scope scope ); 
    5555    QString dialServiceCommand(const QDialOptions&) const; 
     56    QString dialVoiceCommand(const QDialOptions&) const; 
     57    QString acceptCallCommand( bool otherActiveCalls ) const; 
    5658 
    5759    // reimplementation 
    5860    void resetModem(); 
    public: 
    126128    ~Ficgta01ModemService(); 
    127129 
    128130    void initialize(); 
     131    static void echoCancellation( QAtChat* ); 
    129132 
    130133private slots: 
    131134    void csq( const QString& msg );