summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2016-01-12 16:34:27 -0800
committerSteve Kondik <steve@cyngn.com>2016-01-12 16:34:27 -0800
commit8ad656861c764ea4f8bf8539cb568b01edbf647d (patch)
tree4bbb7b6bf726308cdde12bc23ec99509afc7ecfa
parentddf0593b309880dd526181de820b34a81e946a46 (diff)
downloadframeworks_av-8ad656861c764ea4f8bf8539cb568b01edbf647d.zip
frameworks_av-8ad656861c764ea4f8bf8539cb568b01edbf647d.tar.gz
frameworks_av-8ad656861c764ea4f8bf8539cb568b01edbf647d.tar.bz2
av: Add support for loading audio_effects_vendor.conf
* In case a device has a /vendor partition which cannot be modified, this allows us to short-circuit the audio_effects.conf file which might be placed there with one of our own which lives on /system. Change-Id: Ief87bd4cfba2c3188b0dff122d91f773b7f3d92d
-rw-r--r--media/libeffects/factory/EffectsFactory.c4
-rw-r--r--services/audiopolicy/service/AudioPolicyEffects.cpp4
2 files changed, 6 insertions, 2 deletions
diff --git a/media/libeffects/factory/EffectsFactory.c b/media/libeffects/factory/EffectsFactory.c
index db7865a..c0a1c57 100644
--- a/media/libeffects/factory/EffectsFactory.c
+++ b/media/libeffects/factory/EffectsFactory.c
@@ -456,7 +456,9 @@ int init() {
if (ignoreFxConfFiles) {
ALOGI("Audio effects in configuration files will be ignored");
} else {
- if (access(AUDIO_EFFECT_VENDOR_CONFIG_FILE, R_OK) == 0) {
+ if (access(AUDIO_EFFECT_VENDOR_CONFIG_FILE2, R_OK) == 0) {
+ loadEffectConfigFile(AUDIO_EFFECT_VENDOR_CONFIG_FILE2);
+ } else if (access(AUDIO_EFFECT_VENDOR_CONFIG_FILE, R_OK) == 0) {
loadEffectConfigFile(AUDIO_EFFECT_VENDOR_CONFIG_FILE);
} else if (access(AUDIO_EFFECT_DEFAULT_CONFIG_FILE, R_OK) == 0) {
loadEffectConfigFile(AUDIO_EFFECT_DEFAULT_CONFIG_FILE);
diff --git a/services/audiopolicy/service/AudioPolicyEffects.cpp b/services/audiopolicy/service/AudioPolicyEffects.cpp
index e71d7a5..26857b1 100644
--- a/services/audiopolicy/service/AudioPolicyEffects.cpp
+++ b/services/audiopolicy/service/AudioPolicyEffects.cpp
@@ -40,7 +40,9 @@ namespace android {
AudioPolicyEffects::AudioPolicyEffects()
{
// load automatic audio effect modules
- if (access(AUDIO_EFFECT_VENDOR_CONFIG_FILE, R_OK) == 0) {
+ if (access(AUDIO_EFFECT_VENDOR_CONFIG_FILE2, R_OK) == 0) {
+ loadAudioEffectConfig(AUDIO_EFFECT_VENDOR_CONFIG_FILE2);
+ } else if (access(AUDIO_EFFECT_VENDOR_CONFIG_FILE, R_OK) == 0) {
loadAudioEffectConfig(AUDIO_EFFECT_VENDOR_CONFIG_FILE);
} else if (access(AUDIO_EFFECT_DEFAULT_CONFIG_FILE, R_OK) == 0) {
loadAudioEffectConfig(AUDIO_EFFECT_DEFAULT_CONFIG_FILE);