• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ AudDrv_Clk_Off函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中AudDrv_Clk_Off函数的典型用法代码示例。如果您正苦于以下问题:C++ AudDrv_Clk_Off函数的具体用法?C++ AudDrv_Clk_Off怎么用?C++ AudDrv_Clk_Off使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了AudDrv_Clk_Off函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: mtk_voice_close

static int mtk_voice_close(struct snd_pcm_substream *substream)
{
    printk("mtk_voice_close \n");

    if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
    {
        printk("%s  with SNDRV_PCM_STREAM_CAPTURE \n", __func__);
        AudDrv_Clk_Off();
        AudDrv_ADC_Clk_Off();
        return 0;
    }

    //  todo : enable sidetone
    // here start digital part
    SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I03, Soc_Aud_InterConnectionOutput_O17);
    SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I04, Soc_Aud_InterConnectionOutput_O18);
    SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I14, Soc_Aud_InterConnectionOutput_O03);
    SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I14, Soc_Aud_InterConnectionOutput_O04);

    SetI2SAdcEnable(false);
    SetI2SDacEnable(false);
    SetModemPcmEnable(MODEM_1, false);
    SetMemoryPathEnable(Soc_Aud_Digital_Block_I2S_OUT_DAC, false);
    SetMemoryPathEnable(Soc_Aud_Digital_Block_I2S_IN_ADC, false);

    EnableAfe(false);
    AudDrv_Clk_Off();
    AudDrv_ADC_Clk_Off();

    Voice_Status = false;

    return 0;
}
开发者ID:Scorpio92,项目名称:mediatek,代码行数:33,代码来源:mt_soc_pcm_voice_md1.c


示例2: mtk_voice_bt_close

static int mtk_voice_bt_close(struct snd_pcm_substream *substream)
{
	pr_debug("mtk_voice_bt_close\n");
	if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) {
		pr_err("%s with SNDRV_PCM_STREAM_CAPTURE\n", __func__);
		AudDrv_Clk_Off();
		AudDrv_ANA_Clk_Off();
		return 0;
	}

	/* interconnection setting */
	SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I02,
		      Soc_Aud_InterConnectionOutput_O17);
	SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I02,
		      Soc_Aud_InterConnectionOutput_O18);
	SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I14,
		      Soc_Aud_InterConnectionOutput_O02);
	SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I21,
		      Soc_Aud_InterConnectionOutput_O02);

	/* here start digital part */
	SetMemoryPathEnable(Soc_Aud_Digital_Block_DAI_BT, false);
	SetDaiBtEnable(false);

	EnableAfe(false);
	AudDrv_Clk_Off();
	AudDrv_ANA_Clk_Off();

	voice_bt_Status = false;

	return 0;
}
开发者ID:P-D-A,项目名称:android_kernel_lge_mt6753,代码行数:32,代码来源:mt_soc_pcm_voice_md1_bt.c


示例3: mtk_voice_extint_close

static int mtk_voice_extint_close(struct snd_pcm_substream *substream)
{
    printk("mtk_voice_extint_close \n");

    if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
    {
        printk("%s  with SNDRV_PCM_STREAM_CAPTURE \n",__func__);
        SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I14, Soc_Aud_InterConnectionOutput_O03);
        SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I14, Soc_Aud_InterConnectionOutput_O04);
        SetI2SDacEnable(false);
        SetMemoryPathEnable(Soc_Aud_Digital_Block_I2S_OUT_DAC, false);
        Voice_ExtInt_Status &= ~VOICE_DL_ON;
        if(Voice_ExtInt_Status == 0)
        {
            SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I21, Soc_Aud_InterConnectionOutput_O07);
            SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I21, Soc_Aud_InterConnectionOutput_O08);
            SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I09, Soc_Aud_InterConnectionOutput_O25);
            SetModemPcmEnable(MODEM_EXTERNAL, false);
            SetModemPcmEnable(MODEM_1, false);
        }
        EnableAfe(false);
        AudDrv_Clk_Off();
        AudDrv_ADC_Clk_Off();
    }
    else if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
    {
        printk("%s  with SNDRV_PCM_STREAM_CAPTURE \n",__func__);
        SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I03, Soc_Aud_InterConnectionOutput_O17);
        SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I04, Soc_Aud_InterConnectionOutput_O18);
        SetI2SAdcEnable(false);
        SetMemoryPathEnable(Soc_Aud_Digital_Block_I2S_IN_ADC, false);
        Voice_ExtInt_Status &= ~VOICE_UL_ON;
        if(Voice_ExtInt_Status == 0)
        {
            SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I21, Soc_Aud_InterConnectionOutput_O07);
            SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I21, Soc_Aud_InterConnectionOutput_O08);
            SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I09, Soc_Aud_InterConnectionOutput_O25);
            SetModemPcmEnable(MODEM_EXTERNAL, false);
            SetModemPcmEnable(MODEM_1, false);
        }
        EnableAfe(false);
        AudDrv_Clk_Off();
        AudDrv_ADC_Clk_Off();
    }

    SetExternalModemStatus(false);

    return 0;
}
开发者ID:Scorpio92,项目名称:mediatek,代码行数:49,代码来源:mt_soc_pcm_voice_extint.c


