gsmtap: Solve TCH / FACCH confusion once and for all

* What we used to call TCH/F and TCH/H in gsmtap are actually only
  FACCH/F and FACCH/H, i.e. the signaling part of Bm/Lm channels

* Give them proper names with backwards compatibility #define

* Split VOICE into VOICE_F and VOICE_H.  If we don't differentiate this,
  a receiver is not able to determine the RSL channel ID of a frame
  without looking at external state/context.  That in turn has been a
  design feature of GSMTAP Um format so far, and programs like
  osmo-bts-virtual rely on it.

Change-Id: I952044a17334f35712e087dc41781805000aebc1
Related: OS#2557
diff --git a/include/osmocom/core/gsmtap.h b/include/osmocom/core/gsmtap.h
index 87c18e3..82e9525 100644
--- a/include/osmocom/core/gsmtap.h
+++ b/include/osmocom/core/gsmtap.h
@@ -82,8 +82,8 @@
 #define GSMTAP_CHANNEL_SDCCH	0x06
 #define GSMTAP_CHANNEL_SDCCH4	0x07
 #define GSMTAP_CHANNEL_SDCCH8	0x08
-#define GSMTAP_CHANNEL_TCH_F	0x09	/* Actually, it's FACCH/F (signaling) */
-#define GSMTAP_CHANNEL_TCH_H	0x0a	/* Actually, it's FACCH/H (signaling) */
+#define GSMTAP_CHANNEL_FACCH_F	0x09	/* Actually, it's FACCH/F (signaling) */
+#define GSMTAP_CHANNEL_FACCH_H	0x0a	/* Actually, it's FACCH/H (signaling) */
 #define GSMTAP_CHANNEL_PACCH	0x0b
 #define GSMTAP_CHANNEL_CBCH52	0x0c
 #define GSMTAP_CHANNEL_PDTCH	0x0d
@@ -91,7 +91,10 @@
 #define GSMTAP_CHANNEL_PDCH	GSMTAP_CHANNEL_PDTCH
 #define GSMTAP_CHANNEL_PTCCH	0x0e
 #define GSMTAP_CHANNEL_CBCH51	0x0f
-#define GSMTAP_CHANNEL_VOICE	0x10	/* voice codec payload (HR/FR/EFR/AMR) */
+#define GSMTAP_CHANNEL_VOICE_F	0x10	/* voice codec payload (FR/EFR/AMR) */
+#define GSMTAP_CHANNEL_VOICE_H	0x11	/* voice codec payload (HR/AMR) */
+#define GSMTAP_CHANNEL_TCH_F	GSMTAP_CHANNEL_FACCH_F	/* We used the wrong naming in 2008 when we were young */
+#define GSMTAP_CHANNEL_TCH_H	GSMTAP_CHANNEL_FACCH_H	/* We used the wrong naming in 2008 when we were young */
 
 /* GPRS Coding Scheme CS1..4 */
 #define GSMTAP_GPRS_CS_BASE	0x20
diff --git a/include/osmocom/core/gsmtap_util.h b/include/osmocom/core/gsmtap_util.h
index f8a12a6..d583401 100644
--- a/include/osmocom/core/gsmtap_util.h
+++ b/include/osmocom/core/gsmtap_util.h
@@ -8,7 +8,11 @@
  *  @{
  * \file gsmtap_util.h */
 
+uint8_t chantype_rsl2gsmtap2(uint8_t rsl_chantype, uint8_t rsl_link_id, bool user_plane);
+
 uint8_t chantype_rsl2gsmtap(uint8_t rsl_chantype, uint8_t rsl_link_id);
+	OSMO_DEPRECATED("Use chantype_rsl2gsmtap2() instead")
+
 void chantype_gsmtap2rsl(uint8_t gsmtap_chantype, uint8_t *rsl_chantype, uint8_t *link_id);
 
 struct msgb *gsmtap_makemsg_ex(uint8_t type, uint16_t arfcn, uint8_t ts, uint8_t chan_type,