pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/libosmo-netif/+/30695 )
Change subject: amr: Add struct definition for AMR BWE header
......................................................................
amr: Add struct definition for AMR BWE header
Change-Id: I4b44257605bc5967d862ee29076ea6260d9a6bd8
---
M include/osmocom/netif/amr.h
1 file changed, 28 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/95/30695/1
diff --git a/include/osmocom/netif/amr.h b/include/osmocom/netif/amr.h
index 382c66a..c7ca5bb 100644
--- a/include/osmocom/netif/amr.h
+++ b/include/osmocom/netif/amr.h
@@ -15,6 +15,34 @@
*/
/*
+ * 4.3. Bandwidth-Efficient Mode:
+ *
+ * Summary from 4.3.4: Same as Octet aligned (see below) but without padding after header
and ToC:
+ * 0 1
+ * 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | CMR |F| FT |Q|X X X X X X|
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *
+ * X means AMR payload (padding in case of FT=NO_DATA).
+ */
+struct amr_hdr_bwe {
+#if OSMO_IS_LITTLE_ENDIAN
+ uint8_t ft_hi:3, /* coding mode highest part */
+ f:1,
+ cmr:4; /* Codec Mode Request */
+ uint8_t data_start:6,
+ q:1, /* OK (not damaged) at origin? */
+ ft_lo:1; /* coding mode lowest bit */
+#elif OSMO_IS_BIG_ENDIAN
+/* auto-generated from the little endian part above
(libosmocore/contrib/struct_endianess.py) */
+ uint8_t cmr:4, f:1, ft_hi:3;
+ uint8_t ft_lo:1, q:1, data_start:6;
+#endif
+ uint8_t data[0];
+} __attribute__((packed));
+
+/*
* 4.4. Octet-aligned Mode:
*
* 4.4.1. The Payload Header:
--
To view, visit
https://gerrit.osmocom.org/c/libosmo-netif/+/30695
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I4b44257605bc5967d862ee29076ea6260d9a6bd8
Gerrit-Change-Number: 30695
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange