blob: e68b038416762212a159a131f65b0802a2f81b2c [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
17#ifndef HIDL_GENERATED_android_hardware_audio_effect_V2_0_LoudnessEnhancerEffect_H_
18#define HIDL_GENERATED_android_hardware_audio_effect_V2_0_LoudnessEnhancerEffect_H_
19
20#include <android/hardware/audio/effect/2.0/ILoudnessEnhancerEffect.h>
21#include <hidl/Status.h>
22
23#include <hidl/MQDescriptor.h>
24
25#include "Effect.h"
26
27namespace android {
28namespace hardware {
29namespace audio {
30namespace effect {
31namespace V2_0 {
32namespace implementation {
33
34using ::android::hardware::audio::common::V2_0::AudioDevice;
35using ::android::hardware::audio::common::V2_0::AudioMode;
36using ::android::hardware::audio::common::V2_0::AudioSource;
37using ::android::hardware::audio::effect::V2_0::AudioBuffer;
38using ::android::hardware::audio::effect::V2_0::EffectAuxChannelsConfig;
39using ::android::hardware::audio::effect::V2_0::EffectConfig;
40using ::android::hardware::audio::effect::V2_0::EffectDescriptor;
41using ::android::hardware::audio::effect::V2_0::EffectOffloadParameter;
42using ::android::hardware::audio::effect::V2_0::IEffect;
43using ::android::hardware::audio::effect::V2_0::IEffectBufferProviderCallback;
44using ::android::hardware::audio::effect::V2_0::ILoudnessEnhancerEffect;
45using ::android::hardware::audio::effect::V2_0::Result;
46using ::android::hardware::Return;
47using ::android::hardware::Void;
48using ::android::hardware::hidl_vec;
49using ::android::hardware::hidl_string;
50using ::android::sp;
51
52struct LoudnessEnhancerEffect : public ILoudnessEnhancerEffect {
53 explicit LoudnessEnhancerEffect(effect_handle_t handle);
54
55 // Methods from ::android::hardware::audio::effect::V2_0::IEffect follow.
56 Return<Result> init() override;
57 Return<Result> setConfig(
58 const EffectConfig& config,
59 const sp<IEffectBufferProviderCallback>& inputBufferProvider,
60 const sp<IEffectBufferProviderCallback>& outputBufferProvider) override;
61 Return<Result> reset() override;
62 Return<Result> enable() override;
63 Return<Result> disable() override;
64 Return<Result> setDevice(AudioDevice device) override;
65 Return<void> setAndGetVolume(
66 const hidl_vec<uint32_t>& volumes, setAndGetVolume_cb _hidl_cb) override;
67 Return<Result> setAudioMode(AudioMode mode) override;
68 Return<Result> setConfigReverse(
69 const EffectConfig& config,
70 const sp<IEffectBufferProviderCallback>& inputBufferProvider,
71 const sp<IEffectBufferProviderCallback>& outputBufferProvider) override;
72 Return<Result> setInputDevice(AudioDevice device) override;
73 Return<void> getConfig(getConfig_cb _hidl_cb) override;
74 Return<void> getConfigReverse(getConfigReverse_cb _hidl_cb) override;
75 Return<void> getSupportedAuxChannelsConfigs(
76 uint32_t maxConfigs, getSupportedAuxChannelsConfigs_cb _hidl_cb) override;
77 Return<void> getAuxChannelsConfig(getAuxChannelsConfig_cb _hidl_cb) override;
78 Return<Result> setAuxChannelsConfig(const EffectAuxChannelsConfig& config) override;
79 Return<Result> setAudioSource(AudioSource source) override;
80 Return<Result> offload(const EffectOffloadParameter& param) override;
81 Return<void> getDescriptor(getDescriptor_cb _hidl_cb) override;
82 Return<void> process(
83 const AudioBuffer& inBuffer, uint32_t outFrameSize, process_cb _hidl_cb) override;
84 Return<void> processReverse(
85 const AudioBuffer& inBuffer,
86 uint32_t outFrameSize,
87 processReverse_cb _hidl_cb) override;
88 Return<void> command(
89 uint32_t commandId,
90 const hidl_vec<uint8_t>& data,
91 uint32_t resultMaxSize,
92 command_cb _hidl_cb) override;
93 Return<Result> setParameter(
94 const hidl_vec<uint8_t>& parameter, const hidl_vec<uint8_t>& value) override;
95 Return<void> getParameter(
96 const hidl_vec<uint8_t>& parameter,
97 uint32_t valueMaxSize,
98 getParameter_cb _hidl_cb) override;
99 Return<void> getSupportedConfigsForFeature(
100 uint32_t featureId,
101 uint32_t maxConfigs,
102 uint32_t configSize,
103 getSupportedConfigsForFeature_cb _hidl_cb) override;
104 Return<void> getCurrentConfigForFeature(
105 uint32_t featureId,
106 uint32_t configSize,
107 getCurrentConfigForFeature_cb _hidl_cb) override;
108 Return<Result> setCurrentConfigForFeature(
109 uint32_t featureId, const hidl_vec<uint8_t>& configData) override;
110
111 // Methods from ::android::hardware::audio::effect::V2_0::ILoudnessEnhancerEffect follow.
112 Return<Result> setTargetGain(int32_t targetGainMb) override;
113 Return<void> getTargetGain(getTargetGain_cb _hidl_cb) override;
114
115 private:
116 sp<Effect> mEffect;
117
118 virtual ~LoudnessEnhancerEffect();
119};
120
121} // namespace implementation
122} // namespace V2_0
123} // namespace effect
124} // namespace audio
125} // namespace hardware
126} // namespace android
127
128#endif // HIDL_GENERATED_android_hardware_audio_effect_V2_0_LoudnessEnhancerEffect_H_