FreeCalypso > hg > ice1-trau-tester
annotate ater/submux.h @ 52:626180a15857 default tip
ater play-d144: emit E-data frames manually,
osmo_trau_frame_encode() is currently broken for this frame type
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 25 Sep 2024 06:40:43 +0000 |
parents | 40f781efdbe1 |
children |
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 |
4ffe22f5b4b5
ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 * Submultiplexer. |
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 |
4ffe22f5b4b5
ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 #define ATER_SUBSLOTS 4 |
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; |
44
16715bd149e0
ater: add support for data mode
Mychaela Falconia <falcon@freecalypso.org>
parents:
26
diff
changeset
|
22 bool is_data; |
47
13fffc41f989
ater: add support for HR-data-16k TRAU-UL frame output
Mychaela Falconia <falcon@freecalypso.org>
parents:
44
diff
changeset
|
23 bool is_hr_data; |
16
4ffe22f5b4b5
ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 bool is_efr; |
49
40f781efdbe1
ater: beginning of D144 mode
Mychaela Falconia <falcon@freecalypso.org>
parents:
47
diff
changeset
|
25 bool is_data_144; |
40f781efdbe1
ater: beginning of D144 mode
Mychaela Falconia <falcon@freecalypso.org>
parents:
47
diff
changeset
|
26 bool d144_edata; |
16
4ffe22f5b4b5
ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 struct osmo_trau_frame ul_frame; |
19
1e375472d5a5
ater: implement TRAU frame output
Mychaela Falconia <falcon@freecalypso.org>
parents:
16
diff
changeset
|
28 unsigned mfrm_count; |
26
237687e2be6c
ater: implement play internals
Mychaela Falconia <falcon@freecalypso.org>
parents:
19
diff
changeset
|
29 uint8_t *play_buffer; |
237687e2be6c
ater: implement play internals
Mychaela Falconia <falcon@freecalypso.org>
parents:
19
diff
changeset
|
30 unsigned play_buf_total; |
237687e2be6c
ater: implement play internals
Mychaela Falconia <falcon@freecalypso.org>
parents:
19
diff
changeset
|
31 unsigned play_buf_ptr; |
237687e2be6c
ater: implement play internals
Mychaela Falconia <falcon@freecalypso.org>
parents:
19
diff
changeset
|
32 bool play_wait_align; |
16
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 |
4ffe22f5b4b5
ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 extern struct ater_subslot subslots[ATER_SUBSLOTS]; |
4ffe22f5b4b5
ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 |
4ffe22f5b4b5
ater: initial osmo_i460 framework
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 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
|
38 const ubit_t *bits, unsigned int num_bits); |
19
1e375472d5a5
ater: implement TRAU frame output
Mychaela Falconia <falcon@freecalypso.org>
parents:
16
diff
changeset
|
39 |
1e375472d5a5
ater: implement TRAU frame output
Mychaela Falconia <falcon@freecalypso.org>
parents:
16
diff
changeset
|
40 void init_trau_ul_frame(int nr); |
44
16715bd149e0
ater: add support for data mode
Mychaela Falconia <falcon@freecalypso.org>
parents:
26
diff
changeset
|
41 void init_trau_ul_frame_csd(int nr, bool ir_16k); |