Project

General

Profile

Actions

VoLTE Codec support » History » Revision 1

Revision 1/4 | Next »
Hoernchen, 05/24/2024 07:14 PM


VoLTE Codec support

Adding/changing the supported codecs is fairly straightforward as lon as 1) the phone is rooted/unlocked (magisk, ...) 2) the phone uses a qc modem.
Steps to reproduce for a Pixel 4 5G (bramble) running Graphene os/Android 14:

(see https://band.radio/diag)

> adb shell "su -c 'resetprop ro.bootmode usbradio && resetprop ro.build.type userdebug && setprop sys.usb.config diag,diag_mdm,adb'" 
❯ adb shell "su -c getprop | grep -e ro.bootmode -e ro.build.type -e sys.usb.config"                                               
[persist.sys.usb.config]: [adb]
[ro.bootmode]: [usbradio]
[ro.build.type]: [userdebug]
[sys.usb.config]: [diag,diag_mdm,adb]
[sys.usb.configfs]: [2]


Now change the USB mode on the phone (physically, by touching it) from charging to something else like file trasnfer, or tethering, to apply the new sub config

This changes the usb vid/pid, make sure your access permissionss (udev) still work

❯ lsusb
Bus 001 Device 003: ID 18d1:4ee7 Google Inc. Nexus/Pixel Device (charging + debug)

afterwards

❯ lsusb
Bus 001 Device 004: ID 05c6:902d Qualcomm, Inc. Pixel 4a (5G)

install qcsuper, it should "just work" to pull the overideconfig file

work2/work via 🐍 v3.12.3 (.venv) 
❯ qcsuper --efs-shell --adb
>>> get efsprofiles/overideconfig
>>> exit

Add your codec config as below, AMR is already defined somewhere else, so this just adds EVS


[QIPCALL:ImsVoiceConfig]

#This config is required to enable Call end on RTP inactivity.

*CallEndonRTPInactivity = 1

#This config is required to enable propagating the incoming CANCEL message's reason to UI

*propagateIncomingCancelReason = 0

[QIPCALL:ImsVoiceSuppsConfig]

#This config is required to enable presentation of the call to
#the user when UE is already in two calls (active and held).

*presentThirdCalltoUser = 1

[Ut:UtConfiguration]

#This config item specifies the error codes for which current SS request is attempted on CS but Ut is not permanently blocked

*performCSFBOnError = "404,408,range:500-600" 

[QIPCALL:ImsVoWifiConfig]

*EnableOnDemandDPDCheckOnWiFiMidCallInactivityTimeOut = 1

############################
############################
# new/added config below

# nb – 8 kHz, wb – 16 kHz, swb – 32 kHz, fb – 48 kHz. 
#
#Possible INTEGER values for Bandwidth are as follows:
#0 --> BandWidth_NB
#1 --> BandWidth_WB
#2 --> BandWidth_SWB
#3 --> BandWidth_FB
#4 --> BandWidth_NB_WB # range from-to
#5 --> BandWidth_NB_SWB # range from-to
#6 --> BandWidth_NB_FWB # range from-to
#7 --> BandWidth_MAX

# bitrate bit pattern in DECIMAL:  5.9, 7.2, 8, 9.6, 13.2, 16.4, 24.4, 32, 48, 64, 96, 128
# 4095 = 0b111111111111 = all bandwidths.
# NO GAPS BETWEEN BITRATES! only consecutive!

# make sure to check allowed bw+br config, i.e. evs 5.9 = only nv+wb

[QIPCALL:EVS_0]
*Bandwidth = 4
*BitRate = 1
# compact format, rtp full header = 1
*hf_only = 1

## _xx suffix = RTP PT number, arbitrary not less than 96
[QIPCALL:ImsMediaProfileConfig]
*AudioProfile1 = "EVS_0_126;AMR_0_104;AMR_1_102" 

put the file back/overwrite:

work2/work via 🐍 v3.12.3 (.venv) 
❯ qcsuper --efs-shell --adb
>>> put overideconfig efsprofiles
>>> ls efsprofiles
+--------------------------------------------------------------------------------------------------------------------------------+
+ File type              | Special flags | File rights | File name       | File size | Modification        | Creation            +
+--------------------------------------------------------------------------------------------------------------------------------+
+ Regular file (S_IFREG) |               | rwxrwxrwx   | 'overideconfig' | 1631      | 2024-05-21 11:36:37 | 2024-05-21 11:36:37 +
+--------------------------------------------------------------------------------------------------------------------------------+

reboot the phone, done.
Check SDP + rtmp stream for the id/negotiated codec.

Updated by Hoernchen about 1 month ago · 1 revisions

Add picture from clipboard (Maximum size: 48.8 MB)