本文整理汇总了C++中AudDrv_Clk_Off函数的典型用法代码示例。如果您正苦于以下问题:C++ AudDrv_Clk_Off函数的具体用法?C++ AudDrv_Clk_Off怎么用?C++ AudDrv_Clk_Off使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了AudDrv_Clk_Off函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}