fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/38303?usp=email )


Change subject: [WIP] csd_v110: align TCH/F4.8 NT with DL radio blocks
......................................................................

[WIP] csd_v110: align TCH/F4.8 NT with DL radio blocks

Change-Id: Iea4a21ab9d333bbf416a0997971b1ba25784f238
Related: OS#1572
---
M src/common/csd_v110.c
1 file changed, 10 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/03/38303/1

diff --git a/src/common/csd_v110.c b/src/common/csd_v110.c
index 5fb86b7..aed1715 100644
--- a/src/common/csd_v110.c
+++ b/src/common/csd_v110.c
@@ -199,6 +199,16 @@
                        osmo_csd_12k_6k_encode_frame(&data[i * 60], 60, &df);
                else /* desc->num_bits == 36 */
                        osmo_csd_3k6_encode_frame(&data[i * 36], 36, &df);
+
+               if (lchan->csd_mode == LCHAN_CSD_M_NT) {
+                       if ((i & 1) == 0) { /* executed for Q1/Q3 */
+                               /* E7: 0 for Q1, 1 for Q2/Q3/Q4 (3GPP TS 
44.021, Figure 1)
+                                * E2: 0 for Q1/Q2, 1 for Q3/Q4 (3GPP TS 
48.020, Table 7) */
+                               if (OSMO_UNLIKELY(df.e_bits[1] != df.e_bits[6]))
+                                       return -EINVAL; /* drop unaligned 
blocks */
+                               /* TODO: (for TCH/F4.8) store and send this 
block later? */
+                       }
+               }
        }

        return desc->num_blocks * desc->num_bits;

--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/38303?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Iea4a21ab9d333bbf416a0997971b1ba25784f238
Gerrit-Change-Number: 38303
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>

Reply via email to