本文整理汇总了C++中BRCM_READ_REG函数的典型用法代码示例。如果您正苦于以下问题:C++ BRCM_READ_REG函数的具体用法?C++ BRCM_READ_REG怎么用?C++ BRCM_READ_REG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了BRCM_READ_REG函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: chal_audio_earpath_clear_isolation_ctrl
/*============================================================================
*
* Function Name: cVoid chal_audio_earpath_clear_isolation_ctrl(
* CHAL_HANDLE handle, cUInt16 sr_ctrl)
*
* Description: Clear AudioTx isolation Controls
*
* Parameters: handle - audio chal handle.
* sr_ctrl - isolation controls.
* Should be one of the combinations of CHAL_AUDIO_AUDIOTX_ISO_XXXX
*
* Return: None.
*
*============================================================================*/
cVoid chal_audio_earpath_clear_isolation_ctrl(CHAL_HANDLE handle,
cUInt16 iso_ctrl)
{
cUInt32 base = ((ChalAudioCtrlBlk_t *) handle)->audioh_base;
cUInt32 reg_value;
/* Get the current setting */
reg_value = BRCM_READ_REG(base, AUDIOH_AUDIOTX_ISO);
reg_value &= ~(iso_ctrl & CHAL_AUDIO_AUXIOTX_ISO_CTRL_MASK);
/* Set the required setting */
BRCM_WRITE_REG(base, AUDIOH_AUDIOTX_ISO, reg_value);
return;
}
示例2: chal_audio_stpath_clr_fifo
cVoid chal_audio_stpath_clr_fifo(CHAL_HANDLE handle)
{
cUInt32 reg_val;
cUInt32 base = ((ChalAudioCtrlBlk_t *) handle)->sdt_base;
reg_val = BRCM_READ_REG(base, SDT_SDT_CTRL_3);
reg_val |= SDT_SDT_CTRL_3_FIFO_RESET_MASK;
/* Set the required setting */
BRCM_WRITE_REG(base, SDT_SDT_CTRL_3, reg_val);
reg_val &= ~SDT_SDT_CTRL_3_FIFO_RESET_MASK;
/* Set the required setting */
BRCM_WRITE_REG(base, SDT_SDT_CTRL_3, reg_val);
return;
}
示例3: chal_audio_mic_pga
/* function name changed from chal_audio_mic_pga_set_gain */
void chal_audio_mic_pga(CHAL_HANDLE handle, cUInt32 gain_regval)
{
cUInt32 base = ((ChalAudioCtrlBlk_t *)handle)->audioh_base;
cUInt32 reg_val;
reg_val = BRCM_READ_REG(base, AUDIOH_AUDIORX_VRX1);
reg_val &= ~AUDIOH_AUDIORX_VRX1_AUDIORX_VRX_GAINCTRL_MASK;
if (gain_regval > 0x3f)
gain_regval = 0x3f;
reg_val |= (gain_regval
<< AUDIOH_AUDIORX_VRX1_AUDIORX_VRX_GAINCTRL_SHIFT);
BRCM_WRITE_REG(base, AUDIOH_AUDIORX_VRX1, reg_val);
}
示例4: chal_audio_mic_mute
/*============================================================================
*
* Function Name: chal_audio_mic_mute(CHAL_HANDLE handle, Boolean mute_ctrl)
*
* Description: Mute the ANALOG MIC and AUX MIC signals on the DATA line
*
* Parameters: handle : the voice input path handle.
* mute_ctrl : mute control
*
* Return: None.
*
*============================================================================*/
cVoid chal_audio_mic_mute(CHAL_HANDLE handle, Boolean mute_ctrl)
{
cUInt32 base = ((ChalAudioCtrlBlk_t *) handle)->audioh_base;
cUInt32 reg_val;
reg_val = BRCM_READ_REG(base, AUDIOH_AUDIORX_VRX1);
reg_val &= ~(AUDIOH_AUDIORX_VRX1_AUDIORX_VRX_ADCRST_MASK);
if (mute_ctrl == TRUE)
reg_val |= AUDIOH_AUDIORX_VRX1_AUDIORX_VRX_ADCRST_MASK;
else
reg_val &= ~(AUDIOH_AUDIORX_VRX1_AUDIORX_VRX_ADCRST_MASK);
BRCM_WRITE_REG(base, AUDIOH_AUDIORX_VRX1, reg_val);
}
示例5: chal_audio_ihfpath_eanc_in
cVoid chal_audio_ihfpath_eanc_in(CHAL_HANDLE handle, cUInt16 enable )
{
cUInt32 base = ((ChalAudioCtrlBlk_t*)handle)->audioh_base;
cUInt32 eanc_ctrl;
// Set the required settings
eanc_ctrl = BRCM_READ_REG(base, AUDIOH_EANC_CTL);
eanc_ctrl &= (~AUDIOH_EANC_CTL_IHF_EANC_ENABLE_MASK);
if(enable == CHAL_AUDIO_ENABLE)
{
eanc_ctrl |= AUDIOH_EANC_CTL_IHF_EANC_ENABLE_MASK;
}
BRCM_WRITE_REG(base, AUDIOH_EANC_CTL, eanc_ctrl);
return;
}
示例6: chal_audio_vinpath_clr_fifo
void chal_audio_vinpath_clr_fifo(CHAL_HANDLE handle)
{
cUInt32 reg_val;
cUInt32 base = ((ChalAudioCtrlBlk_t*)handle)->audioh_base;
reg_val = BRCM_READ_REG(base, AUDIOH_VIN_FIFO_CTRL);
reg_val |= AUDIOH_VIN_FIFO_CTRL_VIN_FIFO_CLEAR_MASK;
/* Set the required setting */
BRCM_WRITE_REG(base, AUDIOH_VIN_FIFO_CTRL, reg_val);
reg_val &= ~AUDIOH_VIN_FIFO_CTRL_VIN_FIFO_CLEAR_MASK;
/* Set the required setting */
BRCM_WRITE_REG(base, AUDIOH_VIN_FIFO_CTRL, reg_val);
return;
}
示例7: chal_audio_hspath_sdm_is_dither_enabled
/*
* ============================================================================
*
* Function Name:
* chal_audio_hspath_sdm_is_dither_enabled(CHAL_HANDLE handle)
*
* Description: Check if dither to sigma delta module on headset path
* enabled
*
* Parameters: handle - audio chal handle.
*
* Return:
* enable : bit 1 for right channel enable/disable
* enable : bit 0 for left channel enable/disable
*
* ============================================================================
*/
cUInt16 chal_audio_hspath_sdm_is_dither_enabled(CHAL_HANDLE handle)
{
cUInt32 reg_val;
cUInt32 base = ((ChalAudioCtrlBlk_t *)handle)->audioh_base;
cUInt16 ret = 0;
reg_val = BRCM_READ_REG(base, AUDIOH_SDM_DITHER_CTL);
if (reg_val & AUDIOH_SDM_DITHER_CTL_STEREO_DITHER_EN_L_MASK)
ret |= AUDIOH_SDM_DITHER_CTL_STEREO_DITHER_EN_L_MASK;
if (reg_val & AUDIOH_SDM_DITHER_CTL_STEREO_DITHER_EN_R_MASK)
ret |= AUDIOH_SDM_DITHER_CTL_STEREO_DITHER_EN_R_MASK;
return ret;
}
示例8: chal_audio_earpath_sidetone_in
cVoid chal_audio_earpath_sidetone_in(CHAL_HANDLE handle, cUInt16 enable )
{
cUInt32 base = ((ChalAudioCtrlBlk_t*)handle)->audioh_base;
cUInt32 reg_val = 0;
reg_val = BRCM_READ_REG(base, AUDIOH_DAC_CTL);
reg_val &= (~AUDIOH_DAC_CTL_VOUT_SIDETONE_EN_MASK);
if(enable == CHAL_AUDIO_ENABLE)
{
reg_val |= AUDIOH_DAC_CTL_VOUT_SIDETONE_EN_MASK;
}
BRCM_WRITE_REG(base, AUDIOH_DAC_CTL, reg_val);
return;
}
示例9: chal_audio_hspath_set_filter
/*============================================================================
*
* Function Name: cVoid chal_audio_hspath_set_filter(CHAL_HANDLE handle,
* cUInt16 filter)
*
* Description: set Filter type for the heaset path
*
* Parameters: handle - audio chal handle.
* filter - 0: Linear Phase, 1 Minimum Phase
* Return: None.
*
*============================================================================*/
cVoid chal_audio_hspath_set_filter(CHAL_HANDLE handle, cUInt16 filter)
{
cUInt32 base = ((ChalAudioCtrlBlk_t *) handle)->audioh_base;
cUInt32 reg_val;
reg_val = BRCM_READ_REG(base, AUDIOH_MIN_PHASE);
reg_val &= ~(AUDIOH_MIN_PHASE_HS_MIN_PHASE_MASK);
if (filter & CHAL_AUDIO_MINIMUM_PHASE_FILTER)
reg_val |= AUDIOH_MIN_PHASE_HS_MIN_PHASE_MASK;
/* Set the required setting */
BRCM_WRITE_REG(base, AUDIOH_MIN_PHASE, reg_val);
return;
}
示例10: chal_audio_earpath_set_gain
cVoid chal_audio_earpath_set_gain(CHAL_HANDLE handle, cUInt32 gain)
{
cUInt32 reg_val;
cUInt32 base = ((ChalAudioCtrlBlk_t*)handle)->audioh_base;
reg_val = BRCM_READ_REG(base, AUDIOH_EP_DAC_CTRL);
/* Mask the gain bits */
reg_val &= 0xFE7FFFFF;
reg_val |= ((gain&0x03) << 23);
/* Set the required setting */
BRCM_WRITE_REG(base, AUDIOH_EP_DAC_CTRL, reg_val);
return;
}
示例11: chal_audio_ihfpath_set_fifo_thres
cVoid chal_audio_ihfpath_set_fifo_thres(CHAL_HANDLE handle, cUInt16 thres, cUInt16 thres_2)
{
cUInt32 reg_val;
cUInt32 base = ((ChalAudioCtrlBlk_t*)handle)->audioh_base;
reg_val = BRCM_READ_REG(base, AUDIOH_IHF_FIFO_CTRL);
reg_val &= ~(0x7F);
reg_val &= ~(0xF0);
reg_val |= thres;
reg_val |= thres_2 << 8;
/* Set the required setting */
BRCM_WRITE_REG(base, AUDIOH_IHF_FIFO_CTRL, reg_val);
return;
}
示例12: chal_audio_nvinpath_set_fifo_thres
void chal_audio_nvinpath_set_fifo_thres(CHAL_HANDLE handle, cUInt16 thres, cUInt16 thres_2 )
{
cUInt32 reg_val;
cUInt32 base = ((ChalAudioCtrlBlk_t*)handle)->audioh_base;
reg_val = BRCM_READ_REG(base, AUDIOH_NVIN_FIFO_CTRL);
reg_val &= ~(AUDIOH_NVIN_FIFO_CTRL_NVIN_FIFO_THRES_MASK);
reg_val &= ~(AUDIOH_NVIN_FIFO_CTRL_NVIN_FIFO_THRES2_MASK);
reg_val |= thres;
reg_val |= thres_2 << AUDIOH_NVIN_FIFO_CTRL_NVIN_FIFO_THRES2_SHIFT;
/* Set the required setting */
BRCM_WRITE_REG(base, AUDIOH_NVIN_FIFO_CTRL, reg_val);
return;
}
示例13: chal_audio_hspath_set_bits_per_sample
cVoid chal_audio_hspath_set_bits_per_sample(CHAL_HANDLE handle, cUInt16 bits)
{
cUInt32 reg_val;
cUInt32 base = ((ChalAudioCtrlBlk_t *) handle)->audioh_base;
reg_val = BRCM_READ_REG(base, AUDIOH_STEREO_FIFO_CTRL);
if (bits >= 24)
reg_val |= AUDIOH_STEREO_FIFO_CTRL_STEREO_FIFO_24BIT_MASK;
else
reg_val &= ~AUDIOH_STEREO_FIFO_CTRL_STEREO_FIFO_24BIT_MASK;
/* Set the required setting */
BRCM_WRITE_REG(base, AUDIOH_STEREO_FIFO_CTRL, reg_val);
return;
}
示例14: chal_audio_hspath_dma_enable
/*============================================================================
*
* Function Name: cVoid chal_audio_hspath_dma_enable(CHAL_HANDLE handle,
* cUInt16 dma_enable)
*
* Description: Enable or Disable DMA on headset path
*
* Parameters: handle - audio chal handle.
* dma_enable - true: enable DMA, false : disable DMA.
* Return: None.
*
*============================================================================*/
cVoid chal_audio_hspath_dma_enable(CHAL_HANDLE handle, Boolean dma_enable)
{
cUInt32 base = ((ChalAudioCtrlBlk_t *) handle)->audioh_base;
cUInt32 reg_val;
reg_val = BRCM_READ_REG(base, AUDIOH_DMA_CTL);
if (dma_enable)
reg_val |= AUDIOH_DMA_CTL_STEREO_DMA_EN_MASK;
else
reg_val &= ~AUDIOH_DMA_CTL_STEREO_DMA_EN_MASK;
/* Set the required setting */
BRCM_WRITE_REG(base, AUDIOH_DMA_CTL, reg_val);
return;
}
示例15: chal_audio_eancpath_set_mode
void chal_audio_eancpath_set_mode(CHAL_HANDLE handle, _Bool mode)
{
cUInt32 base = ((ChalAudioCtrlBlk_t*)handle)->audioh_base;
cUInt32 eanc_ctrl;
eanc_ctrl = BRCM_READ_REG(base, AUDIOH_EANC_CTL);
eanc_ctrl &= (~AUDIOH_EANC_CTL_EANC_MODE96K_MASK);
if(mode == CHAL_AUDIO_ENABLE)
{
eanc_ctrl |= (AUDIOH_EANC_CTL_EANC_MODE96K_MASK);
}
BRCM_WRITE_REG(base, AUDIOH_EANC_CTL, eanc_ctrl);
return;
}