laforge has submitted this change. ( https://gerrit.osmocom.org/c/dahdi-linux/+/27838 )
Change subject: icE1usb: Fix inverted logic for clock timing source
......................................................................
icE1usb: Fix inverted logic for clock timing source
The 'struct dahdi_lineconfig.sync' parameter originates from the
'timing' field of system.conf. dahdi_cfg passes it via the SPANCONFIG
ioctl into the kernel.
The DAHDI docs say:
> source of the master clock. If you choose 0, the port will never
> be used as a source of timing. This is appropriate when you know the
> far end should always be a slave to you.
So if '0' we should use the local clock, and if > 0, the recovered
remote clock.
Thanks to Christoph Lauter for pointing this out.
Change-Id: If35a5a52c094129c342d0f658f496b488d1826ad
---
M drivers/dahdi/icE1usb/icE1usb.c
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
manawyrm: Looks good to me, but someone else must approve; Verified
laforge: Looks good to me, approved
diff --git a/drivers/dahdi/icE1usb/icE1usb.c b/drivers/dahdi/icE1usb/icE1usb.c
index e829b2d..7ab751e 100644
--- a/drivers/dahdi/icE1usb/icE1usb.c
+++ b/drivers/dahdi/icE1usb/icE1usb.c
@@ -691,9 +691,9 @@
ieu->cfg.tx.mode = ICE1USB_TX_MODE_TS0;
if (lc->sync > 0)
- ieu->cfg.tx.timing = ICE1USB_TX_TIME_SRC_LOCAL;
- else
ieu->cfg.tx.timing = ICE1USB_TX_TIME_SRC_REMOTE;
+ else
+ ieu->cfg.tx.timing = ICE1USB_TX_TIME_SRC_LOCAL;
/* (re-)set to sane defaults */
ieu->cfg.tx.ext_loopback = ICE1USB_TX_EXT_LOOPBACK_OFF;
--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/27838
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: If35a5a52c094129c342d0f658f496b488d1826ad
Gerrit-Change-Number: 27838
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: manawyrm <osmocom.account(a)tbspace.de>
Gerrit-MessageType: merged
Attention is currently required from: laforge.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/dahdi-linux/+/27838
to look at the new patch set (#2).
Change subject: icE1usb: Fix inverted logic for clock timing source
......................................................................
icE1usb: Fix inverted logic for clock timing source
The 'struct dahdi_lineconfig.sync' parameter originates from the
'timing' field of system.conf. dahdi_cfg passes it via the SPANCONFIG
ioctl into the kernel.
The DAHDI docs say:
> source of the master clock. If you choose 0, the port will never
> be used as a source of timing. This is appropriate when you know the
> far end should always be a slave to you.
So if '0' we should use the local clock, and if > 0, the recovered
remote clock.
Thanks to Christoph Lauter for pointing this out.
Change-Id: If35a5a52c094129c342d0f658f496b488d1826ad
---
M drivers/dahdi/icE1usb/icE1usb.c
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/dahdi-linux refs/changes/38/27838/2
--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/27838
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: If35a5a52c094129c342d0f658f496b488d1826ad
Gerrit-Change-Number: 27838
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: manawyrm <osmocom.account(a)tbspace.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newpatchset
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/27836 )
Change subject: osmo-bts-trx: check if scheduling of [dummy] FACCH/H is allowed
......................................................................
osmo-bts-trx: check if scheduling of [dummy] FACCH/H is allowed
Currently (without this patch) if tch_dl_dequeue() yields nothing we're
scheduling dummy FACCH/H *regardless* if it's permitted to start at the
given TDMA FN or not. This may result in misaligned FACCH transmission,
so the MS will not able to decode anything and will report BER>0.
With this patch applied we schedule FACCH/H if it's allowed to start
at the current TDMA FN; otherwise send half-filled bursts with even
numbered bits contaning 232 encoded bits of the previous L2 frame
and 232 odd numbered bits all set to 0.
This patch does not guard against sporadic gaps in the Downlink TCH
queue. However when tch_dl_dequeue() constantly yields nothing, e.g.
when we end up with a codec mismatch, then this additional check saves
us from starting misaligned FACCH/H transmission. If we start at a wrong
TDMA offset, then all subsequent FACCH frames will be scheduled at wrong
offsets and thus none of them will be decoded by the MS.
Change-Id: I6f8af140a6ccf3d5fd7b98f6cb5c18e2c5e2f61b
Related: SYS#5919, OS#4823
---
M src/common/scheduler.c
M src/osmo-bts-trx/sched_lchan_tchh.c
2 files changed, 13 insertions(+), 1 deletion(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/common/scheduler.c b/src/common/scheduler.c
index 8ec9ccf..d166909 100644
--- a/src/common/scheduler.c
+++ b/src/common/scheduler.c
@@ -998,7 +998,7 @@
/* FACCH/H channel mapping for Downlink (see 3GPP TS 45.002, table 1).
* This mapping is valid for both FACCH/H(0) and FACCH/H(1). */
-static const uint8_t sched_tchh_dl_facch_map[26] = {
+const uint8_t sched_tchh_dl_facch_map[26] = {
[4] = 1, /* FACCH/H(0): B0(4,6,8,10,13,15) */
[5] = 1, /* FACCH/H(1): B0(5,7,9,11,14,16) */
[13] = 1, /* FACCH/H(0): B1(13,15,17,19,21,23) */
diff --git a/src/osmo-bts-trx/sched_lchan_tchh.c b/src/osmo-bts-trx/sched_lchan_tchh.c
index 55a185e..fe166ae 100644
--- a/src/osmo-bts-trx/sched_lchan_tchh.c
+++ b/src/osmo-bts-trx/sched_lchan_tchh.c
@@ -75,6 +75,9 @@
[3] = 1, /* FACCH/H(1): B2(18,20,22,24,1,3) */
};
+/* TDMA frame number of burst 'a' is used as the table index. */
+extern const uint8_t sched_tchh_dl_facch_map[26];
+
/*! \brief a single TCH/H burst was received by the PHY, process it */
int rx_tchh_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
{
@@ -407,6 +410,15 @@
};
LOGL1SB(DL1P, LOGL_INFO, l1ts, br, "No TCH or FACCH prim for transmit.\n");
+
+ /* FACCH/H can only be scheduled at specific TDMA offset */
+ if (!sched_tchh_dl_facch_map[br->fn % 26]) {
+ /* FACCH/H is not allowed, send half-filled bursts with even numbered
+ * bits contaning 232 encoded bits of the previous L2 frame, and 232
+ * odd numbered bits all set to 0. */
+ goto send_burst;
+ }
+
gsm0503_tch_hr_encode(*bursts_p, dummy, sizeof(dummy));
chan_state->dl_ongoing_facch = 1;
chan_state->dl_facch_bursts = 6;
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/27836
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I6f8af140a6ccf3d5fd7b98f6cb5c18e2c5e2f61b
Gerrit-Change-Number: 27836
Gerrit-PatchSet: 5
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: osmith <osmith(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged