第一次或恢复出厂设置开机铃声无声。
原因为Audio音量初始化工作未完成音量为零。
[SOLUTION]
/frameworks/av/services/audioflinger/Threads.cpp
AudioFlinger::PlaybackThread::mixer_state AudioFlinger::MixerThread::prepareTracks_l(
Vector< sp<Track> > *tracksToRemove)
{
.....
} else {
// force no volume ramp when volume controller was just disabled or removed
// from effect chain to avoid volume spike
if (track->mHasVolumeController) {
param = AudioMixer::VOLUME;
}
track->mHasVolumeController = false;
}
//add begin
char mvalue[PROPERTY_VALUE_MAX] = { 1 };
property_get("service.bootanim.exit", mvalue, "");
if (strcmp(mvalue,"0") == 0){
ALOGE("bootanim volume setting");
vlf = 0.25f;
vrf = 0.25f;
}
//add end
}