简体   繁体   中英

Android RIL speech_codec_info

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

    CODEC_QCELP13K = 0x0001
    CODEC_EVRC = 0x0002
    CODEC_EVRC_B = 0x0003
    CODEC_EVRC_WB = 0x0004
    CODEC_EVRC_NW = 0x0005
    CODEC_AMR_NB = 0x0006
    CODEC_AMR_WB = 0x0007
    CODEC_GSM_EFR = 0x0008
    CODEC_GSM_FR = 0x0009
    CODEC_GSM_HR = 0x000A
    CODEC_G711U = 0x000B
    CODEC_G723 = 0x000C
    CODEC_G711A = 0x000D
    CODEC_G722 = 0x000E
    CODEC_G711AB = 0x000F
    CODEC_G729 = 0x0010
    CODEC_EVS_NB = 0x0011
    CODEC_EVS_WB = 0x0012
    CODEC_EVS_SWB = 0x0013
    CODEC_EVS_FB = 0x0014

As Chus Muñoz mentioned, 7 represents AMR wideband

To Whom It May Concern.

I strongly confirm that voice_codec=7 is the AMR_WB codec over 3G. I bought a sierra wireless in order to get the codec via AT command and it really confirms this. This solution applies for all msm8974 series

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM