annotate ater8/submux.h @ 48:3cc26391d24d

ater8: add support for data mode
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 13 Sep 2024 01:03:43 +0000
parents ff94d7fc5891
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16
4ffe22f5b4b5 ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
4ffe22f5b4b5 ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * The structures and functions defined in this header file deal with
4ffe22f5b4b5 ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 * interfacing to the Submultiplexer part of Nokia's Transcoder and
42
ff94d7fc5891 new program itt-ater-8
Mychaela Falconia <falcon@freecalypso.org>
parents: 26
diff changeset
4 * Submultiplexer - the 8 kbit/s version.
16
4ffe22f5b4b5 ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 */
4ffe22f5b4b5 ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6
4ffe22f5b4b5 ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 #pragma once
4ffe22f5b4b5 ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8
4ffe22f5b4b5 ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 #include <stdint.h>
4ffe22f5b4b5 ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 #include <stdbool.h>
4ffe22f5b4b5 ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11
4ffe22f5b4b5 ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 #include <osmocom/core/bits.h>
4ffe22f5b4b5 ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 #include <osmocom/isdn/i460_mux.h>
4ffe22f5b4b5 ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 #include <osmocom/trau/trau_frame.h>
4ffe22f5b4b5 ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15
42
ff94d7fc5891 new program itt-ater-8
Mychaela Falconia <falcon@freecalypso.org>
parents: 26
diff changeset
16 #define ATER_SUBSLOTS 8
16
4ffe22f5b4b5 ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17
4ffe22f5b4b5 ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 struct ater_subslot {
4ffe22f5b4b5 ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 struct osmo_i460_subchan *schan;
4ffe22f5b4b5 ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 int nr;
4ffe22f5b4b5 ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 bool is_active;
48
3cc26391d24d ater8: add support for data mode
Mychaela Falconia <falcon@freecalypso.org>
parents: 42
diff changeset
22 bool is_data;
42
ff94d7fc5891 new program itt-ater-8
Mychaela Falconia <falcon@freecalypso.org>
parents: 26
diff changeset
23 bool frame_has_taf;
16
4ffe22f5b4b5 ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 struct osmo_trau_frame ul_frame;
19
1e375472d5a5 ater: implement TRAU frame output
Mychaela Falconia <falcon@freecalypso.org>
parents: 16
diff changeset
25 unsigned mfrm_count;
42
ff94d7fc5891 new program itt-ater-8
Mychaela Falconia <falcon@freecalypso.org>
parents: 26
diff changeset
26 int16_t *play_buffer;
26
237687e2be6c ater: implement play internals
Mychaela Falconia <falcon@freecalypso.org>
parents: 19
diff changeset
27 unsigned play_buf_total;
237687e2be6c ater: implement play internals
Mychaela Falconia <falcon@freecalypso.org>
parents: 19
diff changeset
28 unsigned play_buf_ptr;
237687e2be6c ater: implement play internals
Mychaela Falconia <falcon@freecalypso.org>
parents: 19
diff changeset
29 bool play_wait_align;
16
4ffe22f5b4b5 ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 };
4ffe22f5b4b5 ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31
4ffe22f5b4b5 ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 extern struct ater_subslot subslots[ATER_SUBSLOTS];
4ffe22f5b4b5 ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33
4ffe22f5b4b5 ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 void i460_rx_func(struct osmo_i460_subchan *schan, void *user_data,
4ffe22f5b4b5 ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 const ubit_t *bits, unsigned int num_bits);
19
1e375472d5a5 ater: implement TRAU frame output
Mychaela Falconia <falcon@freecalypso.org>
parents: 16
diff changeset
36
1e375472d5a5 ater: implement TRAU frame output
Mychaela Falconia <falcon@freecalypso.org>
parents: 16
diff changeset
37 void init_trau_ul_frame(int nr);