diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2013-12-23 11:09:35 +0100 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2016-09-25 08:11:45 +0200 |
commit | c7f1ab629086c2d68b9e8c8f2483bf9acca25bd3 (patch) | |
tree | 6b6cd4292ce110b8bdbfb01137de5fc29fb45ab0 /src/host | |
parent | 57fbd7699751ad705d9658688b38cf6c9226f7f1 (diff) |
Add ringer support to L1CTL interface and layer1
Diffstat (limited to 'src/host')
-rw-r--r-- | src/host/layer23/include/osmocom/bb/common/l1ctl.h | 3 | ||||
-rw-r--r-- | src/host/layer23/src/common/l1ctl.c | 17 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/host/layer23/include/osmocom/bb/common/l1ctl.h b/src/host/layer23/include/osmocom/bb/common/l1ctl.h index e95f47b7..3cf014e4 100644 --- a/src/host/layer23/include/osmocom/bb/common/l1ctl.h +++ b/src/host/layer23/include/osmocom/bb/common/l1ctl.h @@ -74,4 +74,7 @@ int l1ctl_ph_prim_cb(struct osmo_prim_hdr *oph, void *ctx); /* Transmit L1CTL_NEIGH_PM_REQ */ int l1ctl_tx_neigh_pm_req(struct osmocom_ms *ms, int num, uint16_t *arfcn); +/* Transmit L1CTL_RINGER_REQ */ +int l1ctl_tx_ringer_req(struct osmocom_ms *ms, uint8_t volume); + #endif diff --git a/src/host/layer23/src/common/l1ctl.c b/src/host/layer23/src/common/l1ctl.c index bdb4853b..6fca8ade 100644 --- a/src/host/layer23/src/common/l1ctl.c +++ b/src/host/layer23/src/common/l1ctl.c @@ -934,6 +934,23 @@ static int rx_l1_neigh_pm_ind(struct osmocom_ms *ms, struct msgb *msg) return 0; } +/* Transmit L1CTL_RINGER_REQ */ +int l1ctl_tx_ringer_req(struct osmocom_ms *ms, uint8_t volume) +{ + struct msgb *msg; + struct l1ctl_ringer_req *ring_req; + + msg = osmo_l1_alloc(L1CTL_RINGER_REQ); + if (!msg) + return -1; + + LOGP(DL1C, LOGL_INFO, "Tx RINGER Req (volume %u)\n", volume); + ring_req = (struct l1ctl_ringer_req *) msgb_put(msg, sizeof(*ring_req)); + ring_req->volume = volume; + + return osmo_send_l1(ms, msg); +} + /* Receive incoming data from L1 using L1CTL format */ int l1ctl_recv(struct osmocom_ms *ms, struct msgb *msg) { |