Feature #3400
closedmobile: implement GAPK based audio capture / playback (via ALSA)
100%
Description
There is an initial implementation of GAPK based audio back-end in fixeria/audio.
The current implementation is limited, so TODO/FIXME:
- init both I/O processing chains when CHANNEL MODE MODIFY is received,
- deinit both I/O chains when a call is finished,
- take care about PHY specific frame formats (e.g. TI),
- optimize the application loop in order to improve performance,
- support other than GSM FR codecs (currently FR is hardcoded),
- compose codec support in Classmark depending on PHY capabilities and GAPK codec support.
Some points require a possibility to know the PHY features, such as:
- TCH frame forwarding capability,
- preferred TCH frame format,
- full rate / half rate channel support,
- AMR codec over FR / HR channel support.
Checklist
- Init both I/O processing chains when CHANNEL MODE MODIFY is received
- Support other than GSM FR codecs (currently FR is hardcoded)
- Deinit both I/O chains when a call is finished
- Take care about PHY specific frame formats (e.g. TI)
- Optimize the application loop in order to improve performance
- Investigate the problem with unpleasant audio effects
-
Get patches from
fixeria/audio
merged to master - libosmo-gapk should be optional dependency
Related issues
Updated by fixeria over 5 years ago
- Blocked by Feature #1461: include some version information / negotiation in the L1CTL protocol added
Updated by fixeria over 5 years ago
- Checklist item Init both I/O processing chains when CHANNEL MODE MODIFY is received added
- Checklist item Support other than GSM FR codecs (currently FR is hardcoded) added
- Checklist item Deinit both I/O chains when a call is finished added
- Checklist item Take care about PHY specific frame formats (e.g. TI) added
- Checklist item Optimize the application loop in order to improve performance added
- Checklist item Compose codec support in Classmark depending on PHY capabilities and GAPK codec support added
Updated by fixeria over 5 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 50
Updated by fixeria over 5 years ago
- Checklist item Optimize the application loop in order to improve performance set to Done
The performance problem is actually caused by blocking calls of src/pq_alsa.c/pq_cb_alsa_input()/snd_pcm_readi().
Setting both buffer and period size values seems to solve the issue. A separate issue needs to be created...
Updated by fixeria about 5 years ago
- Checklist item Investigate the problem with unpleasant audio effects added
Updated by laforge almost 4 years ago
- Related to Feature #4422: implement audio loop-back in mobile added
Updated by fixeria about 1 year ago
After rebasing fixeria/audio
on top of the recent master I got the audio working with Mot C1xx.
Still need to test with trxcon. Will update commit messages and submit patches to Gerrit soon.
Updated by fixeria about 1 year ago
- Checklist item Get patches from @fixeria/audio@ merged to master added
fixeria wrote in #note-10:
After rebasing
fixeria/audio
on top of the recent master I got the audio working with Mot C1xx.
Still need to test with trxcon. Will update commit messages and submit patches to Gerrit soon.
Commit messages updated, all patches submitted for review:
https://gerrit.osmocom.org/c/osmocom-bb/+/30324 layer23: l1ctl_tx_traffic_req(): cosmetic: drop dead code [NEW]
https://gerrit.osmocom.org/c/osmocom-bb/+/30325 mobile: add MNCC socket path to settings [NEW]
https://gerrit.osmocom.org/c/osmocom-bb/+/30326 mobile: add MNCC handler selection to settings [NEW]
https://gerrit.osmocom.org/c/osmocom-bb/+/30327 mobile: allow enabling/disabling handling of voice in the L1PHY [NEW]
https://gerrit.osmocom.org/c/osmocom-bb/+/30328 mobile: gsm48_rr_set_mode(): print name of channel mode [NEW]
https://gerrit.osmocom.org/c/osmocom-bb/+/30329 mobile: gsm48_rr_set_mode(): check rc of rsl_dec_chan_nr() [NEW]
https://gerrit.osmocom.org/c/osmocom-bb/+/30330 mobile: gsm48_rr_set_mode(): print error if ch_type is not TCH [NEW]
https://gerrit.osmocom.org/c/osmocom-bb/+/30331 mobile: gsm48_rr_set_mode(): fix copy-paste in comment [NEW]
https://gerrit.osmocom.org/c/osmocom-bb/+/30332 mobile: properly handle RR CHANNEL MODE MODIFY message [NEW]
https://gerrit.osmocom.org/c/osmocom-bb/+/30333 mobile: gsm48_rr_tx_voice(): drop TCH/F channel limitation [NEW]
https://gerrit.osmocom.org/c/osmocom-bb/+/30334 mobile: voice.h: use '#pragma once' include guard [NEW]
https://gerrit.osmocom.org/c/osmocom-bb/+/30335 mobile: voice.h: add missing forward declarations [NEW]
https://gerrit.osmocom.org/c/osmocom-bb/+/30336 mobile: split gsm_send_voice() -> gsm_send_voice_{msg,frame}() [NEW]
https://gerrit.osmocom.org/c/osmocom-bb/+/30337 mobile: integrate GAPK based audio (voice) I/O support [NEW]
I also force-pushed to https://cgit.osmocom.org/osmocom-bb/log/?h=fixeria/audio.
Updated by fixeria about 1 year ago
- Checklist item libosmo-gapk should be optional dependency added
Updated by fixeria about 1 year ago
- Checklist item Get patches from @fixeria/audio@ merged to master set to Done
- Checklist item libosmo-gapk should be optional dependency set to Done
- % Done changed from 50 to 60
All patches have been merged, so I removed https://cgit.osmocom.org/osmocom-bb/log/?h=fixeria/audio.
Updated by fixeria about 1 year ago
- Checklist item Deinit both I/O chains when a call is finished set to Done
- Checklist item Take care about PHY specific frame formats (e.g. TI) set to Done
- % Done changed from 60 to 80
https://gerrit.osmocom.org/c/osmocom-bb/+/30454 mobile: clean up GAPK I/O state on channel release [NEW]
https://gerrit.osmocom.org/c/osmocom-bb/+/30455 mobile: support RTP and TI specific TCH frame I/O formats [NEW]
Updated by fixeria about 1 year ago
- Checklist item AMR (AHS/AFS) support added
- Status changed from In Progress to Stalled
With a few additional patches applied:
https://gerrit.osmocom.org/c/osmocom-bb/+/30483 mobile: do not enforce RTP format for Uplink TCH frames [NEW]
https://gerrit.osmocom.org/c/osmocom-bb/+/30484 firmware: remove TCH/F specific bit re-ordering [NEW]
https://gerrit.osmocom.org/c/gapk/+/30482 libgsmhr/fetch_sources.py: convert to Python 3
I have successfully tested GAPK based audio I/O with both trxcon and a Mot C1xx phone. The non-adaptive codecs (HR, FR, EFR) are all confirmed to work. AMR implementation is currently incomplete in trxcon, and is completely missing in the layer1 firmware (needs DSP patches); adding a checklist item for this. I think at the current state it qualifies as a working voice call functionality, so I am stopping to work on this ticket and setting it to Stalled.
Updated by laforge about 1 year ago
On Mon, Dec 05, 2022 at 10:57:58PM +0000, fixeria wrote:
I have successfully tested GAPK based audio I/O with both trxcon and a Mot C1xx phone. The non-adaptive codecs (HR, FR, EFR) are all confirmed to work. AMR implementation is currently incomplete in trxcon, and is completely missing in the layer1 firmware (needs DSP patches); adding a checklist item for this. I think at the current state it qualifies as a working voice call functionality, so I am stopping to work on this ticket and setting it to Stalled.
IMHO it makes mor sence to resolve this ticket once all patches for non-AMR are merged. Add a new issue for
AMR support, with no assignee and low priority.
Updated by fixeria 12 months ago
- Related to Feature #5812: mobile: missing AMR support added
Updated by fixeria 12 months ago
- Related to Feature #5815: mobile: compose Bearer Capability IE depending on PHY capabilities and GAPK codec support added
Updated by fixeria 12 months ago
- Blocked by deleted (Feature #1461: include some version information / negotiation in the L1CTL protocol)