Commit Graph

11 Commits

Author SHA1 Message Date
Vadim Yanitskiy f12b17dffb mobile: fix GAPK I/O producing too many UL frames
GAPK I/O is currently generating too many UL voice frames, causing
Tx queue overflow in the L1 PHY.  Change the logic to make DL voice
frames drive the Uplink processing chain, like we do for CSD.

Change-Id: I3a7fa223cb592acd5b850819e0682c9c8f81e9d1
2024-02-06 19:15:09 +07:00
Vadim Yanitskiy 0829246a22 mobile: rename tch_send_voice_{msg,frame}() functions
These functions can also be used for sending data frames (CSD).

Change-Id: Ib55b4405847f2efb583f3a379ff4b6929d6d6c5b
Related: OS#4396
2024-01-18 03:54:15 +07:00
Vadim Yanitskiy 129d0ea802 mobile: init/deinit GAPK I/O based on CC transaction events
Change-Id: I28f87f6a6de673611aa02a24e8985aee23d4498b
Related: OS#4396
2024-01-18 03:51:35 +07:00
Vadim Yanitskiy 4038d3e42f mobile: cosmetic: use consistent naming for gapk_io_state
Change-Id: I96a995bdf20c95a15271de68fbf434e101047313
Related: OS#4396
2024-01-17 22:52:41 +07:00
Vadim Yanitskiy ca183f79d8 mobile: fix segfault on empty TRAFFIC.ind
The L1 PHY may emit empty TRAFFIC.ind in case of decoding errors.
Abort execution of pq_audio_sink early, otherwise we hit an assert.

Change-Id: Ice11b72ddfd51fbfb17a4c609c664b86a8f69591
2024-01-16 01:36:44 +07:00
Vadim Yanitskiy efe2c7b7bd mobile: rename voice.[ch] to tch.[ch]
Also take a chance to change the 'tch_' prefix for all functions.

Change-Id: I05e1ae777add73672db61565c77c68d8ab2b08f0
Related: OS#4396
2023-11-03 13:34:02 +07:00
Vadim Yanitskiy e80d302255 mobile: clarify TCH I/O {handler,format} naming
Before we add handling of TCH I/O for data calls, let's rename the
existing voice related symbols and struct fields to have 'voice'
in their names.

Change-Id: If6c799d11e225ad00ca5da5ae63dca20568a0ce0
Related: OS#4396
2023-11-03 13:23:06 +07:00
Pau Espin 1953a21515 layer23: Move osmocom_ms to a separate file
This way we can extend its API and contents more easily,
and keep most of it together in one place.

Change-Id: Icb4891cc1e4a0ecb5f09cb8a84b0ebe1b91a46b8
2023-01-16 10:30:12 +01:00
Vadim Yanitskiy cad5af50cc mobile: gapk_io_init_ms(): fix 'phy_fmt' may be used uninitialized
Change-Id: I193de6e0e831aa4201f5edec80e40abc43f4a861
2023-01-02 20:41:41 +07:00
Vadim Yanitskiy 12dd3af2a0 mobile: support RTP and TI specific TCH frame I/O formats
Change-Id: Ib41f8c39c82c243b62a76433f59a2b98e175f894
Related: OS#3400
2022-12-06 06:28:56 +07:00
Vadim Yanitskiy df7fa3e296 mobile: integrate GAPK based audio (voice) I/O support
This change introduces a new feature to the mobile application -
audio I/O support, which allows the user to speak right from the
host side running mobile through its ordinary mic and speakers.

The audio I/O is based on libosmogapk [1][2], which in its turn
uses the ALSA sound system for the playback and capture.  This
is a new optional dependency of mobile, which is automatically
picked up if available during the build configuration.  Whether
to depend on it or not can be controlled using '--with-gapk-io'.

The API offered by libosmogapk implies to use the processing chains,
which generally consist of a source block, several processing blocks,
and a sink block.  The mobile app implements the following chains:

  - 'pq_audio_source' (voice capture -> frame encoding),
  - 'pq_audio_sink' (frame decoding -> voice playback).

both taking/storing TCH frames from/to the following two buffers:

  - 'tch_fb_ul' - a buffer for to be played DL TCH frames,
  - 'tch_fb_dl' - a buffer for encoded UL TCH frames.

The buffers are served by a new function gapk_io_dequeue().

[1] https://gitea.osmocom.org/osmocom/gapk/
[1] https://osmocom.org/projects/gapk

Change-Id: Ib86b0746606c191573cc773f01172afbb52f33a9
Related: OS#5599
2022-12-01 01:05:38 +07:00