Subhash Chandra Bose Naripeddy | 3eedc00 | 2013-11-12 20:45:15 -0800 | [diff] [blame] | 1 | /* |
Trinath Thammishetty | 765efd2 | 2018-08-20 13:23:24 +0530 | [diff] [blame^] | 2 | * Copyright (c) 2013-2015, 2018, The Linux Foundation. All rights reserved. |
Subhash Chandra Bose Naripeddy | 3eedc00 | 2013-11-12 20:45:15 -0800 | [diff] [blame] | 3 | * 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 | |
Trinath Thammishetty | 765efd2 | 2018-08-20 13:23:24 +0530 | [diff] [blame^] | 23 | #define VIRTUALIZER_PARAM_LATENCY 0x80000000 |
| 24 | |
Subhash Chandra Bose Naripeddy | 3eedc00 | 2013-11-12 20:45:15 -0800 | [diff] [blame] | 25 | #include "bundle.h" |
| 26 | |
| 27 | extern const effect_descriptor_t virtualizer_descriptor; |
| 28 | |
| 29 | typedef struct virtualizer_context_s { |
| 30 | effect_context_t common; |
| 31 | |
| 32 | int strength; |
| 33 | |
| 34 | // Offload vars |
| 35 | struct mixer_ctl *ctl; |
Subhash Chandra Bose Naripeddy | e40a7cd | 2014-06-03 19:42:41 -0700 | [diff] [blame] | 36 | int hw_acc_fd; |
Dhananjay Kumar | f7026ef | 2015-12-15 10:51:10 +0530 | [diff] [blame] | 37 | bool enabled_by_client; |
Subhash Chandra Bose Naripeddy | 3eedc00 | 2013-11-12 20:45:15 -0800 | [diff] [blame] | 38 | bool temp_disabled; |
Weiyin Jiang | b64b7dd | 2015-03-23 00:54:14 +0800 | [diff] [blame] | 39 | audio_devices_t forced_device; |
| 40 | audio_devices_t device; |
Subhash Chandra Bose Naripeddy | 3eedc00 | 2013-11-12 20:45:15 -0800 | [diff] [blame] | 41 | struct virtualizer_params offload_virt; |
| 42 | } virtualizer_context_t; |
| 43 | |
| 44 | int virtualizer_get_parameter(effect_context_t *context, effect_param_t *p, |
| 45 | uint32_t *size); |
| 46 | |
| 47 | int virtualizer_set_parameter(effect_context_t *context, effect_param_t *p, |
| 48 | uint32_t size); |
| 49 | |
| 50 | int virtualizer_set_device(effect_context_t *context, uint32_t device); |
| 51 | |
Subhash Chandra Bose Naripeddy | e40a7cd | 2014-06-03 19:42:41 -0700 | [diff] [blame] | 52 | int virtualizer_set_mode(effect_context_t *context, int32_t hw_acc_fd); |
| 53 | |
Subhash Chandra Bose Naripeddy | 3eedc00 | 2013-11-12 20:45:15 -0800 | [diff] [blame] | 54 | int virtualizer_reset(effect_context_t *context); |
| 55 | |
| 56 | int virtualizer_init(effect_context_t *context); |
| 57 | |
| 58 | int virtualizer_enable(effect_context_t *context); |
| 59 | |
| 60 | int virtualizer_disable(effect_context_t *context); |
| 61 | |
| 62 | int virtualizer_start(effect_context_t *context, output_context_t *output); |
| 63 | |
| 64 | int virtualizer_stop(effect_context_t *context, output_context_t *output); |
| 65 | |
| 66 | #endif /* OFFLOAD_VIRTUALIZER_H_ */ |