diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2024-04-29 22:19:31 +0200 |
---|---|---|
committer | Sylvain Munaut <tnt@246tNt.com> | 2024-04-30 00:31:37 +0200 |
commit | a700573548fc8491683b9a06fe0f8bda2ac30cb3 (patch) | |
tree | fb5bdb9c0736b50f236b0b5641fef57e134eb07d | |
parent | fbaa9c296177ab2defd939cac98ed9eda9bb3c4e (diff) |
iCE1usb: Transmit LOS events to clients
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I8822d24c25f8ba0bb70e9f717ca04dbf0e656e71
-rw-r--r-- | src/usb.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -410,8 +410,14 @@ static void rx_interrupt_errcnt(struct e1_line *line, const struct ice1usb_irq_e if ((errcnt->flags & ICE1USB_ERR_F_LOS) != (last->flags & ICE1USB_ERR_F_LOS)) { LOGPLI(line, DE1D, LOGL_ERROR, "Rx Clock %s\n", errcnt->flags & ICE1USB_ERR_F_LOS ? "LOST" : "REGAINED"); - if (errcnt->flags & ICE1USB_ERR_F_LOS) + if (errcnt->flags & ICE1USB_ERR_F_LOS) { line_ctr_add(line, LINE_CTR_LOS, 1); + osmo_e1dp_server_event(line->intf->e1d->srv, E1DP_EVT_LOS_ON, + line->intf->id, line->id, 0, NULL, 0); + } else { + osmo_e1dp_server_event(line->intf->e1d->srv, E1DP_EVT_LOS_OFF, + line->intf->id, line->id, 0, NULL, 0); + } } if ((errcnt->flags & ICE1USB_ERR_F_RAI) != (last->flags & ICE1USB_ERR_F_RAI)) { |