aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2016-12-08 14:44:02 +0100
committerMax <msuraev@sysmocom.de>2016-12-08 14:44:02 +0100
commit55a7b0741752409e253412b22d842e8367fd5477 (patch)
tree5b757584610bc8a7757df95f0a3757000c6e816d
parent960dd993cdc16d9e268f83f5c7ca294a96a5048f (diff)
DTX: add explicit check if DTX enabled
Check explicitly if DTX is enabled for AMR before checking if SID frame repetition is optional. Change-Id: I660688d56505798cade1495c30338fd6806a3259 Related: OS#1801
-rw-r--r--src/common/msg_utils.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c
index c5081b40..b844eec2 100644
--- a/src/common/msg_utils.c
+++ b/src/common/msg_utils.c
@@ -257,6 +257,9 @@ static inline void dtx_sti_unset(struct gsm_lchan *lchan)
*/
static inline bool dtx_amr_sid_optional(struct gsm_lchan *lchan, uint32_t fn)
{
+ if (!dtx_dl_amr_enabled(lchan))
+ return true;
+
/* Compute approx. time delta x26 based on Fn duration */
uint32_t dx26 = 120 * (fn - lchan->tch.dtx.fn);