[PATCH] osmo-gsm-manuals[master]: Add DTX implementation details to RTP AMR

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Max gerrit-no-reply at lists.osmocom.org
Thu Nov 3 15:54:58 UTC 2016


Hello Harald Welte, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/1193

to look at the new patch set (#2).

Add DTX implementation details to RTP AMR

Add FSM and description.

Change-Id: Ib37cb6e4038f970070c1715269961db7172ce377
---
A OsmoBTS/dtx.dot
M OsmoBTS/rtp-amr-docinfo.xml
M OsmoBTS/rtp-amr.adoc
3 files changed, 102 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/93/1193/2

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 at 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 @@
 	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

-- 
To view, visit https://gerrit.osmocom.org/1193
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib37cb6e4038f970070c1715269961db7172ce377
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list