GAPK (GSM Audio Pocket Knife) back-end intergation



3 issues   (0 closed — 3 open)

GAPK Integration

GAPK (GSM Audio Pocket Knife) is a FFmpeg like project focused on GSM related codecs (HR/FR/EFR/AMR) and various formats. Since the libosmogapk was introduced, it has become possible to link OsmocomBB against it and use its API for audio processing, i.e. for both voice capture and playback.

The initial working implementation can be found in a separate branch (fixeria/audio).

PHY support

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 behavior 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.
Issues by


Add picture from clipboard (Maximum size: 48.8 MB)