Project

General

Profile

VoLTE Codec support » History » Version 4

laforge, 05/24/2024 07:29 PM
cosmetics

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