nt9856x/rtos/code/application/source/cardv/SrcCode/UIApp/MovieFast/MovieFast.h
2024-01-23 18:02:39 +08:00

121 lines
13 KiB
C
Executable File

#ifndef _MOVIEFAST_H_
#define _MOVIEFAST_H_
#include <kwrap/type.h>
#include <kwrap/task.h>
#define FLGMOVIEFAST_RECSTART 0x00000001
#define FLGMOVIEFAST_RECSTOP 0x00000002
#define FLGMOVIEFAST_SHUTDOWN 0x00000004
#define FLGMOVIEFAST_MASK FLGPTN_BIT_ALL
#define FIX_RECORD_NOISE ENABLE
extern THREAD_RETTYPE MovieFast_InitFileNamingThread(void *arg);
extern THREAD_RETTYPE MovieFast_InitFileNamingThread2(void *arg);
extern THREAD_RETTYPE MovieFast_InitMovieModeThread(void *arg);
extern THREAD_RETTYPE MovieFast_PowerOffTsk(void *arg);
typedef enum
{
EAC_CONFIG_AD_DMIC_EN, ///< Configure AD(Record) Digital Microphone Enable/Disable.
EAC_CONFIG_AD_DMIC_CLK_EN, ///< Configure AD(Record) Digital Microphone Clock Output Enable/Disable.
EAC_CONFIG_AD_DMIC_LRSWAP, ///< Configure AD(Record) Digital Microphone Left/Right Channel Swap.
EAC_CONFIG_AD_DMIC2_LRSWAP, ///< Configure AD(Record) Digital Microphone2 Left/Right Channel Swap.
EAC_CONFIG_AD_ALC_MODE_DGAIN, ///< Configure AD(Record) Auto Level Control Using Ditial Gain only.
EAC_CONFIG_AD_DMIC_PATH_MUX, ///< Configure AD(Record) Digital Microphone decimation filter mux.
EAC_CONFIG_AD_DMIC_CHANNEL, ///< Configure AD(Record) Digital Microphone channel number 0x0/0x1 for 2/4ch.
///< This is used for the Digital Microphone.
EAC_CONFIG_AD_DCCAN_EN, ///< Configure AD(Record) DC Cancellation Enable/Disable.
EAC_CONFIG_AD_DCCAN_TYPE, ///< Configure AD(Record) DC Cancellation Selection Options. Please use EAC_DCCAN_TYPE as input parameter.
EAC_CONFIG_AD_DCCAN_RESO, ///< Configure AD(Record) DC Cancellation Resolution. Please use EAC_DCCAN_RESO as input parameter.
EAC_CONFIG_AD_DCINIT_L, ///< Configure AD(Record) DC Cancellation Left Channel Inital Value. This value is used by EAC_CONFIG_AD_DCCAN_TYPE.
EAC_CONFIG_AD_DCINIT_R, ///< Configure AD(Record) DC Cancellation Right Channel Inital Value. This value is used by EAC_CONFIG_AD_DCCAN_TYPE.
EAC_CONFIG_AD_DMIC2_DCINIT_L, ///< Configure AD(Record) DC Cancellation Left Channel Inital Value. This value is used by EAC_CONFIG_AD_DCCAN_TYPE.(dmic2)
EAC_CONFIG_AD_DMIC2_DCINIT_R, ///< Configure AD(Record) DC Cancellation Right Channel Inital Value. This value is used by EAC_CONFIG_AD_DCCAN_TYPE.(dmic2)
EAC_CONFIG_AD_DGAIN1_L, ///< Configure AD(Record) Digital Gain 1 for Left channel. Value range 0x1~0xFF which mapping to -57.0dB ~ +70.0dB(+0.5dB each step). Value 0x0 is mute.
EAC_CONFIG_AD_DGAIN1_R, ///< Configure AD(Record) Digital Gain 1 for Right channel. Value range 0x1~0xFF which mapping to -57.0dB ~ +70.0dB(+0.5dB each step). Value 0x0 is mute.
EAC_CONFIG_AD_DGAIN2_L, ///< Configure AD(Record) Digital Gain 2 for Left channel. Value range 0x1~0xFF which mapping to -97.0dB ~ +30.0dB(+0.5dB each step). Value 0x0 is mute.
EAC_CONFIG_AD_DGAIN2_R, ///< Configure AD(Record) Digital Gain 2 for Right channel. Value range 0x1~0xFF which mapping to -97.0dB ~ +30.0dB(+0.5dB each step). Value 0x0 is mute.
EAC_CONFIG_AD_DMIC2_DGAIN_L, ///< Configure AD(Record) Digital Gain 1 for dmic2 Left channel. Value range 0x1~0xFF which mapping to -57.0dB ~ +70.0dB(+0.5dB each step). Value 0x0 is mute.
EAC_CONFIG_AD_DMIC2_DGAIN_R, ///< Configure AD(Record) Digital Gain 1 for dmic2 Right channel. Value range 0x1~0xFF which mapping to -57.0dB ~ +70.0dB(+0.5dB each step). Value 0x0 is mute.
EAC_CONFIG_AD_ALC_EN, ///< Configure AD(Record) Auto Level Control (ALC) Enable/Disable.
EAC_CONFIG_AD_ALC_TARGET_L, ///< Configure AD(Record) Auto Level Control (ALC) Target Level for Left Channel. Use the enumeration "EAC_ALC_TARGET" as input parameter.
EAC_CONFIG_AD_ALC_TARGET_R, ///< Configure AD(Record) Auto Level Control (ALC) Target Level for Right Channel. Use the enumeration "EAC_ALC_TARGET" as input parameter.
EAC_CONFIG_AD_ALC_MAXGAIN_L, ///< Configure AD(Record) Auto Level Control (ALC) PGA Max Gain for Left Channel. Use the enumeration "EAC_ALC_MAXGAIN" as input parameter.
EAC_CONFIG_AD_ALC_MAXGAIN_R, ///< Configure AD(Record) Auto Level Control (ALC) PGA Max Gain for Right Channel. Use the enumeration "EAC_ALC_MAXGAIN" as input parameter.
EAC_CONFIG_AD_ALC_MINGAIN_L, ///< Configure AD(Record) Auto Level Control (ALC) PGA Max Gain for Left Channel. Use the enumeration "EAC_ALC_MINGAIN" as input parameter.
EAC_CONFIG_AD_ALC_MINGAIN_R, ///< Configure AD(Record) Auto Level Control (ALC) PGA Max Gain for Right Channel. Use the enumeration "EAC_ALC_MINGAIN" as input parameter.
EAC_CONFIG_AD_ALC_ATTACK_TIME, ///< Configure AD(Record) Auto Level Control (ALC) Attack Time. Time length would be "(2 ^ uiCfgValue) x ALC_Time_Resolution_Basis". Default value is 0x2.
///< This setting is also valid in the noise gate state. If the user want to keep the same attack time above noise gate threshold but larger the attack time below noise gate threshold,
///< the user must increase time resolution of NoiseGate and shorten the time resolution of ALC.
EAC_CONFIG_AD_ALC_DECAY_TIME, ///< Configure AD(Record) Auto Level Control (ALC) Decay Time. Time length would be "(2 ^ uiCfgValue) x ALC_Time_Resolution_Basis". Default value is 0x3.
///< This setting is also valid in the noise gate state. If the user want to keep the same decay time above noise gate threshold but larger the decay time below noise gate threshold,
///< the user must increase time resolution of NoiseGate and shorten the time resolution of ALC.
EAC_CONFIG_AD_ALC_HOLD_TIME, ///< Configure AD(Record) Auto Level Control (ALC) HOLD Time. Time length would be "(2 ^ (uiCfgValue-1)) x 117" samples. uiCfgValue 0x0 is 1 sample. Default value is 0x0.
///< This setting is also valid in the noise gate state. If the user want to keep the same hold time above noise gate threshold but larger the hold time below noise gate threshold,
///< the user must increase time resolution of NoiseGate and shorten the time resolution of ALC.
EAC_CONFIG_AD_NG_ATTACK_TIME, ///< Configure AD(Record) Auto Level Control (ALC) Attack Time. Time length would be "(2 ^ uiCfgValue) x ALC_Time_Resolution_Basis". Default value is 0x2.
///< This setting is also valid in the noise gate state. If the user want to keep the same attack time above noise gate threshold but larger the attack time below noise gate threshold,
///< the user must increase time resolution of NoiseGate and shorten the time resolution of ALC.
EAC_CONFIG_AD_NG_DECAY_TIME, ///< Configure AD(Record) Auto Level Control (ALC) Decay Time. Time length would be "(2 ^ uiCfgValue) x ALC_Time_Resolution_Basis". Default value is 0x3.
///< This setting is also valid in the noise gate state. If the user want to keep the same decay time above noise gate threshold but larger the decay time below noise gate threshold,
///< the user must increase time resolution of NoiseGate and shorten the time resolution of ALC.
EAC_CONFIG_AD_NG_HOLD_TIME, ///< Configure AD(Record) Auto Level Control (ALC) HOLD Time. Time length would be "(2 ^ (uiCfgValue-1)) x 117" samples. uiCfgValue 0x0 is 1 sample. Default value is 0x0.
///< This setting is also valid in the noise gate state. If the user want to keep the same hold time above noise gate threshold but larger the hold time below noise gate threshold,
///< the user must increase time resolution of NoiseGate and shorten the time resolution of ALC.
EAC_CONFIG_AD_ALC_STEP, ///< Configure AD(Record) Auto Level Control (ALC) Step value. This value would constraint the ALC controllable PGA gain changement max value in eack zero crossing. value is "0.5+(1.5 x uiCfgValue)" dB.
EAC_CONFIG_AD_ALC_TRESO, ///< Configure AD(Record) Auto Level Control (ALC) Time Resolution Basis during Attack/Decay time calculation.
///< Please use "EAC_ALC_TRESO_BASIS" as input parameter. The default value is 15ms.
EAC_CONFIG_AD_ALC_NG_EN, ///< Configure AD(Record) Auto Level Control (ALC) Noise Gate Enable/Disable.
EAC_CONFIG_AD_ALC_NG_THD_L, ///< Configure AD(Record) Auto Level Control (ALC) Noise Gate Threshold value for left channel. Please use the enumeration "EAC_NG_THRESHOLD" as input parameter.
EAC_CONFIG_AD_ALC_NG_THD_R, ///< Configure AD(Record) Auto Level Control (ALC) Noise Gate Threshold value for right channel. Please use the enumeration "EAC_NG_THRESHOLD" as input parameter.
EAC_CONFIG_AD_ALC_NG_TARGET_L, ///< Configure AD(Record) Auto Level Control (ALC) Noise Gate Target Level for left channel. Value range 0~15 which the Noise Gate target dB would be (ALC_TARGET - (NG_THD - INPUT_SIGNAL_LEVEL)*uiCfgValue).
EAC_CONFIG_AD_ALC_NG_TARGET_R, ///< Configure AD(Record) Auto Level Control (ALC) Noise Gate Target Level for right channel. Value range 0~15 which the Noise Gate target dB would be (ALC_TARGET - (NG_THD - INPUT_SIGNAL_LEVEL)*uiCfgValue).
EAC_CONFIG_AD_ALC_NG_TRESO, ///< Configure AD(Record) Auto Level Control (ALC) Noise Gate Time Resolution Basis during Attack/Decay time calculation inside Noise Gate state.
///< Please use "EAC_ALC_TRESO_BASIS" as input parameter. The default value is 15ms.
EAC_CONFIG_AD_BOOST_COMPEN_L, ///< Configure AD(Record) Boost Gain Digital Compensation for left channel in ALC loop. please use EAC_ALC_BOOST_COMPEN as input parameter.
EAC_CONFIG_AD_BOOST_COMPEN_R, ///< Configure AD(Record) Boost Gain Digital Compensation for right channel in ALC loop. please use EAC_ALC_BOOST_COMPEN as input parameter.
EAC_CONFIG_AD_IIR_ALC_L, ///< Configure AD(Record) Enable/Disable the IIR function to the Auto Level Control (ALC) Left Channel Input.
EAC_CONFIG_AD_IIR_ALC_R, ///< Configure AD(Record) Enable/Disable the IIR function to the Auto Level Control (ALC) Right Channel Input.
EAC_CONFIG_AD_IIR_OUT_L, ///< Configure AD(Record) Enable/Disable the IIR function to the Recorded Left Channel output Samples.
EAC_CONFIG_AD_IIR_OUT_R, ///< Configure AD(Record) Enable/Disable the IIR function to the Recorded Right Channel output Samples.
EAC_CONFIG_AD_IIR2_OUT_L, ///< Configure AD(Record) Enable/Disable the IIR function to the Recorded Left Channel output Samples.(dmic2)
EAC_CONFIG_AD_IIR2_OUT_R, ///< Configure AD(Record) Enable/Disable the IIR function to the Recorded Right Channel output Samples.(dmic2)
EAC_CONFIG_AD_PGAGAIN_L, ///< Configure AD(Record) Analog PGA Gain for Left channel if ALC disabled. Please use the enumeration "EAC_AD_PGAGAIN" as input parameter.
EAC_CONFIG_AD_PGAGAIN_R, ///< Configure AD(Record) Analog PGA Gain for Right channel if ALC disabled. Please use the enumeration "EAC_AD_PGAGAIN" as input parameter.
EAC_CONFIG_AD_PGABOOST_L, ///< Configure AD(Record) Analog Boost Gain for left channel. Please use EAC_PGABOOST_SEL as input parameter.
EAC_CONFIG_AD_PGABOOST_R, ///< Configure AD(Record) Analog Boost Gain for right channel. Please use EAC_PGABOOST_SEL as input parameter.
EAC_CONFIG_AD_POWER_EN_L, ///< Configure AD(Record) Analog Power Enable of the Left channel. Use TRUE/FALSE as input parameter to set Enable/Disable power.
EAC_CONFIG_AD_POWER_EN_R, ///< Configure AD(Record) Analog Power Enable of the Right channel. Use TRUE/FALSE as input parameter to set Enable/Disable power.
EAC_CONFIG_AD_RESET, ///< Configure AD(Record) Analog Block Reset. Set TRUE/FALSE to Enable/Disable the analog block reset operation.
EAC_CONFIG_AD_PDREF_BUF, ///< Configure AD(Record) Analog Block Reference Buffer Power Down.
EAC_CONFIG_AD_PDREF_BIAS, ///< Configure AD(Record) Analog Block Reference Bias Power Down.
EAC_CONFIG_AD_PD_VCMBIAS, ///< Configure AD(Record) Analog Block Vcm Power Down.
EAC_CONFIG_AD_MICBIAS_EN, ///< Configure AD(Record) Analog Block MIC Bias Enable/Disable.
EAC_CONFIG_AD_MICBIAS_LVL, ///< Configure AD(Record) Analog Block MIC Bias Level 2V/2.4V.
EAC_CONFIG_AD_DCOFS_L, ///< Get AD(Record) DC Cancellation Left Channel Offset Value.
EAC_CONFIG_AD_DCOFS_R, ///< Get AD(Record) DC Cancellation Right Channel Offset Value.
EAC_CONFIG_AD_DMIC2_DCOFS_L, ///< Get AD(Record) DC Cancellation Left Channel Offset Value.(dmic2)
EAC_CONFIG_AD_DMIC2_DCOFS_R, ///< Get AD(Record) DC Cancellation Right Channel Offset Value.(dmic2)
EAC_CONFIG_AD_ZC_EN, ///< Get AD(Record) Zero Crossing Function Enable/Disable.
EAC_CONFIG_AD_ZC_TIMEOUT, ///< Get AD(Record) Zero Crossing Function Timeout Value.
ENUM_DUMMY4WORD(EAC_CONFIG_AD)
} EAC_CONFIG_AD;
#endif //_UIAPP_PHOTO_H_