Im trying to modify the android source code in order to get the voice speech codec which is negotiated in each GSM call.
At the beginning I dived into source files like AudioPolicyManager and some others soc files of the Linux kernel. What you get when you write additional logs into those files is that speaker and microphone are always set to the same frecuency (the maximun I guess, 48000Hz in my case with the speakers). I am pretty sure that voice is not transmitted with such frecuency, telephony core negotiates a voice compression method before pushing it into the channel. I also tried to retreve it via AT commands with no success, even when there are some propietary commands which have no doc.
Finally I had a brief view to the RIL radio log (logcat -b radio) and I found that line:
I/RILQ ( 331): (0/331): RIL[0][event] qcril_qmi_voice_send_unsol_voice_speech_codec_info_htc: android_call_id = 1, codec = 7
I think this will make me sure which speech codec is negotiated before setting up a GSM call, however this source code is not open. It is a *.so compiled library (./vendor/htc/m8/proprietary/blobs/gsm/vendor/lib/libril-qc-qmi-1.so)
I have also disassembled (objdump) that in order to get which voice codec corresponds with 7 but I guess i will waste my time looking that assembly.
So my question is: Does anyone know if there any free open source libril.c in order to make me an idea which speech codes are corresponded with that integer values?. At this moment my telephony operator states that they support AMR-WB in 3g calls. If I found some source file in which codec 7 is corresponded with AMR-WB I will be almost sure that my telephony operator is right.
Note: Im not looking for HD-Voice over 4G, I already know how to check it out.
Thanks in advance