/* * Copyright (c) Hisilicon Technologies Co., Ltd. 2019-2019. All rights reserved. * Description: header of sif drv * Author: Audio * Create: 2019-04-16 */ #ifndef DRV_SIF_H #define DRV_SIF_H #include "drv_sif_hal.h" #include "soc_module.h" #include "drv_dspreg_sif.h" #ifdef __cplusplus #if __cplusplus extern "C" { #endif #endif /* __cplusplus */ #define EXT_SIF_ERR SOC_LOG_LEVEL_ERROR /* error conditions */ #define EXT_SIF_EMERG SOC_LOG_LEVEL_FATAL /* system is unusable */ #define sif_trace(level, fmt...) \ do { \ soc_trace(level, SOC_ID_SIF, "[func]:%s [line]:%d [info]:", __FUNCTION__, __LINE__); \ soc_trace(level, SOC_ID_SIF, ##fmt); \ } while (0) typedef enum { SIF_CHANNEL_STATUS_STOP = 0, SIF_CHANNEL_STATUS_START, SIF_CHANNEL_STATUS_CAST_BUTT, } sif_channel_status; typedef enum { SIF_FREQ_ERR_THRESHOLD_10K = 0x09, /* *