aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2023-01-15 14:20:58 +0100
committerlaforge <laforge@osmocom.org>2023-03-05 18:06:08 +0000
commitdf15c2976e12422b5c23dd24c838c1ecc3a9e2eb (patch)
tree8aba6a5ce03fe559ad94e990e8ceb34c63437400
parenttrau_pcu_ericsson: add comment about uplink blocks (diff)
downloadlibosmo-abis-df15c2976e12422b5c23dd24c838c1ecc3a9e2eb.tar.xz
libosmo-abis-df15c2976e12422b5c23dd24c838c1ecc3a9e2eb.zip
Send raw data with e1d as it arrives from application
The application is responsible to send raw data in sync with the raw data it receives. It also cares about sending data in advance, to prevent underruns, if required. The length of data can vary. (Now it is same procedure as with mISDN driver.) OSMO_FD_WRITE flag must be disabled, if there is no message left in the transmit queue. Change-Id: I3e3ef623a02bffe75b168dc42514455b4df1007f
-rw-r--r--src/input/e1d.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/input/e1d.c b/src/input/e1d.c
index 4ab7c36..b638439 100644
--- a/src/input/e1d.c
+++ b/src/input/e1d.c
@@ -194,8 +194,10 @@ static int handle_ts_raw_write(struct osmo_fd *bfd)
/* get the next msg for this timeslot */
msg = e1inp_tx_ts(e1i_ts, NULL);
- if (!msg)
+ if (!msg) {
+ osmo_fd_write_disable(bfd);
return 0;
+ }
if (msg->len != D_BCHAN_TX_GRAN) {
/* This might lead to a transmit underrun, as we call tx
@@ -244,9 +246,6 @@ static int handle_ts_raw_read(struct osmo_fd *bfd)
msg->l2h = msg->data;
LOGPITS(e1i_ts, DLMIB, LOGL_DEBUG, "RAW CHAN RX: %s\n", msgb_hexdump_l2(msg));
ret = e1inp_rx_ts(e1i_ts, msg, 0, 0);
- /* physical layer indicates that data has been sent,
- * we thus can send some more data */
- ret = handle_ts_raw_write(bfd);
return ret;
}