VoLTE Codec support » History » Version 3
Hoernchen, 05/24/2024 07:19 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 | 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 |
19 | 1 | Hoernchen | |
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 | 3 | Hoernchen | This block is _literally_ the whole file: |
46 | 1 | Hoernchen | |
47 | <pre> |
||
48 | |||
49 | [QIPCALL:ImsVoiceConfig] |
||
50 | |||
51 | #This config is required to enable Call end on RTP inactivity. |
||
52 | |||
53 | *CallEndonRTPInactivity = 1 |
||
54 | |||
55 | #This config is required to enable propagating the incoming CANCEL message's reason to UI |
||
56 | |||
57 | *propagateIncomingCancelReason = 0 |
||
58 | |||
59 | |||
60 | [QIPCALL:ImsVoiceSuppsConfig] |
||
61 | |||
62 | #This config is required to enable presentation of the call to |
||
63 | #the user when UE is already in two calls (active and held). |
||
64 | |||
65 | *presentThirdCalltoUser = 1 |
||
66 | |||
67 | |||
68 | [Ut:UtConfiguration] |
||
69 | |||
70 | #This config item specifies the error codes for which current SS request is attempted on CS but Ut is not permanently blocked |
||
71 | |||
72 | *performCSFBOnError = "404,408,range:500-600" |
||
73 | |||
74 | |||
75 | [QIPCALL:ImsVoWifiConfig] |
||
76 | |||
77 | *EnableOnDemandDPDCheckOnWiFiMidCallInactivityTimeOut = 1 |
||
78 | |||
79 | ############################ |
||
80 | ############################ |
||
81 | # new/added config below |
||
82 | |||
83 | |||
84 | # nb โ 8 kHz, wb โ 16 kHz, swb โ 32 kHz, fb โ 48 kHz. |
||
85 | # |
||
86 | #Possible INTEGER values for Bandwidth are as follows: |
||
87 | #0 --> BandWidth_NB |
||
88 | #1 --> BandWidth_WB |
||
89 | #2 --> BandWidth_SWB |
||
90 | #3 --> BandWidth_FB |
||
91 | #4 --> BandWidth_NB_WB # range from-to |
||
92 | #5 --> BandWidth_NB_SWB # range from-to |
||
93 | #6 --> BandWidth_NB_FWB # range from-to |
||
94 | #7 --> BandWidth_MAX |
||
95 | |||
96 | # bitrate bit pattern in DECIMAL: 5.9, 7.2, 8, 9.6, 13.2, 16.4, 24.4, 32, 48, 64, 96, 128 |
||
97 | # 4095 = 0b111111111111 = all bandwidths. |
||
98 | # NO GAPS BETWEEN BITRATES! only consecutive! |
||
99 | |||
100 | # make sure to check allowed bw+br config, i.e. evs 5.9 = only nv+wb |
||
101 | |||
102 | [QIPCALL:EVS_0] |
||
103 | *Bandwidth = 4 |
||
104 | *BitRate = 1 |
||
105 | # compact format, rtp full header = 1 |
||
106 | *hf_only = 1 |
||
107 | |||
108 | ## _xx suffix = RTP PT number, arbitrary not less than 96 |
||
109 | [QIPCALL:ImsMediaProfileConfig] |
||
110 | *AudioProfile1 = "EVS_0_126;AMR_0_104;AMR_1_102" |
||
111 | |||
112 | |||
113 | </pre> |
||
114 | |||
115 | put the file back/overwrite: |
||
116 | |||
117 | <pre> |
||
118 | work2/work via ๐ v3.12.3 (.venv) |
||
119 | โฏ qcsuper --efs-shell --adb |
||
120 | >>> put overideconfig efsprofiles |
||
121 | >>> ls efsprofiles |
||
122 | +--------------------------------------------------------------------------------------------------------------------------------+ |
||
123 | + File type | Special flags | File rights | File name | File size | Modification | Creation + |
||
124 | +--------------------------------------------------------------------------------------------------------------------------------+ |
||
125 | + Regular file (S_IFREG) | | rwxrwxrwx | 'overideconfig' | 1631 | 2024-05-21 11:36:37 | 2024-05-21 11:36:37 + |
||
126 | +--------------------------------------------------------------------------------------------------------------------------------+ |
||
127 | </pre> |
||
128 | |||
129 | reboot the phone, done. |
||
130 | Check SDP + rtmp stream for the id/negotiated codec. |