示例4: mtk_i2s0_awb_pcm_close

static int mtk_i2s0_awb_pcm_close(struct snd_pcm_substream *substream)
{
/*modified by jiaqing.yang for ALPS02074446(For_JHZ6735M_65C_L_ALPS.L1.MP3.V1_P67) 20150706 begin*/
    AudDrv_Clk_Off();
/*modified by jiaqing.yang for ALPS02074446(For_JHZ6735M_65C_L_ALPS.L1.MP3.V1_P67) 20150706 end*/
    return 0;
}
开发者ID:hacknmtk,项目名称:android_kernel_alcatel_5017,代码行数:7,代码来源:mt_soc_pcm_i2s0_awb.c


示例5: mtk_soc_pcm_dl2_close

static int mtk_soc_pcm_dl2_close(struct snd_pcm_substream *substream)
{
	pr_warn("%s\n", __func__);

	if (mPrepareDone == true) {
		/* stop DAC output */
		SetMemoryPathEnable(Soc_Aud_Digital_Block_I2S_OUT_DAC, false);
		if (GetI2SDacEnable() == false)
			SetI2SDacEnable(false);

		RemoveMemifSubStream(Soc_Aud_Digital_Block_MEM_DL2, substream);

		EnableAfe(false);
		mPrepareDone = false;
	}

	if (mPlaybackSramState == SRAM_STATE_PLAYBACKDRAM)
		AudDrv_Emi_Clk_Off();

	AfeControlSramLock();
	ClearSramState(mPlaybackSramState);
	mPlaybackSramState = GetSramState();
	AfeControlSramUnLock();
	AudDrv_Clk_Off();
	return 0;
}
开发者ID:P-D-A,项目名称:android_kernel_lge_mt6753,代码行数:26,代码来源:mt_soc_pcm_dl2.c


示例6: mtk_fm_i2s_awb_pcm_close

static int mtk_fm_i2s_awb_pcm_close(struct snd_pcm_substream *substream)
{
	AudDrv_Emi_Clk_Off();
	AudDrv_I2S_Clk_Off();
	AudDrv_Clk_Off();
	return 0;
}
开发者ID:John677,项目名称:Kernal_k3note,代码行数:7,代码来源:mt_soc_pcm_fm_i2s_awb.c


示例7: mtk_pcm_fmtx_stop

static int mtk_pcm_fmtx_stop(struct snd_pcm_substream *substream)
{
    struct snd_pcm_runtime *runtime = substream->runtime;

    //AFE_BLOCK_T *Afe_Block = &(pMemControl->rBlock);
    PRINTK_AUD_FMTX("mtk_pcm_fmtx_stop \n");

    SetIrqEnable(Soc_Aud_IRQ_MCU_MODE_IRQ1_MCU_MODE, false);

    // here to turn off digital part
    SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I05, Soc_Aud_InterConnectionOutput_O00);
    SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I06, Soc_Aud_InterConnectionOutput_O01);

    //    if (GetMrgI2SEnable() == false)
    //    {
    SetMrgI2SEnable(false, runtime->rate);
    //    }

    SetMemoryPathEnable(Soc_Aud_Digital_Block_MEM_DL1, false);

    SetMemoryPathEnable(Soc_Aud_Digital_Block_MRG_I2S_OUT, false);

    Set2ndI2SOutEnable(false);

    EnableAfe(false);

    RemoveMemifSubStream(Soc_Aud_Digital_Block_MEM_DL1, substream);
    AudDrv_Clk_Off();

    return 0;
}
开发者ID:4Fwolf,项目名称:signal75-kernel-3.10.61,代码行数:31,代码来源:mt_soc_pcm_fmtx.c


