Add function to set Sa bits to common part
Change-Id: I4f5f975f0e5f708ae573a1e1ce41c6a08c207fad
This commit is contained in:
parent
f2cb4f09e3
commit
9a151091cc
|
@ -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)
|
||||
|
|
|
@ -187,6 +187,9 @@ struct e1inp_driver {
|
|||
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 @@ int e1inp_ts_config_hdlc(struct e1inp_ts *ts, struct e1inp_line *line,
|
|||
/* 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);
|
||||
|
||||
|
|
|
@ -455,6 +455,16 @@ int e1inp_ts_config_none(struct e1inp_ts *ts, struct e1inp_line *line)
|
|||
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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue