diff options
author | François Gaffie <francois.gaffie@intel.com> | 2015-03-18 16:55:35 +0100 |
---|---|---|
committer | Jean-Michel Trivi <jmtrivi@google.com> | 2015-04-01 10:19:16 -0700 |
commit | ad3183e2d4cecd02f6261270a7ea1c68be0efa0f (patch) | |
tree | 5c08be8ee10c2525c0df9dc42529d5fae0240b74 /services/audiopolicy/managerdefault/Ports.cpp | |
parent | 4de725a32a825bd26d9fc0ec6901ffffa92778e1 (diff) | |
download | frameworks_av-ad3183e2d4cecd02f6261270a7ea1c68be0efa0f.zip frameworks_av-ad3183e2d4cecd02f6261270a7ea1c68be0efa0f.tar.gz frameworks_av-ad3183e2d4cecd02f6261270a7ea1c68be0efa0f.tar.bz2 |
Audio Policy Refactor: reorganise headers inclusion
This patch reoganises the headers inclusion in order to prepare
the split of managerdefault into a manager and a separated lib
of pillar policy elements.
It also moves back the isStrategyActive to the manager to avoid
any dependancies from this pillars to the manager.
Change-Id: I1a35c45d86db7a3878a40dc7d6858dfea37c5ac9
Signed-off-by: François Gaffie <francois.gaffie@intel.com>
Diffstat (limited to 'services/audiopolicy/managerdefault/Ports.cpp')
-rw-r--r-- | services/audiopolicy/managerdefault/Ports.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/services/audiopolicy/managerdefault/Ports.cpp b/services/audiopolicy/managerdefault/Ports.cpp index 3e55cee..326f9c5 100644 --- a/services/audiopolicy/managerdefault/Ports.cpp +++ b/services/audiopolicy/managerdefault/Ports.cpp @@ -17,12 +17,16 @@ #define LOG_TAG "APM::Ports" //#define LOG_NDEBUG 0 -#include "AudioPolicyManager.h" - +#include "Ports.h" +#include "HwModule.h" +#include "Gains.h" +#include "ConfigParsingUtils.h" #include "audio_policy_conf.h" namespace android { +int32_t volatile AudioPort::mNextUniqueId = 1; + // --- AudioPort class implementation AudioPort::AudioPort(const String8& name, audio_port_type_t type, @@ -34,7 +38,7 @@ AudioPort::AudioPort(const String8& name, audio_port_type_t type, } void AudioPort::attach(const sp<HwModule>& module) { - mId = AudioPolicyManager::nextUniqueId(); + mId = android_atomic_inc(&mNextUniqueId); mModule = module; } |