blob: ea16cb9fac2da7cf03b1db90fc9bdcca2b15108b [file] [log] [blame]
Shunkai Yaoc23916b2022-07-13 04:59:37 +00001/*
2 * Copyright (C) 2022 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#pragma once
18
Shunkai Yao45905172022-08-24 18:14:02 +000019#include <aidl/android/hardware/audio/effect/BnEffect.h>
Shunkai Yaoc23916b2022-07-13 04:59:37 +000020#include <cstdlib>
21
22namespace aidl::android::hardware::audio::effect {
23
Shunkai Yao121c6dd2022-09-21 23:42:08 +000024// Equalizer type UUID.
25static const ::aidl::android::media::audio::common::AudioUuid EqualizerTypeUUID = {
Shunkai Yao45905172022-08-24 18:14:02 +000026 static_cast<int32_t>(0x0bed4300),
27 0xddd6,
28 0x11db,
29 0x8f34,
Shunkai Yaoc23916b2022-07-13 04:59:37 +000030 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
31
Shunkai Yao121c6dd2022-09-21 23:42:08 +000032// Equalizer implementation UUID.
33static const ::aidl::android::media::audio::common::AudioUuid EqualizerSwImplUUID = {
34 static_cast<int32_t>(0x0bed4300),
35 0x847d,
36 0x11df,
37 0xbb17,
38 {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
39
Shunkai Yao45905172022-08-24 18:14:02 +000040class Equalizer : public BnEffect {
41 public:
Shunkai Yao121c6dd2022-09-21 23:42:08 +000042 Equalizer() = default;
Shunkai Yao45905172022-08-24 18:14:02 +000043 ndk::ScopedAStatus open() override;
44 ndk::ScopedAStatus close() override;
45 ndk::ScopedAStatus getDescriptor(Descriptor* _aidl_return) override;
46
47 private:
48 // Effect descriptor.
Shunkai Yao121c6dd2022-09-21 23:42:08 +000049 Descriptor mDesc = {.common = {.id = {.type = EqualizerTypeUUID, .uuid = EqualizerSwImplUUID}}};
Shunkai Yao45905172022-08-24 18:14:02 +000050};
51} // namespace aidl::android::hardware::audio::effect