当前位置: 首页>>代码示例>>C++>>正文


C++ BRCM_READ_REG函数代码示例

本文整理汇总了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;
}
开发者ID:faizauthar12,项目名称:Hyper_kernel,代码行数:30,代码来源:chal_caph_audioh_vout.c

示例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;
}
开发者ID:faizauthar12,项目名称:Hyper_kernel,代码行数:16,代码来源:chal_caph_audioh_sidetone.c

示例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);
}
开发者ID:TheNikiz,项目名称:android_kernel_samsung_hawaii,代码行数:17,代码来源:chal_analogmic.c

示例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);

}
开发者ID:ASAZING,项目名称:Android-Kernel-Gt-s7390l,代码行数:28,代码来源:chal_caph_audioh_analogmic.c

示例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;
}
开发者ID:Astinj,项目名称:Kernel_GT-S5830C,代码行数:16,代码来源:chal_ihf.c

示例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;
}
开发者ID:ASAZING,项目名称:Android-Kernel-Gt-s7390l,代码行数:16,代码来源:chal_vin.c

示例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;
}
开发者ID:TheNikiz,项目名称:android_kernel_samsung_hawaii,代码行数:33,代码来源:chal_hs.c

示例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;
}
开发者ID:Ashutos97,项目名称:GT-S5360-opensource-Update-2,代码行数:16,代码来源:chal_vout.c

示例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;
}
开发者ID:ASAZING,项目名称:Android-Kernel-Gt-s7390l,代码行数:28,代码来源:chal_caph_audioh_hs.c

示例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;
}
开发者ID:Ashutos97,项目名称:GT-S5360-opensource-Update-2,代码行数:16,代码来源:chal_vout.c

示例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;
}
开发者ID:Astinj,项目名称:Kernel_GT-S5830C,代码行数:16,代码来源:chal_ihf.c

示例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;
}
开发者ID:ASAZING,项目名称:Android-Kernel-Gt-s7390l,代码行数:16,代码来源:chal_nvin.c

示例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;
}
开发者ID:ASAZING,项目名称:Android-Kernel-Gt-s7390l,代码行数:17,代码来源:chal_caph_audioh_hs.c

示例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;
}
开发者ID:ASAZING,项目名称:Android-Kernel-Gt-s7390l,代码行数:29,代码来源:chal_caph_audioh_hs.c

示例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;
}
开发者ID:ASAZING,项目名称:Android-Kernel-Gt-s7390l,代码行数:17,代码来源:chal_eanc.c


注:本文中的BRCM_READ_REG函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。