aud_interface.h

来自「Motorola synergy audio component」· C头文件 代码 · 共 393 行

H
393
字号
#ifndef AUD_INTERFACE_H#define AUD_INTERFACE_H/*==================================================================================================                                                                                    Header Name: aud_interface.h     General Description: Prototypes for audio interface  ====================================================================================================                              Motorola Confidential Proprietary                         Advanced Technology and Software Operations                      (c) Copyright Motorola 1999, All Rights Reserved     Revision History:   Date       Author      Reference   ========   ========    ================   2004-11-05 w17860      LIBff24932              P4.4 Feature # 12583 Memory Reduction               - Remove Voice Dial and Voice Tag                               Modification     TrackingAuthor                          Date          Number     Description of Changes-------------------------   ------------    ----------   -------------------------------------------Jonathan Akers              07/15/2005      LIBgg49853   Add support for handling audio samples in ISRJonathan Akers              11/23/2004      LIBff38547   VST VR PortingLori Lareau                 02/23/2004      LIBdd72710   WAV UI soundsRavi Subramanyan            04/28/2003      LIBdd02287   Turn off Noise Suppression when Network                                                          requests it for AMR           Lori Haegele                09/24/2002      LIBbb50981   Support for TCMD use of audio mdi queuesChris Fries                 07/17/2002      LIBbb43909   Volume keys cause voice to muteLori Haegele                06/11/2002      LIBbb25413   Set Stereo DAC sampling rateMark Taraba                 09/11/2000      CSGce68318   Add audio manager support for customer                                                          audio loopback testingMark Taraba                 08/09/2000      CSGce55882   Eliminate file gsm.h from audio managerSteve Hagino                08/03/2000      CSGce67731   Make Audio Manager Ansi-CompliantDale Noble                  07/11/2000      CSGce64760   Add include AM_HW_Primitive_Builder_tone.hSteve Hagino                04/04/2000      CSGce53612   Register Audio Manager                                                         - Defined AUDIO_IN_QUEUESteve Hagino                04/24/2000      CSGce55663   Change AM code to have strict ANSI                                                          complianceChuck Farrel                03/16/2000      CSGce47853   - Add includes for new Phase 6 prototypesSteve Hagino                03/21/2000      CSGce51678   - Updated as a result of inspection.                                                           am_status() is now a function instead of                                                           a macro.Steve Hagino                03/16/2000      CSGce51678   - Added macro to determine Audio Manager                                                            status.Mark Taraba                 02/18/2000      CSGce57501   -Add gain table to SEEMSteve Hagino                02/28/2000      CSGce49903   - Added prototype for Power Up/Down                                                            suspend functionMark Taraba                 11/08/1999      CSGce42083   Phase 4/5 Interface Functions                                                         - Initial file creationBill Choi                   12/05/1999      CSGce39558   adding functional support for VA and VR.====================================================================================================                                         INCLUDE FILES==================================================================================================*/#ifdef __cplusplusextern "C" {#endif#include "am_hw_string_primitive.h"#include <SUAPI/suapi.h>#include "AM_SendMessage.h"#include <SYNERGY_DEVICE_LAYER/dl_audio_auf.h>#include "td_aud_command_type.h"#include "td_aud_manual_test_req_type.h"#include "td_aud_manual_test_param_type.h"#include "td_aud_peripheral_ind_state.h"#include "td_aud_dai_select.h"#include "td_va_command.h"#include "td_va_status.h"#include "td_va_group_types.h"#include "aud_va_command_req.h"#include "td_vr_voice_tag.h"#include "td_vr_group_types.h"#include "td_vr_training_types.h"#include "td_vr_error_codes.h"#include "td_vr_defs.h"#include "aud_play_voice_tag_req.h"#include "aud_sdvr_capture_req.h"#include "aud_sdvr_delete_voice_tag_req.h"#include "aud_sdvr_model_id_req.h"#include "aud_sdvr_start_req.h"#include "aud_sdvr_train_req.h"#include "audscm_sdsr_ind.h"#include "td_vr_capture_reps.h"#include "mmivr_sdvr_ind.h"#include "aud_va_command_cnf.h"#include "aud_va_status_ind.h"#include "audscm_va_ind.h"#include "aud_hw_stub_command_cnf.h"#include "am_hw_primitive_builder_interrupt.h"#include "td_mmicc_overall_state.h"#include "td_mmicc_call_state.h"#include "td_reference_transaction_id.h"#include "td_hscaud_hookswitch_ind_type.h"#include "td_hscaud_dtmf_fbk_mut_ind_typ.h"#include "aud_prim_ids.h"#include "td_aud_tone_req_tone_type.h"/* New added header files */#include "aud_mute_req.h"#include "aud_report_capability_req.h"#include "aud_state_change_req.h"#include "aud_stop_all_tones_req.h"#include "AM_HW_Primitive_Builder_tone.h"#include "aud_ctia_mode_req.h"#include <ENGINE_HAPI/hapi_mdi_message_ids.h>/************** CONSTANTS *****************************************************/            /* service provider port id's and names. */#define AUDIO_IN_QUEUE "p/audio/0"#define MCU_DSP_NUM_OF_READS 4#define VST_PCM_FRAME_SIZE  160#define VST_AMR_FRAME_SIZE   6#define VST_MAX_VOCODED_DATA_FRAME_SIZE (MCU_DSP_VA_PLAYBACK_DATA_WORD_LEN*2)/************** STRUCTURES, ENUMS, AND TYPEDEFS *******************************/typedef struct{  UINT16 no_cnf;} AUD_UNSUSPEND_REQ;/************* GLOBAL VARIABLES ***********************************************/ extern BOOL replies_to_tcmd;/************** FUNCTION PROTOTYPES *******************************************/#if (MAKE_FTR_VR == TRUE) /* For Hardware Speaker Dependent VR */void aud_sdvr_enable( void );void aud_sdvr_disable( void );void aud_sdvr_play_voice_tag_req( UINT16 voice_tag_count, TD_VR_VOICE_TAG *voice_tag_array );void aud_sdvr_capture_req( UINT16               repetition,                            UINT16               time,                            TD_VR_GROUP_TYPE     group_id );void aud_sdvr_delete_req(TD_VR_VOICE_TAG voice_tag);void aud_sdvr_model_id_req(TD_VR_GROUP_TYPE group_id);void aud_sdvr_start_req(TD_VR_GROUP_TYPE    group_id,                        BOOL                repeat_indication,                        UINT8               nbest,                        UINT8               active_bit_array_size,                        UINT16              *active_bit_array,                         UINT16              time);void aud_sdvr_train_req(TD_VR_GROUP_TYPE       group_id,                         TD_VR_TRAINING_TYPE    training_mode,                        UINT16                 repetition_bit_mask);void aud_sdvr_stop_req( void );BOOL aud_is_vr_active(void);void aud_sdvr_abort_vr(BOOL blocking);#endif    /*================Interface for the VST functions ==================*/void aud_stop_vr_audio_capture_req(void);void aud_start_vr_audio_capture_req(UINT16 frame_num,                                    BOOL play_tone);void aud_play_audio_from_flash_req(W_CHAR *filename);void aud_play_audio_from_buffer_req(UINT8   audio_buffer_num,                                    void    *audio_data_address,                                    void    *audio_data_size);void aud_stop_audio_playback_req(void);void aud_vst_vr_recorded_data_ready_req(void);    /*================Interface for the Interrupt routines.==================*/#if (MAKE_FTR_VA == TRUE)void DSP_AUDIO_VA_Record_Off_Confirm(void);void DSP_AUDIO_VA_Playback_Off_Confirm(void);#endif#if (MAKE_FTR_VR == TRUE)void DSP_AUDIO_VR_Capture_Complete(void);void DSP_AUDIO_VR_Train_Complete(void);void DSP_AUDIO_VR_Recognize_Complete(void);void DSP_AUDIO_VR_Enable_Complete(void);void DSP_AUDIO_VR_Disable_Complete(void);void aud_scm_sdsr_capture_ind(TD_VR_ERROR_CODES error_code);void aud_scm_sdsr_ind(TD_VR_ERROR_CODES error_code, UINT16 *word_array, UINT8 word_array_size);void aud_scm_sdsr_delete_ind(TD_VR_ERROR_CODES error_code);void aud_scm_sdsr_model_id(TD_VR_ERROR_CODES error_code, UINT8 bit_array_size,UINT16 *bit_array);void aud_scm_sdsr_train_ind( TD_VR_ERROR_CODES error_code,UINT8 warning_code, TD_VR_MODEL_ID model_id);void aud_scm_voice_tag_ind(TD_VR_ERROR_CODES error_codes, UINT16 request_id);#endif#if (MAKE_FTR_VA == TRUE)    /*============================================================================================*/    /* For Digital Voice Annotator*/    /*============================================================================================*/void aud_va_command_req( TD_VA_COMMAND command, UINT8 voicenote_number, TD_VA_GROUP_TYPE type );    /*=========================Interface for Interrupt routines==============*/void aud_scm_va_record_ind(UINT8 error_code, UINT8 warning_code );void aud_scm_va_playback_ind(UINT16 error_code);void aud_scm_va_time_remaining( UINT16 error_code, UINT16 time);void aud_scm_va_erase_ind( UINT16 error_code);#endif#if ( (MAKE_FTR_VR == TRUE) || (MAKE_FTR_VA == TRUE) )    /* For Digital Voice Annotator or Hardware Speaker Dependent VR */void aud_reformat_flash_req(void);#endifSU_PORT_HANDLE aud_get_aud_mgr_task_port_handle(void);    /* For Power Up/Down Interface */void audio_init(void);void aud_suspend(UINT16 reserved, UINT16 reserved2, UINT16 reserved3);void aud_unsuspend(UINT16 no_cnf, UINT16 reserved2, UINT16 reserved3);void aud_powerdown(UINT16 reserved, UINT16 reserved2, UINT16 reserved3);BOOL am_status(void);void audio_wake();/* For volume app status */void aud_volume_app_active(BOOL active);BOOL aud_is_volume_app_active (void);void aud_set_tcmd_msg_routing(BOOL route_to_tcmd);/* For AMR Noise Suppression Disable/Enable */void aud_amr_ns_allow(BOOL allow_ns);/*********************************************************************//*************   VST VR related **************************************//*********************************************************************/typedef enum AUD_VST_ACTIVITY_DEF{    AUD_VST_PLAYBACK_FROM_BUFFER,    AUD_VST_PLAYBACK_FROM_FILE,    AUD_VST_CAPTURE_AUDIO,    AUD_VST_STOP_CAPTURE,    AUD_VST_STOP_PLAYBACK,    AUD_VST_IDLE} AUD_VST_ACTIVITY_T;typedef struct AUD_VST_PARAMS_DEF{    /* Current VST activity occuring in AM. */    AUD_VST_ACTIVITY_T activity;    /* Pointer containing the address of the audio data buffer. */    void *audio_data_address;    /* Size of the audio data buffer. */    UINT32 audio_data_size;    /* number of frames in capture period */    UINT16 frame_num;    /* BOOL describing whether a tone should be played before starting       audio capture */    BOOL play_tone;    /* current frame count of capture session */    UINT16 frame_count;    /* describes whether the audio command request needs to wait for completion       of an on-going tone */     BOOL wait_for_tone_completion;    /* AM is aborting current playback or recording */    BOOL    abort_activity;} AUD_VST_PARAMS_T;typedef struct{#if (MAKE_NEPTUNE_CHIPSET == TRUE)    UINT16 pcm_buf[VST_PCM_FRAME_SIZE + AM_HW_MSG_HEADER_WORD_LEN];#else    UINT16 pcm_buf[VST_PCM_FRAME_SIZE];#endif         UINT16 vocoded_data_buf[VST_AMR_FRAME_SIZE + AM_HW_MSG_HEADER_WORD_LEN];}AUD_RECORDED_DATA_T; //stores both pcm and vocoded datatypedef struct{    AUD_RECORDED_DATA_T recorded_data[MCU_DSP_NUM_OF_READS];        UINT8 status_code;} AUD_RECORDED_DATA_READY_REQ_T; // stores all recorded dataextern AUD_VST_PARAMS_T     audVstParams;/*********************************************************************//*************   MESSAGES FROM AUDIO BACK UP TO DL (VST)  ************//*********************************************************************/typedef struct{    /*  0 if no error, some descriptive error code otherwise.*/    UINT8 status_code;} AUD_START_AUDIO_CAPTURE_CNF_T;typedef struct{    /*  0 if no error, some descriptive error code otherwise.*/    UINT8 status_code;} AUD_PLAY_AUDIO_BUFFER_CNF_T;typedef struct{    /*  0 if no error, some descriptive error code otherwise.*/    UINT8 status_code;} AUD_PLAY_AUDIO_FLASH_CNF_T;typedef struct{    /*  0 if no error, some descriptive error code otherwise.*/    UINT8 status_code;} AUD_STOP_AUDIO_CAPTURE_CNF_T;typedef struct{    /*  0 if no error, some descriptive error code otherwise.*/    UINT8 status_code;} AUD_STOP_AUDIO_PLAYBACK_CNF_T;typedef struct{    /*  Pointers to global memory for storage of PCM samples and vocoder data.*/    INT16 pcm_data_buffer[VST_PCM_FRAME_SIZE];    INT8 voc_data_buffer[VST_MAX_VOCODED_DATA_FRAME_SIZE];} AUD_AUDIO_SAMPLES_READY_IND_T;/*  To notifiy DL that the requested playback (buffered prompts or flashed voceder data) is complete. */typedef struct{    /*  0 if no error, some descriptive error code otherwise.*/    UINT8 status_code;} AUD_AUDIO_PLAYBACK_COMPLETE_CNF_T;#ifdef __cplusplus}#endif#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?