示例8: mtk_pcm_fm_i2s_close

static int mtk_pcm_fm_i2s_close(struct snd_pcm_substream *substream)
{
    struct snd_pcm_runtime *runtime = substream->runtime;
    printk("%s rate = %d\n", __func__, runtime->rate);

    //mtk_wcn_cmb_stub_audio_ctrl((CMB_STUB_AIF_X)CMB_STUB_AIF_0);//temp mark for early porting

    SetMemoryPathEnable(Soc_Aud_Digital_Block_I2S_IN_2, false);
    if (GetMemoryPathEnable(Soc_Aud_Digital_Block_I2S_IN_2) == false)
    {
        SetI2SASRCEnable(false);
        SetI2SASRCConfig(false, 0); // Setting to bypass ASRC
        Set2ndI2SInEnable(false);
    }

    SetMemoryPathEnable(Soc_Aud_Digital_Block_I2S_OUT_DAC, false);
    if (GetI2SDacEnable() == false)
    {
        SetI2SDacEnable(false);
    }

    // interconnection setting
    SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I00, Soc_Aud_InterConnectionOutput_O13);
    SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I01, Soc_Aud_InterConnectionOutput_O14);
    SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I10, Soc_Aud_InterConnectionOutput_O03);
    SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I11, Soc_Aud_InterConnectionOutput_O04);


    EnableAfe(false);

    AudDrv_I2S_Clk_Off();
    AudDrv_Clk_Off();
    mPrepareDone = false;
    return 0;
}
开发者ID:AudioGod,项目名称:MediaTek-HelioX10-Kernel,代码行数:35,代码来源:mt_soc_pcm_fm_i2s.c


示例9: mtk_pcm_i2s0_stop

static int mtk_pcm_i2s0_stop(struct snd_pcm_substream *substream)
{
    AFE_BLOCK_T *Afe_Block = &(pI2s0MemControl->rBlock);

    printk("mtk_pcm_i2s0_stop \n");
    SetIrqEnable(Soc_Aud_IRQ_MCU_MODE_IRQ1_MCU_MODE, false);

    // here start digital part
    SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I05, Soc_Aud_InterConnectionOutput_O00);
    SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I06, Soc_Aud_InterConnectionOutput_O01);
    SetMemoryPathEnable(Soc_Aud_Digital_Block_MEM_DL1, false);

    // stop I2S
    Afe_Set_Reg(AFE_I2S_CON3, 0x0, 0x1);
    Afe_Set_Reg(AFE_I2S_CON, 0x0, 0x1);

    EnableAfe(false);

    // clean audio hardware buffer
    memset(Afe_Block->pucVirtBufAddr, 0, Afe_Block->u4BufferSize);
    RemoveMemifSubStream(Soc_Aud_Digital_Block_MEM_DL1,substream);
    AudDrv_Clk_Off();

    return 0;
}
开发者ID:Scorpio92,项目名称:mediatek,代码行数:25,代码来源:mt_soc_pcm_dl1_i2s0.c


示例10: mtk_mrgrx_awb_pcm_close

static int mtk_mrgrx_awb_pcm_close(struct snd_pcm_substream *substream)
{
    AudDrv_Emi_Clk_Off();
    AudDrv_Clk_Off();
	AudDrv_ANA_Clk_Off();
    return 0;
}
开发者ID:dimsink1,项目名称:android_kernel_alcatel_4033,代码行数:7,代码来源:mt_soc_pcm_mrgrx_awb.c


示例11: mtk_pcm_mrgrx_close

static int mtk_pcm_mrgrx_close(struct snd_pcm_substream *substream)
{
    struct snd_pcm_runtime *runtime = substream->runtime;
    printk("%s \n", __func__);

    mtk_wcn_cmb_stub_audio_ctrl((CMB_STUB_AIF_X)CMB_STUB_AIF_0);

    SetMemoryPathEnable(Soc_Aud_Digital_Block_MRG_I2S_OUT, false);
    if (GetMemoryPathEnable(Soc_Aud_Digital_Block_MRG_I2S_OUT) == false)
    {
        SetMrgI2SEnable(false, runtime->rate);
    }

    SetMemoryPathEnable(Soc_Aud_Digital_Block_I2S_OUT_DAC, false);
    if (GetI2SDacEnable() == false)
    {
        SetI2SDacEnable(false);
    }

    // interconnection setting
    SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I15, Soc_Aud_InterConnectionOutput_O13);
    SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I16, Soc_Aud_InterConnectionOutput_O14);

    SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I10, Soc_Aud_InterConnectionOutput_O03);
    SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I11, Soc_Aud_InterConnectionOutput_O04);


    EnableAfe(false);

    AudDrv_Clk_Off();
    mPrepareDone = false;
    return 0;
}
开发者ID:AudioGod,项目名称:MediaTek-HelioX10-Kernel,代码行数:33,代码来源:mt_soc_pcm_mrgrx.c


