blob: 00ad616b1926624b810c312b528806c678443172 [file] [log] [blame]
Haynes Mathew George41f86652014-06-17 14:22:15 -07001/*
2 * Copyright (C) 2014 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 OFFLOAD_EQUALIZER_H_
18#define OFFLOAD_EQUALIZER_H_
19
20#include "bundle.h"
21
22#define NUM_EQ_BANDS 5
23#define INVALID_PRESET -2
24#define PRESET_CUSTOM -1
25
26extern const effect_descriptor_t equalizer_descriptor;
27
28typedef struct equalizer_context_s {
29 effect_context_t common;
30
31 int preset;
32 int band_levels[NUM_EQ_BANDS];
33
34 // Offload vars
35 struct mixer_ctl *ctl;
36 uint32_t device;
37 struct eq_params offload_eq;
38} equalizer_context_t;
39
40int equalizer_get_parameter(effect_context_t *context, effect_param_t *p,
41 uint32_t *size);
42
43int equalizer_set_parameter(effect_context_t *context, effect_param_t *p,
44 uint32_t size);
45
46int equalizer_set_device(effect_context_t *context, uint32_t device);
47
48int equalizer_reset(effect_context_t *context);
49
50int equalizer_init(effect_context_t *context);
51
52int equalizer_enable(effect_context_t *context);
53
54int equalizer_disable(effect_context_t *context);
55
56int equalizer_start(effect_context_t *context, output_context_t *output);
57
58int equalizer_stop(effect_context_t *context, output_context_t *output);
59
60#endif /*OFFLOAD_EQUALIZER_H_*/