audio_power_up.cc
来自「Motorola synergy audio component」· CC 代码 · 共 502 行 · 第 1/2 页
CC
502 行
suPanic(AUD_LOG_AS_PARAMS_ST_READ_ERROR, 0); } read_result = DL_FsReadFile( am_haptics_as_table, /* base address of haptics as table */ sizeof(AM_HAPTICS_AS_PARAM), /* record size */ AM_HAPTICS_NO_OF_TABLES, /* No of records */ file_handle, /* File pointer to read from */ &elem_read ); /* Variable to store number of suc reads */ if ( ( read_result != DL_FS_RESULT_READ_SUCCESS ) || ( elem_read != AM_HAPTICS_NO_OF_TABLES ) ) { DL_FsDeleteFile(audio_params_flash,DL_FS_OWNER_AUDIO) ; suPanic(AUD_LOG_HAPTICS_PARAMS_READ_ERROR, 0); } read_result = DL_FsReadFile( am_avc_table, /* base address of avc table */ sizeof(UINT16), /* record size */ AM_AVC_NO_OF_PARAMETERS, /* No of records */ file_handle, /* File pointer to read from */ &elem_read ); /* Variable to store number of suc reads */ if ( ( read_result != DL_FS_RESULT_READ_SUCCESS ) || ( elem_read != AM_AVC_NO_OF_PARAMETERS) ) { DL_FsDeleteFile(audio_params_flash,DL_FS_OWNER_AUDIO) ; suPanic(AUD_LOG_AVC_PARAMS_READ_ERROR, 0); } read_result = DL_FsReadFile( am_sap_dai_table, /* base address of dai table */ sizeof(UINT16), /* record size */ MCU_DSP_SAP_CONFIG_WORD_LEN, /* No of records */ file_handle, /* File pointer to read from */ &elem_read ); /* Variable to store number of suc reads */ if ( ( read_result != DL_FS_RESULT_READ_SUCCESS ) || ( elem_read != MCU_DSP_SAP_CONFIG_WORD_LEN) ) { DL_FsDeleteFile(audio_params_flash,DL_FS_OWNER_AUDIO) ; suPanic( AUD_LOG_SAP_DAI_PARAMS_READ_ERROR, 0); } read_result = DL_FsReadFile( am_sap_no_dai_table, /* base address of no dai table */ sizeof(UINT16), /* record size */ MCU_DSP_SAP_CONFIG_WORD_LEN, /* No of records */ file_handle, /* File pointer to read from */ &elem_read ); /* Variable to store number of suc reads */ if ( ( read_result != DL_FS_RESULT_READ_SUCCESS ) || ( elem_read != MCU_DSP_SAP_CONFIG_WORD_LEN) ) { DL_FsDeleteFile(audio_params_flash,DL_FS_OWNER_AUDIO) ; suPanic( AUD_LOG_SAP_NO_DAI_PARAMS_READ_ERROR, 0); } read_result = DL_FsReadFile( am_companding_table_int_spkrph, /* base ad of comp int spkrph tbl */ sizeof(UINT16), /* record size */ (AM_COMP_TOTAL_NO_OF_PARAMETERS + 2), /* No of records */ file_handle, /* File pointer to read from */ &elem_read ); /* Var for no of suc reads */ if ( ( read_result != DL_FS_RESULT_READ_SUCCESS ) || ( elem_read != (AM_COMP_TOTAL_NO_OF_PARAMETERS + 2) ) ) { DL_FsDeleteFile(audio_params_flash,DL_FS_OWNER_AUDIO) ; suPanic( AUD_LOG_COMPANDING_INT_SPKR_PHONE_PARAMS_READ_ERROR, 0); } read_result = DL_FsReadFile( am_companding_table_clip_on_spkrph, /* base ad of comp clipon spkrph tbl */ sizeof(UINT16), /* record size */ AM_COMP_TOTAL_NO_OF_PARAMETERS, /* No of records */ file_handle, /* File pointer to read from */ &elem_read ); /* Var for no of suc reads */ if ( ( read_result != DL_FS_RESULT_READ_SUCCESS ) || ( elem_read != AM_COMP_TOTAL_NO_OF_PARAMETERS) ) { DL_FsDeleteFile(audio_params_flash,DL_FS_OWNER_AUDIO) ; suPanic( AUD_LOG_COMPANDING_CLIP_ON_SPKR_PHONE_PARAMS_READ_ERROR, 0); } read_result = DL_FsReadFile( am_companding_midi_table, /* base ad of comp midi tbl */ sizeof(UINT16), /* record size */ AM_COMP_TOTAL_NO_OF_PARAMETERS_MIDI, /* No of records */ file_handle, /* File pointer to read from */ &elem_read ); /* Var for no of suc reads */ if ( ( read_result != DL_FS_RESULT_READ_SUCCESS ) || ( elem_read != AM_COMP_TOTAL_NO_OF_PARAMETERS_MIDI) ) { DL_FsDeleteFile(audio_params_flash,DL_FS_OWNER_AUDIO) ; suPanic( AUD_LOG_COMPANDING_MIDI_PARAMS_READ_ERROR, 0); } read_result = DL_FsReadFile( am_companding_table_plover, /* base ad of comp plover tbl */ sizeof(UINT16), /* record size */ AM_COMP_TOTAL_NO_OF_PARAMETERS, /* No of records */ file_handle, /* File pointer to read from */ &elem_read ); /* Var for no of suc reads */ if ( ( read_result != DL_FS_RESULT_READ_SUCCESS ) || ( elem_read != AM_COMP_TOTAL_NO_OF_PARAMETERS) ) { DL_FsDeleteFile(audio_params_flash,DL_FS_OWNER_AUDIO) ; suPanic( AUD_LOG_COMPANDING_PLOVER_PARAMS_READ_ERROR, 0); } read_result = DL_FsReadFile( am_companding_table_zihf, /* base ad of comp zihf tbl */ sizeof(UINT16), /* record size */ AM_COMP_TOTAL_NO_OF_PARAMETERS, /* No of records */ file_handle, /* File pointer to read from */ &elem_read ); /* Var for no of suc reads */ if ( ( read_result != DL_FS_RESULT_READ_SUCCESS ) || ( elem_read != AM_COMP_TOTAL_NO_OF_PARAMETERS) ) { DL_FsDeleteFile(audio_params_flash,DL_FS_OWNER_AUDIO) ; suPanic( AUD_LOG_COMPANDING_ZIHF_PARAMS_READ_ERROR, 0); } read_result = DL_FsReadFile( am_companding_table_headset, /* base ad of comp headset tbl */ sizeof(UINT16), /* record size */ AM_COMP_TOTAL_NO_OF_PARAMETERS, /* No of records */ file_handle, /* File pointer to read from */ &elem_read ); /* Var for no of suc reads */ if ( ( read_result != DL_FS_RESULT_READ_SUCCESS ) || ( elem_read != AM_COMP_TOTAL_NO_OF_PARAMETERS) ) { DL_FsDeleteFile(audio_params_flash,DL_FS_OWNER_AUDIO) ; suPanic( AUD_LOG_COMPANDING_HEADSET_PARAMS_READ_ERROR, 0); } read_result = DL_FsReadFile( am_companding_table_bt, /* base ad of comp bt headset tbl */ sizeof(UINT16), /* record size */ AM_COMP_TOTAL_NO_OF_PARAMETERS, /* No of records */ file_handle, /* File pointer to read from */ &elem_read ); /* Var for no of suc reads */ if ( ( read_result != DL_FS_RESULT_READ_SUCCESS ) || ( elem_read != AM_COMP_TOTAL_NO_OF_PARAMETERS) ) { DL_FsDeleteFile(audio_params_flash,DL_FS_OWNER_AUDIO) ; suPanic( AUD_LOG_COMPANDING_BT_PARAMS_READ_ERROR, 0); } read_result = DL_FsReadFile( am_companding_mp3_table, /* base ad of comp mp3 tbl */ sizeof(UINT16), /* record size */ AM_COMP_TOTAL_NO_OF_PARAMETERS_MP3, /* No of records */ file_handle, /* File pointer to read from */ &elem_read ); /* Var for no of suc reads */ if ( ( read_result != DL_FS_RESULT_READ_SUCCESS ) || ( elem_read != AM_COMP_TOTAL_NO_OF_PARAMETERS_MP3) ) { DL_FsDeleteFile(audio_params_flash,DL_FS_OWNER_AUDIO) ; suPanic( AUD_LOG_COMPANDING_MP3_PARAMS_READ_ERROR, 0); } read_result = DL_FsReadFile( mp3_compand_beta_table, /* base ad of comp mp3 beta tbl */ sizeof(MP3_COMPAND_BETA), /* record size */ AM_MP3_BETA_NO_OF_TABLES, /* No of records */ file_handle, /* File pointer to read from */ &elem_read ); /* Var for no of suc reads */ if ( ( read_result != DL_FS_RESULT_READ_SUCCESS ) || ( elem_read != AM_MP3_BETA_NO_OF_TABLES) ) { DL_FsDeleteFile(audio_params_flash,DL_FS_OWNER_AUDIO) ; suPanic( AUD_LOG_MP3_BETA_PARAMS_READ_ERROR, 0); } read_result = DL_FsReadFile( am_anm_params_table_handset, /* base ad of CT handset tbl */ sizeof(UINT16), /* record size */ MCU_DSP_ANM_ENABLE_LEN, /* No of records */ file_handle, /* File pointer to read from */ &elem_read ); /* Var for no of suc reads */ if ( ( read_result != DL_FS_RESULT_READ_SUCCESS ) || ( elem_read != MCU_DSP_ANM_ENABLE_LEN ) ) { DL_FsDeleteFile(audio_params_flash,DL_FS_OWNER_AUDIO) ; suPanic( AUD_LOG_ANM_PARAMS_READ_ERROR, 0); } read_result = DL_FsReadFile( am_anm_params_table_headset, /* base ad of CT headset tbl */ sizeof(UINT16), /* record size */ MCU_DSP_ANM_ENABLE_LEN, /* No of records */ file_handle, /* File pointer to read from */ &elem_read ); /* Var for no of suc reads */ if ( ( read_result != DL_FS_RESULT_READ_SUCCESS ) || ( elem_read != MCU_DSP_ANM_ENABLE_LEN ) ) { DL_FsDeleteFile(audio_params_flash,DL_FS_OWNER_AUDIO) ; suPanic( AUD_LOG_ANM_PARAMS_READ_ERROR, 0); } read_result = DL_FsReadFile( am_anm_params_table_spkrph, /* base ad of CT spkrph tbl */ sizeof(UINT16), /* record size */ MCU_DSP_ANM_ENABLE_LEN, /* No of records */ file_handle, /* File pointer to read from */ &elem_read ); /* Var for no of suc reads */ if ( ( read_result != DL_FS_RESULT_READ_SUCCESS ) || ( elem_read != MCU_DSP_ANM_ENABLE_LEN ) ) { DL_FsDeleteFile(audio_params_flash,DL_FS_OWNER_AUDIO) ; suPanic( AUD_LOG_ANM_PARAMS_READ_ERROR, 0); } read_result = DL_FsReadFile( am_anm_params_table_rsrv_1, /* base ad of CT rsrv_1 tbl */ sizeof(UINT16), /* record size */ MCU_DSP_ANM_ENABLE_LEN, /* No of records */ file_handle, /* File pointer to read from */ &elem_read ); /* Var for no of suc reads */ if ( ( read_result != DL_FS_RESULT_READ_SUCCESS ) || ( elem_read != MCU_DSP_ANM_ENABLE_LEN ) ) { DL_FsDeleteFile(audio_params_flash,DL_FS_OWNER_AUDIO) ; suPanic( AUD_LOG_ANM_PARAMS_READ_ERROR, 0); } read_result = DL_FsReadFile( am_anm_params_table_rsrv_2, /* base ad of CT rsrv_2 tbl */ sizeof(UINT16), /* record size */ MCU_DSP_ANM_ENABLE_LEN, /* No of records */ file_handle, /* File pointer to read from */ &elem_read ); /* Var for no of suc reads */ if ( ( read_result != DL_FS_RESULT_READ_SUCCESS ) || ( elem_read != MCU_DSP_ANM_ENABLE_LEN ) ) { DL_FsDeleteFile(audio_params_flash,DL_FS_OWNER_AUDIO) ; suPanic( AUD_LOG_ANM_PARAMS_READ_ERROR, 0); } } close_result = DL_FsCloseFile(file_handle); }}/*================================================================================================*/#ifdef __cplusplus}#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?