blob: 440c8a21e33f287bcfb233e01bdf68436c198dbc [file] [log] [blame]
Subhash Chandra Bose Naripeddy3eedc002013-11-12 20:45:15 -08001/*
Subhash Chandra Bose Naripeddye40a7cd2014-06-03 19:42:41 -07002 * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
Subhash Chandra Bose Naripeddy3eedc002013-11-12 20:45:15 -08003 * Not a Contribution.
4 *
5 * Copyright (C) 2013 The Android Open Source Project
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19
20#ifndef OFFLOAD_VIRTUALIZER_H_
21#define OFFLOAD_VIRTUALIZER_H_
22
23#include "bundle.h"
24
25extern const effect_descriptor_t virtualizer_descriptor;
26
27typedef struct virtualizer_context_s {
28 effect_context_t common;
29
30 int strength;
31
32 // Offload vars
33 struct mixer_ctl *ctl;
Subhash Chandra Bose Naripeddye40a7cd2014-06-03 19:42:41 -070034 int hw_acc_fd;
Subhash Chandra Bose Naripeddy3eedc002013-11-12 20:45:15 -080035 bool temp_disabled;
36 uint32_t device;
37 struct virtualizer_params offload_virt;
38} virtualizer_context_t;
39
40int virtualizer_get_parameter(effect_context_t *context, effect_param_t *p,
41 uint32_t *size);
42
43int virtualizer_set_parameter(effect_context_t *context, effect_param_t *p,
44 uint32_t size);
45
46int virtualizer_set_device(effect_context_t *context, uint32_t device);
47
Subhash Chandra Bose Naripeddye40a7cd2014-06-03 19:42:41 -070048int virtualizer_set_mode(effect_context_t *context, int32_t hw_acc_fd);
49
Subhash Chandra Bose Naripeddy3eedc002013-11-12 20:45:15 -080050int virtualizer_reset(effect_context_t *context);
51
52int virtualizer_init(effect_context_t *context);
53
54int virtualizer_enable(effect_context_t *context);
55
56int virtualizer_disable(effect_context_t *context);
57
58int virtualizer_start(effect_context_t *context, output_context_t *output);
59
60int virtualizer_stop(effect_context_t *context, output_context_t *output);
61
62#endif /* OFFLOAD_VIRTUALIZER_H_ */