语音编码 Codec 配置说明

codec支持情况,分为2/3G 和ims.

先来说GSM/UMTS

支持情况(参考协议26103 6.2):

 

查看log支持情况(参考协议24008 5.2.1.11)

5.2.1.11          Speech Codec Selection

For speech calls, a mobile station implementing this version of the protocol shall indicate all codecs that it supports for UTRAN in the Supported Codec List information element. Codecs for GERAN shall be indicated in the Bearer Capability information element, if this information element is included.

 

 

首先需要明白如何查看UE当前的codec配置, 本文Log为M*和Q*平台相关log.

2G网络下查看Codec支持情况:

 

3G 网络下查看codec 支持情况

M*平台:

Q*平台:

Q*平台已经在SETUP消息中,supp_codecs中,支持情况可以根据协议来确认bit位所代码的编码方式,也可以直接使用3gpp工具解析,解析出来和M*平台类似。

supp_codecs
   num_codecs = 2 (0x2)
   codecs[0]
   sysid = 4 (0x4)  //UMTS
   length = 2 (0x2)
   bitmap[0] = 96 (0x60) //1100000 support UMTS AMR; UMTS AMR2
   bitmap[1] = 0 (0x0)  //000, not support UTMS AMR WB
   codecs[1]
   sysid = 0 (0x0) //GSM
   length = 2 (0x2)
   bitmap[0] = 31 (0x1f)
   bitmap[1] = 2 (0x2)
protocol 26103 : as follow:
6.2        Codec Bitmap
The Codec Types are coded in the first and second octet of the Codec List Bitmap as follows:

8

7

6

5

4

3

2

bit 1

 

TDMA EFR

UMTS AMR 2

UMTS AMR

HR AMR

FR AMR

GSM EFR

GSM HR

GSM FR

Octet 1

bit 16

15

14

13

12

11

10

bit 9

 

(reserved)

(reserved)

OHR AMR-WB

OFR AMR-WB

OHR AMR

UMTS AMR-WB

FR
AMR-WB

PDC EFR

Octet 2

总结一下,2G和3G下的支持情况可以查看3gpp协议:TS 26.103     Speech codec list for GSM and UMTS

 

IMS 下的支持情况(参考协议26114  5.2):

也就是说支持AMR, AMR WB ,EVS

log snippet:

   在SIP INVITE消息中携带支持情况:

这里简单说一下AMR-WB与EVS:

AMR-WB有9种编码速率,在SDP中a line中通过mode-set来表示速率,主要INVITE的SDP中如果不带mode-set 

表示支持所有的AMR-WB的编码速率:

EVS分为两种模式:

        EVS AMR-WB IO mode,该模式为互操作模式,可以作为AMR WB编码解码器的替代,这种模式的速率等同于上面提到的AMR WB.

       EVS Primary Mode 无法与AMR -WB 互操作。

解释一下四种采用带宽: NB , WB , SWB FB

NB : narrowband 窄带

WB: widthband 宽带

SWB supperwidthband :超宽带

FB: Fullband 全带

相关EVS协议: 26.441 ,26.445

 

我们一般需要客制化AMR WB和EVS的支持,其他codec默认是支持的如PCM,HR等。

Q* 平台:

IMS:

   在JO3.1之后的modem, 引入了overrideconfig,IMS下的codec直接修改overrideconfig文件中的AudioProfile1 标签

之前的版本就需要修改两个NV:

NV item - 73690
Full path name - /nv/item_files/ims/qipcall_audio_codec_list

这个NV设置支持的codec,如果设置了EVS,则需要修改如下NV:

NV item -- 73705
Full path name - /nv/item_files/ims/qipcall_evs_codec_config

2G/3G:

NV6850:octet->XXXXABCD
A - Controls WCDMA AMR WB
B - Controls GSM HR AMR
C - Controls GSM AMR WB
D - Controls GSM AMR NB
0 for A, B, C, and D bits => corresponding AMR codec is NOT supported
1 for A, B, C, and D bits => corresponding AMR codec is supported

 

M* 平台:

93modem适用:

   AMR-WB 的客制化:sbp_feature.def

   EVS的客制化: custom_imc_config.c 

支持EVS需要将如下打开:
 nvram_ims_profile_ptr->ua_config.evs_support                        = 1;
 nvram_ims_profile_ptr->ua_config.UA_call_codec_order1               = 17;
 nvram_ims_profile_ptr->ua_config.UA_call_codec_order2               = 2;
 nvram_ims_profile_ptr->ua_config.UA_call_codec_order3               = 1;

EVS的bandwidth:

默认如下, 宏定义在modem/mcu/make/projects下对于的项目中定义
#if defined(__EVS_MAX_BW_FB__)
    ua->bw_end = 3;
    ua->bw_send_end = 3;
    ua->bw_recv_end = 3;
#elif defined(__EVS_MAX_BW_SWB__)
    ua->bw_end = 2;
    ua->bw_send_end = 2;
    ua->bw_recv_end = 2;
#else
    /* __EVS_MAX_BW_WB__ */
    ua->bw_end = 1;
    ua->bw_send_end = 1;
    ua->bw_recv_end = 1;

 

video codec (特指IMS call的,由于TDSCDMA也支持video call ,这里不谈)

参考协议26114:

  • 3
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值