Project

General

Profile

VoLTE Codec support » History » Version 1

Hoernchen, 05/24/2024 07:14 PM

1 1 Hoernchen
h1. VoLTE Codec support
2
3
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.
4
Steps to reproduce for a Pixel 4 5G (bramble) running Graphene os/Android 14:
5
6
7
(see https://band.radio/diag)
8
<pre>
9
> adb shell "su -c 'resetprop ro.bootmode usbradio && resetprop ro.build.type userdebug && setprop sys.usb.config diag,diag_mdm,adb'"
10
โฏ adb shell "su -c getprop | grep -e ro.bootmode -e ro.build.type -e sys.usb.config"                                               
11
[persist.sys.usb.config]: [adb]
12
[ro.bootmode]: [usbradio]
13
[ro.build.type]: [userdebug]
14
[sys.usb.config]: [diag,diag_mdm,adb]
15
[sys.usb.configfs]: [2]
16
17
</pre>
18
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
19
20
21
This changes the usb vid/pid, make sure your access permissionss (udev) still work
22
<pre>
23
โฏ lsusb
24
Bus 001 Device 003: ID 18d1:4ee7 Google Inc. Nexus/Pixel Device (charging + debug)
25
</pre>
26
27
afterwards
28
<pre>
29
โฏ lsusb
30
Bus 001 Device 004: ID 05c6:902d Qualcomm, Inc. Pixel 4a (5G)
31
</pre>
32
33
34
install "qcsuper":https://github.com/P1sec/QCSuper, it should "just work" to pull the overideconfig file
35
36
37
<pre>
38
work2/work via ๐Ÿ v3.12.3 (.venv) 
39
โฏ qcsuper --efs-shell --adb
40
>>> get efsprofiles/overideconfig
41
>>> exit
42
</pre>
43
44
Add your codec config as below, AMR is already defined somewhere else, so this just adds EVS
45
46
<pre>
47
48
[QIPCALL:ImsVoiceConfig]
49
50
#This config is required to enable Call end on RTP inactivity.
51
52
*CallEndonRTPInactivity = 1
53
54
#This config is required to enable propagating the incoming CANCEL message's reason to UI
55
56
*propagateIncomingCancelReason = 0
57
58
59
[QIPCALL:ImsVoiceSuppsConfig]
60
61
#This config is required to enable presentation of the call to
62
#the user when UE is already in two calls (active and held).
63
64
*presentThirdCalltoUser = 1
65
66
67
[Ut:UtConfiguration]
68
69
#This config item specifies the error codes for which current SS request is attempted on CS but Ut is not permanently blocked
70
71
*performCSFBOnError = "404,408,range:500-600"
72
73
74
[QIPCALL:ImsVoWifiConfig]
75
76
*EnableOnDemandDPDCheckOnWiFiMidCallInactivityTimeOut = 1
77
78
############################
79
############################
80
# new/added config below
81
82
83
# nb โ€“ 8 kHz, wb โ€“ 16 kHz, swb โ€“ 32 kHz, fb โ€“ 48 kHz. 
84
#
85
#Possible INTEGER values for Bandwidth are as follows:
86
#0 --> BandWidth_NB
87
#1 --> BandWidth_WB
88
#2 --> BandWidth_SWB
89
#3 --> BandWidth_FB
90
#4 --> BandWidth_NB_WB # range from-to
91
#5 --> BandWidth_NB_SWB # range from-to
92
#6 --> BandWidth_NB_FWB # range from-to
93
#7 --> BandWidth_MAX
94
95
# bitrate bit pattern in DECIMAL:  5.9, 7.2, 8, 9.6, 13.2, 16.4, 24.4, 32, 48, 64, 96, 128
96
# 4095 = 0b111111111111 = all bandwidths.
97
# NO GAPS BETWEEN BITRATES! only consecutive!
98
99
# make sure to check allowed bw+br config, i.e. evs 5.9 = only nv+wb
100
101
[QIPCALL:EVS_0]
102
*Bandwidth = 4
103
*BitRate = 1
104
# compact format, rtp full header = 1
105
*hf_only = 1
106
107
## _xx suffix = RTP PT number, arbitrary not less than 96
108
[QIPCALL:ImsMediaProfileConfig]
109
*AudioProfile1 = "EVS_0_126;AMR_0_104;AMR_1_102"
110
111
112
</pre>
113
114
put the file back/overwrite:
115
116
<pre>
117
work2/work via ๐Ÿ v3.12.3 (.venv) 
118
โฏ qcsuper --efs-shell --adb
119
>>> put overideconfig efsprofiles
120
>>> ls efsprofiles
121
+--------------------------------------------------------------------------------------------------------------------------------+
122
+ File type              | Special flags | File rights | File name       | File size | Modification        | Creation            +
123
+--------------------------------------------------------------------------------------------------------------------------------+
124
+ Regular file (S_IFREG) |               | rwxrwxrwx   | 'overideconfig' | 1631      | 2024-05-21 11:36:37 | 2024-05-21 11:36:37 +
125
+--------------------------------------------------------------------------------------------------------------------------------+
126
</pre>
127
128
reboot the phone, done.
129
Check SDP + rtmp stream for the id/negotiated codec.
Add picture from clipboard (Maximum size: 48.8 MB)