laforge has submitted this change. (
https://gerrit.osmocom.org/c/libosmo-abis/+/31032 )
Change subject: Add function to set Sa bits to common part
......................................................................
Add function to set Sa bits to common part
Change-Id: I4f5f975f0e5f708ae573a1e1ce41c6a08c207fad
---
M TODO-RELEASE
M include/osmocom/abis/e1_input.h
M src/e1_input.c
3 files changed, 20 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/TODO-RELEASE b/TODO-RELEASE
index d0852fc..c021505 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -7,3 +7,4 @@
# If any interfaces have been added since the last public release: c:r:a + 1.
# If any interfaces have been removed or changed since the last public release: c:r:0.
#library what description / commit summary line
+libosmo-abis struct e1inp_driver Field added at the end (ABI break)
diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h
index 7b97a46..a66f8eb 100644
--- a/include/osmocom/abis/e1_input.h
+++ b/include/osmocom/abis/e1_input.h
@@ -187,6 +187,9 @@
int default_delay;
int has_keepalive;
const char *bind_addr;
+
+ /* Set Sa bits to transmit in TS0 (MSB to LSB): Sa8 Sa7 Sa5 Sa4 Sa64 Sa63 Sa62 Sa61/Sa6
*/
+ int (*set_sa_bits)(struct e1inp_line *line, uint8_t sa_bits);
};
struct e1inp_line_ops {
@@ -328,6 +331,12 @@
/* configure and initialize one timeslot dedicated to nothing */
int e1inp_ts_config_none(struct e1inp_ts *ts, struct e1inp_line *line);
+/*
+ * configure Sa bits on TS0, if supported by driver (TABLE 5A and 5B of ITU-T G.704)
+ * sa_bits (MSB to LSB): Sa8 Sa7 Sa5 Sa4 Sa64 Sa63 Sa62 Sa61/Sa6
+ */
+int e1inp_ts_set_sa_bits(struct e1inp_line *line, uint8_t sa_bits);
+
/* obtain a string identifier/name for the given timeslot */
void e1inp_ts_name(char *out, size_t out_len, const struct e1inp_ts *ts);
diff --git a/src/e1_input.c b/src/e1_input.c
index a7313dd..2d10513 100644
--- a/src/e1_input.c
+++ b/src/e1_input.c
@@ -455,6 +455,16 @@
return 0;
}
+int e1inp_ts_set_sa_bits(struct e1inp_line *line, uint8_t sa_bits)
+{
+ struct e1inp_driver *driver;
+
+ driver = line->driver;
+ if (!driver->set_sa_bits)
+ return -ENOTSUP;
+ return driver->set_sa_bits(line, sa_bits);
+}
+
static int e1inp_line_use_cb(struct osmo_use_count_entry *use_count_entry, int32_t
old_use_count,
const char *file, int file_line)
{
--
To view, visit
https://gerrit.osmocom.org/c/libosmo-abis/+/31032
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I4f5f975f0e5f708ae573a1e1ce41c6a08c207fad
Gerrit-Change-Number: 31032
Gerrit-PatchSet: 5
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: merged