FreeCalypso > hg > ice1-trau-tester
annotate ater8/submux.h @ 47:13fffc41f989
ater: add support for HR-data-16k TRAU-UL frame output
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Thu, 12 Sep 2024 23:37:47 +0000 |
| parents | ff94d7fc5891 |
| children | 3cc26391d24d |
| 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; |
|
42
ff94d7fc5891
new program itt-ater-8
Mychaela Falconia <falcon@freecalypso.org>
parents:
26
diff
changeset
|
22 bool frame_has_taf; |
|
16
4ffe22f5b4b5
ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 struct osmo_trau_frame ul_frame; |
|
19
1e375472d5a5
ater: implement TRAU frame output
Mychaela Falconia <falcon@freecalypso.org>
parents:
16
diff
changeset
|
24 unsigned mfrm_count; |
|
42
ff94d7fc5891
new program itt-ater-8
Mychaela Falconia <falcon@freecalypso.org>
parents:
26
diff
changeset
|
25 int16_t *play_buffer; |
|
26
237687e2be6c
ater: implement play internals
Mychaela Falconia <falcon@freecalypso.org>
parents:
19
diff
changeset
|
26 unsigned play_buf_total; |
|
237687e2be6c
ater: implement play internals
Mychaela Falconia <falcon@freecalypso.org>
parents:
19
diff
changeset
|
27 unsigned play_buf_ptr; |
|
237687e2be6c
ater: implement play internals
Mychaela Falconia <falcon@freecalypso.org>
parents:
19
diff
changeset
|
28 bool play_wait_align; |
|
16
4ffe22f5b4b5
ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 }; |
|
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 extern struct ater_subslot subslots[ATER_SUBSLOTS]; |
|
4ffe22f5b4b5
ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 |
|
4ffe22f5b4b5
ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 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
|
34 const ubit_t *bits, unsigned int num_bits); |
|
19
1e375472d5a5
ater: implement TRAU frame output
Mychaela Falconia <falcon@freecalypso.org>
parents:
16
diff
changeset
|
35 |
|
1e375472d5a5
ater: implement TRAU frame output
Mychaela Falconia <falcon@freecalypso.org>
parents:
16
diff
changeset
|
36 void init_trau_ul_frame(int nr); |
