GAPK (GSM Audio Pocket Knife) is a FFmpeg like project focused on GSM related codecs (HR/FR/EFR/AMR) and formats. Since the libosmogapk was introduced, it becomes possible to link OsmocomBB against it and use its API for audio processing, i.e. for both voice capture and playback.
Some initial work around this was already done, and has been published in a separate branch (fixeria/audio).
Both trxcon and VIRT-PHY do forward TCH frames to the higher layers (e.g. mobile) by default, while Calypso-based phones can handle them either within DSP (both regular phone's mic and speaker are involved), or also forward them via L1CTL. The forwarding behaviour can be enabled using L1CTL_TCH_MODE_REQ message and its AUDIO_TX_TRAFFIC_REQ | AUDIO_RX_TRAFFIC_IND flags.
Why GAPK integration is important?¶
Well, at the moment the state of voice support in the higher layers, especially in the mobile application, is limited. There is incomplete implementation of MNCC-socket handling, including forwarding of TCH frames, but it is very limited (for example, only TCH FR codec is supported).
With GAPK it is pretty easy to fill the gap, and implement audio / voice processing back-end for mobile application. In particular, back-end implementation assumes the following features:
- voice capture and playback (via ALSA),
- frame coding for GSM specific codecs,
- PHY specific format (e.g. TI) handling,
- ECU (Error Concealment Unit),
- RTP support.