icfans

呼出电话铃声会自动从Receiver转到Speaker

0
阅读(90) 评论(0)

[DESCRIPTION]

呼出电话铃声会自动从Receiver转到Speaker该问题与运营商有关,出现概率很低。呼出电话铃声默认应由运营商播放

,本地听到嘟嘟嘟得声音或者是对方设置的彩铃,出现该问题是由于运营商没有播放呼出铃声,而让手机播放,手机方

面默认设置的device是loudspeaker,导致声音从外放出来。

[SOLUTION]来自半导体社区

修改srv_prof_play_tone_with_id()这个函数如下:

srv_prof_play_tone_with_id()

{

......

srv_prof_play_audio_info_init(&play_info, tone_type);

//添加开始

if(audio_id == TONE_RINGING_CALL_GSM)//To Make sure the modification only affect the outgoing

tone

{

switch(tone_type)

{

case SRV_PROF_TONE_INCOMING_CALL:

case SRV_PROF_TONE_INCOMING_CALL_CARD2:

case SRV_PROF_TONE_INCOMING_CALL_CARD3:

case SRV_PROF_TONE_INCOMING_CALL_CARD4:

{

if(mdi_audio_get_audio_mode() ==

AUD_MODE_LOUDSPK)

play_info.aud_path= MDI_DEVICE_SPEAKER_BOTH;

else if(mdi_audio_get_audio_mode() ==

AUD_MODE_HEADSET)

play_info.aud_path=

MDI_DEVICE_SPEAKER2;

else

play_info.aud_path= MDI_DEVICE_SPEAKER;

break;

}

default:

break;

}

}

//添加结束

......

}