示例12: Audio_i2s0_hdoutput_Set

static int Audio_i2s0_hdoutput_Set(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
    printk("+%s()\n", __func__);
    if (ucontrol->value.enumerated.item[0] > ARRAY_SIZE(i2s0_HD_output))
    {
        printk("return -EINVAL\n");
        return -EINVAL;
    }
    AudDrv_Clk_On();
    mi2s0_hdoutput_control = ucontrol->value.integer.value[0];
    if (mi2s0_hdoutput_control)
    {
        // set APLL clock setting
        EnableApll1(true);
        EnableApll2(true);
        EnableI2SDivPower(AUDIO_APLL1_DIV0, true);
        EnableI2SDivPower(AUDIO_APLL2_DIV0, true);
    }
    else
    {
        // set APLL clock setting
        EnableApll1(false);
        EnableApll2(false);
        EnableI2SDivPower(AUDIO_APLL1_DIV0, false);
        EnableI2SDivPower(AUDIO_APLL2_DIV0, false);
    }
    AudDrv_Clk_Off();
    return 0;
}
开发者ID:Niisp,项目名称:MT6795.kernel,代码行数:29,代码来源:mt_soc_pcm_dl1_i2s0.c


示例13: mtk_pcm_dl1Bt_stop

static int mtk_pcm_dl1Bt_stop(struct snd_pcm_substream *substream)
{

    AFE_BLOCK_T *Afe_Block = &(pdl1btMemControl->rBlock);
    PRINTK_AUDDRV("mtk_pcm_dl1Bt_stop \n");

    SetIrqEnable(Soc_Aud_IRQ_MCU_MODE_IRQ1_MCU_MODE, false);

    // here to turn off digital part
    SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I05, Soc_Aud_InterConnectionOutput_O02);
    SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I06, Soc_Aud_InterConnectionOutput_O02);
    SetMemoryPathEnable(Soc_Aud_Digital_Block_MEM_DL1, false);

    SetIrqEnable(Soc_Aud_IRQ_MCU_MODE_IRQ1_MCU_MODE, false);

    SetMemoryPathEnable(Soc_Aud_Digital_Block_DAI_BT, false);
    if (GetMemoryPathEnable(Soc_Aud_Digital_Block_DAI_BT) == false)
    {
        SetDaiBtEnable(false);
    }

    EnableAfe(false);
    RemoveMemifSubStream(Soc_Aud_Digital_Block_MEM_DL1,substream);
    AudDrv_Clk_Off();

    return 0;
}
开发者ID:alex-tu-cc,项目名称:m75,代码行数:27,代码来源:mt_soc_pcm_dl1_bt.c


示例14: mtk_pcm_dl1Bt_stop

static int mtk_pcm_dl1Bt_stop(struct snd_pcm_substream *substream)
{

	PRINTK_AUDDRV("mtk_pcm_dl1Bt_stop\n");

	SetIrqEnable(Soc_Aud_IRQ_MCU_MODE_IRQ1_MCU_MODE, false);

	/* here to turn off digital part */
	SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I05,
		      Soc_Aud_InterConnectionOutput_O02);
	SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I06,
		      Soc_Aud_InterConnectionOutput_O02);
	SetMemoryPathEnable(Soc_Aud_Digital_Block_MEM_DL1, false);

	SetIrqEnable(Soc_Aud_IRQ_MCU_MODE_IRQ1_MCU_MODE, false);

	SetMemoryPathEnable(Soc_Aud_Digital_Block_DAI_BT, false);
	if (GetMemoryPathEnable(Soc_Aud_Digital_Block_DAI_BT) == false) {
		/* turn off DAI BT if not using */
		SetDaiBtEnable(false);
	}

	EnableAfe(false);
	RemoveMemifSubStream(Soc_Aud_Digital_Block_MEM_DL1, substream);
	AudDrv_Clk_Off();

	return 0;
}
开发者ID:John677,项目名称:Kernal_k3note,代码行数:28,代码来源:mt_soc_pcm_dl1_bt.c


