aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2016-11-02 17:24:49 +0100
committerMax <msuraev@sysmocom.de>2016-11-03 16:54:10 +0100
commit547da0ab35c01c1a7baabc83d51bf9eb766150d3 (patch)
treef3095a44832ec7815b3fb844d0dcfd442e8741d7
parent05a503f4dcdf88991886d59200fcbb75814313ed (diff)
Add DTX implementation details to RTP AMR
Add FSM and description. Change-Id: Ib37cb6e4038f970070c1715269961db7172ce377
-rw-r--r--OsmoBTS/dtx.dot65
-rw-r--r--OsmoBTS/rtp-amr-docinfo.xml19
-rw-r--r--OsmoBTS/rtp-amr.adoc18
3 files changed, 102 insertions, 0 deletions
diff --git a/OsmoBTS/dtx.dot b/OsmoBTS/dtx.dot
new file mode 100644
index 0000000..1c60ee7
--- /dev/null
+++ b/OsmoBTS/dtx.dot
@@ -0,0 +1,65 @@
+digraph dtx_dl_amr_fsm {
+ node [shape = doublecircle] ST_VOICE ST_FACCH_V ST_FACCH ST_SID_U
+ node [shape = circle]
+
+ // default state for non-DTX and DTX when SPEECH is in progress
+ ST_VOICE -> ST_SID_F1 [ label = "E_SID_F" ]
+ ST_VOICE -> ST_SID_F1 [ label = "E_SID_U" ]
+ ST_VOICE -> ST_VOICE [ label = "E_VOICE" ]
+ ST_VOICE -> ST_VOICE [ label = "E_FACCH" ]
+
+ // SID-FIRST or SID-FIRST-P1 in case of AMR HR: start of silence period (might be interrupted in case of AMR HR)
+ ST_SID_F1 -> ST_SID_F1 [ label = "E_SID_F" ]
+ ST_SID_F1 -> ST_SID_U [ label = "E_SID_U" ]
+ ST_SID_F1 -> ST_VOICE [ label = "E_VOICE" ]
+ ST_SID_F1 -> ST_ONSET_F [ label = "E_FACCH" ]
+ ST_SID_F1 -> ST_SID_F2 [ label = "E_COMPL" ]
+ ST_SID_F1 -> ST_F1_INH [ label = "E_INHIB" ]
+ ST_SID_F1 -> ST_ONSET_V [ label = "E_ONSET" ]
+
+ // SID-FIRST P2 (only for AMR HR): actual start of silence period in case of AMR HR
+ ST_SID_F2 -> ST_SID_U [ label = "E_SID_U" ]
+ ST_SID_F2 -> ST_VOICE [ label = "E_VOICE" ]
+ ST_SID_F2 -> ST_ONSET_F [ label = "E_FACCH" ]
+ ST_SID_F2 -> ST_ONSET_V [ label = "E_ONSET" ]
+
+ // SID-FIRST Inhibited: incoming SPEECH or FACCH (only for AMR HR)
+ ST_F1_INH -> ST_VOICE [ label = "E_VOICE" ]
+ ST_F1_INH -> ST_FACCH_V [ label = "E_FACCH" ]
+
+ // SID-UPDATE Inhibited: incoming SPEECH or FACCH (only for AMR HR)
+ ST_U_INH -> ST_VOICE [ label = "E_VOICE" ]
+ ST_U_INH -> ST_FACCH [ label = "E_FACCH" ]
+
+ // Silence period with periodic comfort noise data updates
+ ST_SID_U -> ST_ONSET_F [ label = "E_FACCH" ]
+ ST_SID_U -> ST_VOICE [ label = "E_VOICE" ]
+ ST_SID_U -> ST_U_INH [ label = "E_INHIB" ]
+ ST_SID_U -> ST_SID_U [ label = "E_SID_U" ]
+ ST_SID_U -> ST_SID_U [ label = "E_SID_F" ]
+ ST_SID_U -> ST_ONSET_V [ label = "E_ONSET" ]
+
+ // ONSET - end of silent period due to incoming SPEECH frame
+ ST_ONSET_V -> ST_ONSET_V_REC [ label = "E_COMPL" ]
+
+ // ONSET - end of silent period due to incoming FACCH frame
+ ST_ONSET_F -> ST_ONSET_F_REC [ label = "E_COMPL" ]
+
+ // ONSET recursion in progress: ONSET itself was already sent, now have to send the voice that caused it
+ ST_ONSET_V_REC -> ST_VOICE [ label = "E_COMPL" ]
+
+ // ONSET recursion in progress: ONSET itself was already sent, now have to send the data that caused it
+ ST_ONSET_F_REC -> ST_FACCH [ label = "E_COMPL" ]
+
+ // FACCH sending state: SPEECH was observed before so once we're done FSM should get back to VOICE state
+ ST_FACCH_V -> ST_FACCH_V [ label = "E_FACCH" ]
+ ST_FACCH_V -> ST_VOICE [ label = "E_VOICE" ]
+ ST_FACCH_V -> ST_VOICE [ label = "E_SID_U" ]
+ ST_FACCH_V -> ST_SID_F1 [ label = "E_SID_F" ]
+
+ // FACCH sending state: no SPEECH was observed before so once we're done FSM should get back to silent period via SID-FIRST
+ ST_FACCH -> ST_FACCH [ label = "E_FACCH" ]
+ ST_FACCH -> ST_VOICE [ label = "E_VOICE" ]
+ ST_FACCH -> ST_SID_F1 [ label = "E_SID_U" ]
+ ST_FACCH -> ST_SID_F1 [ label = "E_SID_F" ]
+}
diff --git a/OsmoBTS/rtp-amr-docinfo.xml b/OsmoBTS/rtp-amr-docinfo.xml
index 82131c4..fe5d681 100644
--- a/OsmoBTS/rtp-amr-docinfo.xml
+++ b/OsmoBTS/rtp-amr-docinfo.xml
@@ -7,6 +7,14 @@
Initial version
</revremark>
</revision>
+ <revision>
+ <revnumber>2</revnumber>
+ <date>November 2016</date>
+ <authorinitials>MS</authorinitials>
+ <revremark>
+ FSM added
+ </revremark>
+ </revision>
</revhistory>
<authorgroup>
@@ -21,6 +29,17 @@
<jobtitle>Managing Director</jobtitle>
</affiliation>
</author>
+ <author>
+ <firstname>Max</firstname>
+ <surname>Suraev</surname>
+ <email>msuraev@sysmocom.de</email>
+ <authorinitials>MS</authorinitials>
+ <affiliation>
+ <shortaffil>sysmocom</shortaffil>
+ <orgname>sysmocom - s.f.m.c. GmbH</orgname>
+ <jobtitle>Software Developer</jobtitle>
+ </affiliation>
+ </author>
</authorgroup>
<copyright>
diff --git a/OsmoBTS/rtp-amr.adoc b/OsmoBTS/rtp-amr.adoc
index f601303..f7eda11 100644
--- a/OsmoBTS/rtp-amr.adoc
+++ b/OsmoBTS/rtp-amr.adoc
@@ -1311,3 +1311,21 @@ msc {
ms <= phy [label="L1 burst (sub-block 4 of SID_FIRST_P1, sub-block 2 of SID_FIRST_P2)"];
}
----
+
+== Implementation details
+
+There is FSM implementing all the necessary states and transitions for DTX DL.
+
+[[dtx_dl_fsm]]
+[graphviz]
+----
+include::dtx.dot[]
+----
+
+The idea is that each state corresponds to the particular message type which have to be send to L1 while state transition happens on incoming events like FACCH or Voice frames. There are 3 different classes of of events driving this FSM:
+
+* Voice frame types: E_VOICE, E_SID_U, E_SID_F
+* Incoming FACCH: E_FACCH
+* Internal: E_ONSET, E_INHIB, E_COMPL
+
+They represent different types of incoming RTP frames (Voice, SID UPDATE and SID FIRST correspondingly), incoming FACCH events or important events internal to DTX operations. The latter are Onset (interruption of silence period), Inhibition (of currently transmitted SID FIRST or UPDATE) and Completion (of silence initiation). \ No newline at end of file