summaryrefslogtreecommitdiffstats
path: root/services/audiopolicy/common/managerdefinitions/include/AudioPatch.h
diff options
context:
space:
mode:
authorFrançois Gaffie <francois.gaffie@intel.com>2015-03-19 09:24:12 +0100
committerJean-Michel Trivi <jmtrivi@google.com>2015-04-01 10:22:42 -0700
commit53615e29c99c5e9d2ca77aaefd7bf5c770513120 (patch)
tree18a576affc2dcecdc1431027f6d348ef0678cae0 /services/audiopolicy/common/managerdefinitions/include/AudioPatch.h
parent98cc191247388132b6fd8a4ecd07abd6e4c5a0ed (diff)
downloadframeworks_av-53615e29c99c5e9d2ca77aaefd7bf5c770513120.zip
frameworks_av-53615e29c99c5e9d2ca77aaefd7bf5c770513120.tar.gz
frameworks_av-53615e29c99c5e9d2ca77aaefd7bf5c770513120.tar.bz2
Migrate helper functions from managerdefault to common
This patch moves from manager to common: -parse helper functions of the policy configuration file -collection helper function on -output / input descriptors -DeviceDescriptor -AudioPatch / Audio Port -IO Profile -HwModule Change-Id: If45e53418db75af1af198f43c4ef27884499055f Signed-off-by: François Gaffie <francois.gaffie@intel.com>
Diffstat (limited to 'services/audiopolicy/common/managerdefinitions/include/AudioPatch.h')
-rw-r--r--services/audiopolicy/common/managerdefinitions/include/AudioPatch.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/services/audiopolicy/common/managerdefinitions/include/AudioPatch.h b/services/audiopolicy/common/managerdefinitions/include/AudioPatch.h
index 6e8fb32..385f257 100644
--- a/services/audiopolicy/common/managerdefinitions/include/AudioPatch.h
+++ b/services/audiopolicy/common/managerdefinitions/include/AudioPatch.h
@@ -17,8 +17,10 @@
#pragma once
#include <system/audio.h>
+#include <utils/Errors.h>
#include <utils/RefBase.h>
#include <utils/Errors.h>
+#include <utils/KeyedVector.h>
namespace android {
@@ -38,4 +40,16 @@ private:
static volatile int32_t mNextUniqueId;
};
+class AudioPatchCollection : public DefaultKeyedVector<audio_patch_handle_t, sp<AudioPatch> >
+{
+public:
+ status_t addAudioPatch(audio_patch_handle_t handle, const sp<AudioPatch>& patch);
+
+ status_t removeAudioPatch(audio_patch_handle_t handle);
+
+ status_t listAudioPatches(unsigned int *num_patches, struct audio_patch *patches) const;
+
+ status_t dump(int fd) const;
+};
+
}; // namespace android