diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2015-06-22 18:09:23 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-06-22 18:09:24 +0000 |
commit | 2b343b1b2dd9e4885ef2b7ec2f798215d714ab3a (patch) | |
tree | 6e9f46147820d6c55cb3c10cccaa680852605a9d | |
parent | 99b38856e91a55bb67085dbabffac9739998fe8b (diff) | |
parent | 20569262fce8b047bfc253d91ccb0f455863fde1 (diff) | |
download | frameworks_av-2b343b1b2dd9e4885ef2b7ec2f798215d714ab3a.zip frameworks_av-2b343b1b2dd9e4885ef2b7ec2f798215d714ab3a.tar.gz frameworks_av-2b343b1b2dd9e4885ef2b7ec2f798215d714ab3a.tar.bz2 |
Merge "Add property to ignore audio effects on the platform" into mnc-dev
-rw-r--r-- | media/libeffects/factory/EffectsFactory.c | 16 | ||||
-rw-r--r-- | media/libeffects/factory/EffectsFactory.h | 1 |
2 files changed, 13 insertions, 4 deletions
diff --git a/media/libeffects/factory/EffectsFactory.c b/media/libeffects/factory/EffectsFactory.c index c310fe2..db7865a 100644 --- a/media/libeffects/factory/EffectsFactory.c +++ b/media/libeffects/factory/EffectsFactory.c @@ -24,6 +24,7 @@ #include <cutils/misc.h> #include <cutils/config_utils.h> +#include <cutils/properties.h> #include <audio_effects/audio_effects_conf.h> static list_elem_t *gEffectList; // list of effect_entry_t: all currently created effects @@ -447,12 +448,19 @@ int init() { return 0; } + // ignore effects or not? + const bool ignoreFxConfFiles = property_get_bool(PROPERTY_IGNORE_EFFECTS, false); + pthread_mutex_init(&gLibLock, NULL); - 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); + if (ignoreFxConfFiles) { + ALOGI("Audio effects in configuration files will be ignored"); + } 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); + } } updateNumEffects(); diff --git a/media/libeffects/factory/EffectsFactory.h b/media/libeffects/factory/EffectsFactory.h index 560b485..518800d 100644 --- a/media/libeffects/factory/EffectsFactory.h +++ b/media/libeffects/factory/EffectsFactory.h @@ -26,6 +26,7 @@ extern "C" { #endif +#define PROPERTY_IGNORE_EFFECTS "ro.audio.ignore_effects" typedef struct list_elem_s { void *object; |