[pkg-fso-commits] [SCM] FSO frameworkd Debian packaging branch, master, updated. milestone4-368-g700ab82
Michael 'Mickey' Lauer
mickey at vanille-media.de
Mon Feb 2 18:51:47 UTC 2009
The following commit has been merged in the master branch:
commit 7d7d2f8b9ccd3ffa8112045ac347a9f5854e5df2
Author: Michael 'Mickey' Lauer <mickey at vanille-media.de>
Date: Sat Dec 27 14:55:05 2008 +0100
ogsmd: [TI CALYPSO] Add TI-Calypso specific configuration option "ti_calypso_dsp_mode" to configure
DSP audio enhancements. Documentation for this option has been added to the sample configuration file.
(Some lowlevel details can be found in framework/subsystems/ogsmd/modems/ti_calypso/channel.py)
This closes FSO ticket #274 and #253.
diff --git a/ChangeLog b/ChangeLog
index 5b27334..2d11d61 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
2008-12-27 Michael Lauer <mickey at openmoko.org>
* [ogsmd] Refactored Modem.dataOptions() into "pppd-configuration" attribute in modem data storage.
+ * [ogsmd] Added TI-Calypso specific configuration option "ti_calypso_dsp_mode" to configure
+ audio enhancements. Documentation for this option has been added to the sample configuration file.
2008-12-24 Daniel Willmann <daniel at totalueberwachung.de>
diff --git a/conf/example/frameworkd.conf b/conf/example/frameworkd.conf
index 77fe106..ba62b89 100644
--- a/conf/example/frameworkd.conf
+++ b/conf/example/frameworkd.conf
@@ -57,10 +57,23 @@ disable = 0
[ogsmd]
disable = 0
-# chose your modem type, available types are: ti_calypso, freescale_neptune, (singleline, muxed4line)
+# chose your modem type, available types are: ti_calypso, freescale_neptune, singleline, muxed4line, option, ...
modemtype = ti_calypso
-# if you have a ti_calypso, you can chose the deep sleep mode: valid values are: never, adaptive (default), always
+# if you have a ti_calypso, you can chose the deep sleep mode. Valid values are: never, adaptive (default), always
ti_calypso_deep_sleep = adaptive
+# if you have a ti_calypso, you can choose the dsp mode for audio enhancement. Valid values are:
+# "short-aec": Short Echo Cancellation (max)
+# "long-aec": Long Echo Cancellation (max)
+# "long-aec:6db": Long Echo Cancellation (-6db)
+# "long-aec:12db": Long Echo Cancellation (-12db)
+# "long-aec:18db": Long Echo Cancellation (-18db)
+# "nr": Noise Reduction (max)
+# "nr:6db": Noise Reduction (-6db)
+# "nr:12db": Noise Reduction (-12db)
+# "nr:18db": Noise Reduction (-18db)
+# "aec+nr": Long Echo Cancellation (max) plus Noise Reduction (max) [default]
+# "none": No audio processing.
+ti_calypso_dsp_mode = aec+nr
log_level = INFO
[ogpsd]
diff --git a/framework/subsystems/ogsmd/modems/ti_calypso/channel.py b/framework/subsystems/ogsmd/modems/ti_calypso/channel.py
index 9f4832d..f57bb87 100644
--- a/framework/subsystems/ogsmd/modems/ti_calypso/channel.py
+++ b/framework/subsystems/ogsmd/modems/ti_calypso/channel.py
@@ -13,7 +13,7 @@ Module: channel
TI Calypso specific modem channels
"""
-__version__ = "0.9.9.3"
+__version__ = "0.9.10.0"
from framework.config import config
@@ -31,6 +31,47 @@ import logging
logger = logging.getLogger('ogsmd')
#=========================================================================#
+# MMI_AEC_REQ : 0283 = Long AEC, 105 = SPENH, 187 = AEC+SPENH, 1 = STOP
+# aec_control register bits | 0 0 Sa t2|t1 g3 g2 g1|g0 e2 e1 ak|
+# bit 0 : ACK bit : set to 1 in order to warn DSP that a new command
+# is present.
+# bit 1 : enable AEC
+# bit 2 : enable SPENH (= Speech Enhancement = noise reduction)
+# bit 3 : additionnal AEC gain attenuation (lsb)
+# bit 4 : additionnal AEC gain attenuation (msb)
+# bit 5 : additionnal SPENH gain attenuation (lsb)
+# bit 6 : additionnal SPENH gain attenuation (msb)
+# bit 7 : reset trigger for AEC
+# bit 8 : reset trigger for SPENH
+# bit 9 : AEC selector 0 : short AEC, 1 : long AEC
+#
+# for Short AEC 0083
+# for long AEC 0283
+# for long AEC -6 dB 028B
+# for long AEC -12 dB 0293
+# for long AEC -18 dB 029B
+# for SPENH 0105
+# for SPENH -6 dB 0125
+# for SPENH -12 dB 0145
+# for SPENH -18 dB 0165
+# for BOTH 0187
+# for STOP ALL 0001 (all bits reset + ACK to 1 to warn the DSP)
+
+AEC_NR_MAP = { \
+ "short-aec": "0083",
+ "long-aec": "0283",
+ "long-aec:6db": "028B",
+ "long-aec:12db": "0293",
+ "long-aec:18db": "029B",
+ "nr": "0105",
+ "nr:6db": "0125",
+ "nr:12db": "0145",
+ "nr:18db": "0165",
+ "aec+nr": "0187",
+ "none": "0001",
+ }
+
+#=========================================================================#
class CalypsoModemChannel( AbstractModemChannel ):
#=========================================================================#
modem_communication_timestamp = 1
@@ -216,8 +257,6 @@ class UnsolicitedResponseChannel( CalypsoModemChannel ):
c.append( "%CNIV=1" )
c.append( "%CSTAT=1" )
c.append( '@ST="-26"' ) # audio side tone: set to minimum
- c.append( "%N028B" ) # Long Echo Cancellation: active, -6db
- c.append( "%N0125" ) # Noise reduction: active, -6db
deepSleepMode = config.getValue( "ogsmd", "ti_calypso_deep_sleep", "adaptive" )
if deepSleepMode == "never":
@@ -225,6 +264,9 @@ class UnsolicitedResponseChannel( CalypsoModemChannel ):
else:
c.append( "%SLEEP=4" ) # sleep mode: enable all
+ dspMode = config.getValue( "ogsmd", "ti_calypso_dsp_mode", "aec+nr" )
+ c.append( "%N" + AEC_NR_MAP.get( dspMode, "aec+nr" ) )
+
c = self._commands["sim"]
c = self._commands["suspend"]
--
FSO frameworkd Debian packaging
More information about the pkg-fso-commits
mailing list