diff options
author | David Timber <dxdt@dev.snart.me> | 2025-05-31 16:07:32 +0900 |
---|---|---|
committer | David Timber <dxdt@dev.snart.me> | 2025-05-31 16:07:32 +0900 |
commit | 1d20711b334c991765cf36adda375b3416d835ef (patch) | |
tree | c38c02b6648bb48ea427336fac009e31bf4e7973 | |
parent | 37f17d4b5859d8a37d1a9350abc9fcb15917de07 (diff) |
SIM7600: return call audio format
-rw-r--r-- | src/plugins/simtech/mm-shared-simtech.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/plugins/simtech/mm-shared-simtech.c b/src/plugins/simtech/mm-shared-simtech.c index 1e651ecb..6a42403c 100644 --- a/src/plugins/simtech/mm-shared-simtech.c +++ b/src/plugins/simtech/mm-shared-simtech.c @@ -1051,8 +1051,18 @@ mm_shared_simtech_voice_setup_in_call_audio_channel_finish (MMIfaceModemVoice * if (!g_task_propagate_boolean (G_TASK (res), error)) return FALSE; - if (audio_format) - *audio_format = NULL; + if (audio_format) { + if (priv->cpcmreg_support == FEATURE_SUPPORTED) { + const guint rate = priv->cpcmfrm_support == FEATURE_SUPPORTED ? 16000 : 8000; + + *audio_format = mm_call_audio_format_new (); + mm_call_audio_format_set_encoding (*audio_format, "pcm"); + mm_call_audio_format_set_resolution (*audio_format, "s16le"); + mm_call_audio_format_set_rate (*audio_format, rate); + } + else + *audio_format = NULL; + } if (audio_port) { if (priv->cpcmreg_support == FEATURE_SUPPORTED) |