示例15: mtk_pcm_dl1_stop

static int mtk_pcm_dl1_stop(struct snd_pcm_substream *substream)
{

    AFE_BLOCK_T *Afe_Block = &(pMemControl->rBlock);
    PRINTK_AUDDRV("mtk_pcm_dl1_stop \n");

    printk("%s \n", __func__);
    SetIrqEnable(Soc_Aud_IRQ_MCU_MODE_IRQ1_MCU_MODE, false);

    // here to turn off digital part
    SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I05, Soc_Aud_InterConnectionOutput_O03);
    SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I06, Soc_Aud_InterConnectionOutput_O04);
    SetMemoryPathEnable(Soc_Aud_Digital_Block_MEM_DL1, false);

    SetMemoryPathEnable(Soc_Aud_Digital_Block_I2S_OUT_DAC, false);
    if (GetI2SDacEnable() == false)
    {
        SetI2SDacEnable(false);
    }
    EnableAfe(false);
    RemoveMemifSubStream(Soc_Aud_Digital_Block_MEM_DL1,substream);
    AudDrv_Clk_Off();

    return 0;
}
开发者ID:Scorpio92,项目名称:mediatek,代码行数:25,代码来源:mt_soc_pcm_dl1.c


示例16: mtk_pcm_i2s0_open

static int mtk_pcm_i2s0_open(struct snd_pcm_substream *substream)
{
    int ret = 0;
    struct snd_pcm_runtime *runtime = substream->runtime;
    AfeControlSramLock();
    if (GetSramState() == SRAM_STATE_FREE)
    {
        mtk_i2s0_hardware.buffer_bytes_max = GetPLaybackSramFullSize();
        mPlaybackSramState = SRAM_STATE_PLAYBACKFULL;
        SetSramState(mPlaybackSramState);
    }
    else
    {
        mtk_i2s0_hardware.buffer_bytes_max = GetPLaybackSramPartial();
        mPlaybackSramState = SRAM_STATE_PLAYBACKPARTIAL;
        SetSramState(mPlaybackSramState);
    }
    AfeControlSramUnLock();
    runtime->hw = mtk_i2s0_hardware;

    printk("mtk_pcm_i2s0_open\n");

    AudDrv_Clk_On();
    memcpy((void *)(&(runtime->hw)), (void *)&mtk_i2s0_hardware , sizeof(struct snd_pcm_hardware));
    pI2s0MemControl = Get_Mem_ControlT(Soc_Aud_Digital_Block_MEM_DL1);


    ret = snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
                                     &constraints_sample_rates);
    ret = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS);

    if (ret < 0)
    {
        printk("snd_pcm_hw_constraint_integer failed\n");
    }

    //print for hw pcm information
    printk("mtk_pcm_i2s0_open runtime rate = %d channels = %d substream->pcm->device = %d\n",
           runtime->rate, runtime->channels, substream->pcm->device);

    if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
    {
        printk("SNDRV_PCM_STREAM_PLAYBACK mtkalsa_i2s0_playback_constraints\n");
    }
    else
    {

    }

    if (ret < 0)
    {
        printk("mtk_pcm_i2s0_close\n");
        mtk_pcm_i2s0_close(substream);
        return ret;
    }
    printk("mtk_pcm_i2s0_open return\n");
    AudDrv_Clk_Off();
    return 0;
}
开发者ID:AudioGod,项目名称:MediaTek-HelioX10-Kernel,代码行数:59,代码来源:mt_soc_pcm_dl1_i2s0.c


示例17: Audio_Irqcnt2_Get

static int Audio_Irqcnt2_Get(struct snd_kcontrol *kcontrol,
                             struct snd_ctl_elem_value *ucontrol)
{
    printk("Audio_Irqcnt2_Get \n");
    AudDrv_Clk_On();
    ucontrol->value.integer.value[0] =   Afe_Get_Reg(AFE_IRQ_MCU_CNT2);
    AudDrv_Clk_Off();
    return 0;
}
开发者ID:Jlsmily,项目名称:android_kernel_meilan2,代码行数:9,代码来源:mt_soc_pcm_routing.c


