/framework/av
- 9c158b2 [8937][Audio][NA][Spec]Update ICEsound Version.
- 243e4b0 [Scorpio][Audio][NA][spec]ICEpower porting
1
--- a/services/audioflinger/AudioFlinger.h
+++ b/services/audioflinger/AudioFlinger.h
@@ -95,7 +95,7 @@
define ICESOUNDLOGTAG "ICEsound"
define ICESOUNDVERSION "1.0"
-#define ICESOUNDVERSIONSTRING "ICEsoundVersion audioflinger-l: " ICESOUNDVERSION
+#define ICESOUNDVERSIONSTRING "ICEsoundVersion audioflinger-Marshmallow: " ICESOUNDVERS
define AUDIO_SESSION_OUTPUT_FASTMIX_START -1000
define AUDIO_SESSION_OUTPUT_FASTMIX_END -1100
2/home/workspace/echo/frameworks/av/services/audioflinger/AudioFlinger.cpp
/home/workspace/echo/frameworks/av/services/audioflinger/AudioFlinger.h
ICEpower porting
http://pmd.asus.com:8180/display/AMAX/AudioWizard+Porting+Guide#AudioWizardPortingGuide-IcePower.1
ap会定期更新porting guide。
文件说明:
AMAX-AudioWizardPortingGuide-101214.pdf---ap提供的porting guide
libicepower_1.13.7z---厂商release的so
ICESound for ODM.rar---ICESound介绍已经tunning文档
基本思路:AudioWizard ap收到device开机成功后,会注册ICESound effect,加载libicepower_arm.so以及icesoundpresets.def
porting需做如下事情:
1.在AudioFlinger中打上厂商提供的patch。
见icepower_patch/frameworks_av/0009-A500KL-Audio-NA-spec-audio-icepower-porting-of-v1.0-.patch
这个 比较复杂
- media/libeffects/data/audio_effects.conf 再audio_effects.conf中 加入libicepower.so文件信息地址
- services/audioflinger/Android.mk 在MK文件中加入编译信息 IceEffectAudioStreamOutSink.cpp
LOCAL_SRC_FILES:=
Threads.cpp
Tracks.cpp
Effects.cpp
++ IceEffectAudioStreamOutSink.cpp
AudioMixer.cpp.arm
PatchPanel.cpp
- services/audioflinger/AudioFlinger.cpp 加入patch
- 在AudioFlinger::dump function中加入 purgeFastMixDeathList() +++ 清空保护的列表
#ifdef ICESOUND_PROCESSING
void AudioFlinger::purgeFastMixDeathList(void) //净化列表
{
// mFastMixEffectDeathList is protected by mLock, but the effect destructors
// will cause a deadlock if called with mLock held, so move the effect handles
// to a local list, and empty the local list without holding mLock.
Vector< sp > localDeathList;
{
Mutex::Autolock _l(mFastMixDeathListLock);
ALOGVICE("in purgeFastMixDeathList, list size=%d", mFastMixEffectDeathList.size());
while (mFastMixEffectDeathList.size() > 0) {
sp e = mFastMixEffectDeathList.itemAt(0);
mFastMixEffectDeathList.removeAt(0);
localDeathList.push(e);
ALOGVICE("- Removing fastmix effect handle, id=%d", (int)e->id());
}
}
while (localDeathList.size() > 0) {
localDeathList.removeAt(0);
}
}
4 . AudioFlinger::createTrack() 中加入判断 ,!isFastMixEffect(*sessionId) 不是特效的时候才执行下面代码。
5 . AudioFlinger::removeNotificationClient(pid_t pid) 中加入代码移除特效
6 。 AudioFlinger::createEffect 中加入 purgeFastMixDeathList() 清空特效列表
加入特效 ,为输出的线程加入特效
7 。 下面是对 头文件的修改,包括
- /services/audioflinger/PlaybackTracks.h
- /services/audioflinger/IceEffectAudioStreamOutSink.h
- IceEffectAudioStreamOutSink.cpp
- /services/audioflinger/Effects.h
- /services/audioflinger/Effects.cpp
- /services/audioflinger/AudioFlinger.h
** 最终的是对** /services/audioflinger/AudioFlinger.cpp文件的修改
内容
2.包入libicepower_arm.so以及icesoundpresets.def
见icepower_patch/** device_qcom_msm8226 **/0006-A500KL-Audio-NA-spec-audio-icepower-porting-of-v1.0-.patch
将这两个考入对应的文件夹下
libicepower.so so文件
icesoundpresets.def 参数,ee提供
init.asus.maxxaudio.sh 脚本 代码如下
++ vendor/asus/icepower/libicepower.so:system/lib/soundfx/libicepower.so
++ vendor/asus/icepower/icesoundpresets.def:system/etc/icesoundpresets.def
++ system/core/rootdir/etc/init.asus.maxxaudio.sh:system/etc/init.asus.maxxaudio.sh
icepower_patch/** vendor_asus **/0004-A500KL-Audio-NA-spec-audio-icepower-porting-of-v1.0-.patch
ee给的参数 icepower/icesoundpresets.def 配置
icepower_patch/** vendor_asus **/0005-A500KL-Audio-NA-spec-modify-icepower-service-init-co.patch
/A500KL/rootdir/init.asus.user.rc
为ICEpower增加对应的persist属性
[Audio] Add persist property for icepower
+service maxx_mode_switch /system/bin/sh /system/etc/init.asus.maxxaudio.sh
需要注意的事情:
1.icesoundpresets.def参数文件由EE提供,我们只需要验证效果即可。
2.icesoundconfig.def文件用于enable icesound log。libicepowerdebuglevel 1
3.在AudioWizard ap还没导入时,可以安装ICEexample.apk ICEsoundService.apk来检查功能是否正常。
4.在参数还未调整时,用testMp3文件夹下的音频文件检查效果是否明显。
5.PlaybackTracks.h文件中的isNoEffectStreamType()接口有说明哪些stream走ICESound,可以根据实际需要添加。
ifdef ICESOUND_PROCESSING
bool isNoEffectStreamType() const {
return (AUDIO_STREAM_VOICE_CALL == mStreamType)
|| (AUDIO_STREAM_RING == mStreamType)
|| (AUDIO_STREAM_ALARM == mStreamType)
|| (AUDIO_STREAM_NOTIFICATION == mStreamType)
|| (AUDIO_STREAM_ENFORCED_AUDIBLE == mStreamType);
}
endif
6.BT不支援ICESound,当连接蓝牙时,点击AudioWizard AP,应弹不支援BT使用的提示框。
** {/devices/qcom/msm8937_32|64} **
- 97255fe [8937][Audio][NA][spec]change the deep_buffer output to second for ICEsound work.
- d2bab78 [Scorpio][Audio][NA][spec]add the ICEpower effect to audio_effects.conf
1
raw { //把raw这个模块移植到 deep_buffer{} 下面
sampling_rates 48000
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AU
flags AUDIO_OUTPUT_FLAG_FAST|AUDIO_OUTPUT_FLAG_RAW
} deep_buffer { sampling_rates 44100|48000 channel_masks AUDIO_CHANNEL_OUT_STEREO
@@ -47,6 +40,13 @@ audio_hw_modules {
devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|A
flags AUDIO_OUTPUT_FLAG_DEEP_BUFFER
}
raw {
sampling_rates 48000
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AU
flags AUDIO_OUTPUT_FLAG_FAST|AUDIO_OUTPUT_FLAG_RAW
}
2 - d2bab78 [Scorpio][Audio][NA][spec]add the ICEpower effect to audio_effects.conf
文件 --------------- 位置 --------------------------- 注释
添加 ibicepower.so ----- system/lib/icepower/ ------IcePower effects library
并且在 audio_effect.conf 中添加配置如下
其他配置再
ICE power portiing Guide有解释
--- a/audio_effects.conf
+++ b/audio_effects.conf
@@ -42,6 +42,9 @@ libraries {
audio_pre_processing {
path /system/lib/soundfx/libqcomvoiceprocessing.so
}
+ icepower {
+ path /system/lib/soundfx/libicepower.so // 添加so文件,属于ICE porting
+ }
}
***
# Default pre-processing library. Add to audio_effect.conf "libraries" section if
@@ -225,6 +228,10 @@ effects {
library audio_pre_processing
uuid 1d97bb0b-9e2f-4403-9ae3-58c2554306f8
}
+ icepower_algo { // 添加配置 启用 ICEpower
+ library icepower
+ uuid f1c02420-777f-11e3-981f-0800200c9a66
+ }
}
/devices/asus/msm8937_evb
5fe8468 [ZC551KL][Audio][NA][spec]** update icesound presets 0908 **
4609d30 [msm8937][Audio][NA][spec]** update icepower presets config 0629 **
c3795ca [Scorpio][Audio][NA][Spec]** Update icesoundpresets parameter from Audio EE(0622) **
887f41b [Scorpio][Audio][NA][Spec] ** Update icesoundpresets parameter from Audio EE(0616) **
599ee4d [Scorpio][Audio][NA][Spec]** Update icesoundpresets parameter from Audio EE(0603) **
以上都是些参数的设置
5a03d10 [msm8937][Audio][NA][Spec] ** Update libicepower:1.14 ICEsoundService:1.4 **
- 更新了 version.txt内容
2016/10/29
ICEsoundService_1.3DEV4.apk -> ICEsoundService.apk
ICEsoundServiceShared_1.3DEV4.apk -> ICEsoundServiceShared.apk
2016/04/21---1.4
support the cpu loading monitoring by tuning tool when tuner make their tuning
ICEsoundService.apk -> ICEsoundService.apk
ICEsoundServiceShared.apk -> ICEsoundServiceShared.apk