blob: 829a534c90ba11d5d50d1c07d088c0a7f1edfcbe [file] [log] [blame]
Mikhail Naganov7cbf2f12016-10-27 20:05:35 -07001/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Steven Morelandd6e4f032016-11-28 18:37:07 -080017#ifndef ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EFFECTSFACTORY_H
18#define ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EFFECTSFACTORY_H
Mikhail Naganov7cbf2f12016-10-27 20:05:35 -070019
20#include <system/audio_effect.h>
21
22#include <android/hardware/audio/effect/2.0/IEffectsFactory.h>
23#include <hidl/Status.h>
24
25#include <hidl/MQDescriptor.h>
26namespace android {
27namespace hardware {
28namespace audio {
29namespace effect {
30namespace V2_0 {
31namespace implementation {
32
33using ::android::hardware::audio::common::V2_0::Uuid;
34using ::android::hardware::audio::effect::V2_0::EffectDescriptor;
35using ::android::hardware::audio::effect::V2_0::IEffect;
36using ::android::hardware::audio::effect::V2_0::IEffectsFactory;
37using ::android::hardware::audio::effect::V2_0::Result;
38using ::android::hardware::Return;
39using ::android::hardware::Void;
40using ::android::hardware::hidl_vec;
41using ::android::hardware::hidl_string;
42using ::android::sp;
43
44struct EffectsFactory : public IEffectsFactory {
45 // Methods from ::android::hardware::audio::effect::V2_0::IEffectsFactory follow.
46 Return<void> getAllDescriptors(getAllDescriptors_cb _hidl_cb) override;
47 Return<void> getDescriptor(const Uuid& uid, getDescriptor_cb _hidl_cb) override;
48 Return<void> createEffect(
49 const Uuid& uid, int32_t session, int32_t ioHandle, createEffect_cb _hidl_cb) override;
Martijn Coenen70b9a152016-11-18 15:29:32 +010050 Return<void> debugDump(const hidl_handle& fd) override;
Mikhail Naganov7cbf2f12016-10-27 20:05:35 -070051
52 private:
53 static sp<IEffect> dispatchEffectInstanceCreation(
54 const effect_descriptor_t& halDescriptor, effect_handle_t handle);
55};
56
57extern "C" IEffectsFactory* HIDL_FETCH_IEffectsFactory(const char* name);
58
59} // namespace implementation
60} // namespace V2_0
61} // namespace effect
62} // namespace audio
63} // namespace hardware
64} // namespace android
65
Steven Morelandd6e4f032016-11-28 18:37:07 -080066#endif // ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EFFECTSFACTORY_H