示例18: Audio_Irqcnt2_Set

static int Audio_Irqcnt2_Set(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
    uint32 irq1_cnt =  ucontrol->value.integer.value[0];
    printk("%s()\n", __func__);
    AudDrv_Clk_On();
    Afe_Set_Reg(AFE_IRQ_MCU_CNT2, irq1_cnt, 0xffffffff);
    AudDrv_Clk_Off();
    return 0;
}
开发者ID:Jlsmily,项目名称:android_kernel_meilan2,代码行数:9,代码来源:mt_soc_pcm_routing.c


示例19: mtk_Dl1Bt_close

static int mtk_Dl1Bt_close(struct snd_pcm_substream *substream)
{
	PRINTK_AUDDRV("%s\n", __func__);
	AfeControlSramLock();
	ClearSramState(mPlaybackSramState);
	mPlaybackSramState = GetSramState();
	AfeControlSramUnLock();
	AudDrv_Clk_Off();
	return 0;
}
开发者ID:John677,项目名称:Kernal_k3note,代码行数:10,代码来源:mt_soc_pcm_dl1_bt.c


示例20: GetAudioTrimOffset

static void GetAudioTrimOffset(int channels)
{
    int Buffer_on_value = 0 , Buffer_offl_value = 0, Buffer_offr_value = 0;
    const int off_counter = 20, on_counter  = 20 , Const_DC_OFFSET = 0;//2048;
    printk("%s channels = %d\n", __func__, channels);
    // open headphone and digital part
    AudDrv_Clk_On();
    AudDrv_Emi_Clk_On();
    OpenAfeDigitaldl1(true);

    setHpDcCalibration(AUDIO_ANALOG_DEVICE_OUT_HEADSETR, 0);
    setHpDcCalibration(AUDIO_ANALOG_DEVICE_OUT_HEADSETL, 0);
    //get DC value when off
//Sammodi Todo, need enable this on Rainier
#ifdef RAINIER_NEED_CHECK
    Buffer_offl_value = PMIC_IMM_GetOneChannelValue(AUXADC_HP_L_CHANNEL, off_counter, 0);
#endif    
    printk("%s, Buffer_offl_value = %d \n",__func__, Buffer_offl_value);

    
//Sammodi Todo, need enable this
#ifdef RAINIER_NEED_CHECK
    Buffer_offr_value = PMIC_IMM_GetOneChannelValue(AUXADC_HP_R_CHANNEL, off_counter, 0);
#endif
    printk("%s, Buffer_offr_value = %d \n",__func__, Buffer_offr_value);

    OpenAnalogHeadphone(true);
    setHpDcCalibrationGain(AUDIO_ANALOG_DEVICE_OUT_HEADSETR,10);    // -1dB, (9-(-1) = 10)
    setHpDcCalibrationGain(AUDIO_ANALOG_DEVICE_OUT_HEADSETL,10);

    msleep(10);
//Sammodi Todo, need enable this  
#ifdef RAINIER_NEED_CHECK
    Buffer_on_value = PMIC_IMM_GetOneChannelValue(AUXADC_HP_L_CHANNEL, on_counter, 0);
#endif
    mHplOffset = Buffer_on_value - Buffer_offl_value + Const_DC_OFFSET;
    printk("%s, Buffer_on_value = %d Buffer_offl_value = %d mHplOffset = %d \n", __func__,Buffer_on_value, Buffer_offl_value, mHplOffset);

//Sammodi Todo, need enable this 
#ifdef RAINIER_NEED_CHECK
    Buffer_on_value = PMIC_IMM_GetOneChannelValue(AUXADC_HP_R_CHANNEL, on_counter, 0);
#endif
    mHprOffset = Buffer_on_value - Buffer_offr_value + Const_DC_OFFSET;
    printk("%s, Buffer_on_value = %d Buffer_offr_value = %d mHprOffset = %d \n", __func__,Buffer_on_value, Buffer_offr_value, mHprOffset);

    
    OpenAnalogHeadphone(false);
    
    OpenAfeDigitaldl1(false);

    AudDrv_Emi_Clk_Off();
    AudDrv_Clk_Off();

}
开发者ID:Jlsmily,项目名称:android_kernel_meilan2,代码行数:54,代码来源:mt_soc_pcm_routing.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ AudDrv_Clk_On函数代码示例发布时间:2022-05-30
下一篇:
C++ AuDbg函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap