Home | History | Annotate | Download | only in voicefx
      1 /*
      2  * Copyright (C) 2012 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 #include <system/audio.h>
     18 #include <hardware/audio_effect.h>
     19 
     20 #define ES305_IO_HANDLE_NONE -1
     21 #define ES305_SESSION_ID_NONE -1977
     22 
     23 #define ES305_ON "1"
     24 #define ES305_OFF "0"
     25 
     26 #define ES305_NS_DEFAULT_ON  "4"
     27 #define ES305_NS_VOICE_REC_HANDHELD_ON "6"
     28 #define ES305_NS_VOICE_REC_SINGLE_MIC_ON "0"
     29 #define ES305_NS_OFF "0"
     30 #define ES305_AGC_ON  "1"
     31 #define ES305_AGC_OFF "0"
     32 #define ES305_AEC_ON  "1"
     33 #define ES305_AEC_OFF "0"
     34 
     35 enum {
     36     ES305_PRESET_INIT = -3,
     37     ES305_PRESET_CURRENT = -2,
     38     ES305_PRESET_OFF = -1,
     39     ES305_PRESET_VOIP_HANDHELD = 0,
     40     ES305_PRESET_ASRA_HANDHELD = 1,
     41     ES305_PRESET_VOIP_DESKTOP = 2,
     42     ES305_PRESET_ASRA_DESKTOP = 3,
     43     ES305_PRESET_VOIP_HEADSET = 4,
     44     ES305_PRESET_ASRA_HEADSET = 5,
     45     ES305_PRESET_VOIP_HEADPHONES = 6,
     46     ES305_PRESET_VOIP_HP_DESKTOP = 7,
     47     ES305_PRESET_CAMCORDER = 8,
     48 };
     49 
     50 #ifdef __cplusplus
     51 extern "C" {
     52 #endif
     53 
     54     int eS305_UsePreset(int preset);
     55 
     56     /*
     57      * Sets the IO handle for the current input stream, or ADNC_IO_HANDLE_NONE when stream is
     58      * stopped.
     59      */
     60     int eS305_SetActiveIoHandle(audio_io_handle_t handle);
     61 
     62     int eS305_AddEffect(effect_descriptor_t * descr, audio_io_handle_t handle);
     63 
     64     int eS305_RemoveEffect(effect_descriptor_t * descr, audio_io_handle_t handle);
     65 
     66     int eS305_Release();
     67 
     68 #ifdef __cplusplus
     69 }
     70 #endif
     71 
     72