本文整理汇总了C++中AudDrv_Clk_On函数的典型用法代码示例。如果您正苦于以下问题:C++ AudDrv_Clk_On函数的具体用法?C++ AudDrv_Clk_On怎么用?C++ AudDrv_Clk_On使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了AudDrv_Clk_On函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: mtk_voice_extint_pm_ops_suspend
//supend and resume function
static int mtk_voice_extint_pm_ops_suspend(struct device *device)
{
// if now in phone call state, not suspend!!
bool b_modem1_speech_on;
bool b_modem2_speech_on;
AudDrv_Clk_On();//should enable clk for access reg
b_modem1_speech_on = (bool)(Afe_Get_Reg(PCM2_INTF_CON) & 0x1);
b_modem2_speech_on = (bool)(Afe_Get_Reg(PCM_INTF_CON) & 0x1);
AudDrv_Clk_Off();//should enable clk for access reg
if (b_modem1_speech_on == true || b_modem2_speech_on == true)
{
clkmux_sel(MT_MUX_AUDINTBUS, 0, "AUDIO"); //select 26M
return 0;
}
return 0;
}
开发者ID:SelfImp,项目名称:m75,代码行数:17,代码来源:mt_soc_pcm_voice_extint.c
示例2: mtk_voice_pm_ops_resume
static int mtk_voice_pm_ops_resume(struct device *device)
{
bool b_modem1_speech_on;
bool b_modem2_speech_on;
AudDrv_Clk_On();//should enable clk for access reg
b_modem1_speech_on = (bool)(Afe_Get_Reg(PCM2_INTF_CON) & 0x1);
b_modem2_speech_on = (bool)(Afe_Get_Reg(PCM_INTF_CON) & 0x1);
AudDrv_Clk_Off();
if (b_modem1_speech_on == true || b_modem2_speech_on == true)
{
clkmux_sel(MT_MUX_AUDINTBUS, 1, "AUDIO"); //mainpll
return 0;
}
return 0;
}
开发者ID:Scorpio92,项目名称:mediatek,代码行数:16,代码来源:mt_soc_pcm_voice_md1.c
示例3: mtk_dl1_awb_pcm_open
static int mtk_dl1_awb_pcm_open(struct snd_pcm_substream *substream)
{
struct snd_pcm_runtime *runtime = substream->runtime;
int ret = 0;
printk("mtk_dl1_awb_pcm_open\n");
Dl1_AWB_Control_context = Get_Mem_ControlT(Soc_Aud_Digital_Block_MEM_AWB);
runtime->hw = mtk_dl1_awb_hardware;
memcpy((void *)(&(runtime->hw)), (void *)&mtk_dl1_awb_hardware , sizeof(struct snd_pcm_hardware));
ret = snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
&dl1_awb_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");
}
// here open audio clocks
AudDrv_Clk_On();
//print for hw pcm information
printk("mtk_dl1_awb_pcm_open runtime rate = %d channels = %d \n", runtime->rate, runtime->channels);
runtime->hw.info |= SNDRV_PCM_INFO_INTERLEAVED;
runtime->hw.info |= SNDRV_PCM_INFO_NONINTERLEAVED;
runtime->hw.info |= SNDRV_PCM_INFO_MMAP_VALID;
if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
{
printk("SNDRV_PCM_STREAM_CAPTURE \n");
}
else
{
return -1;
}
if (ret < 0)
{
printk("mtk_dl1_awb_pcm_close\n");
mtk_dl1_awb_pcm_close(substream);
return ret;
}
AudDrv_Emi_Clk_On();
printk("mtk_dl1_awb_pcm_open return\n");
return 0;
}
开发者ID:Jlsmily,项目名称:android_kernel_meilan2,代码行数:46,代码来源:mt_soc_pcm_dl1_awb.c
示例4: mtk_voice_md2_bt_pm_ops_resume
static int mtk_voice_md2_bt_pm_ops_resume(struct device *device)
{
bool b_modem1_speech_on;
bool b_modem2_speech_on;
AudDrv_Clk_On();//should enable clk for access reg
b_modem1_speech_on = (bool)(Afe_Get_Reg(PCM2_INTF_CON) & 0x1);
b_modem2_speech_on = (bool)(Afe_Get_Reg(PCM_INTF_CON) & 0x1);
AudDrv_Clk_Off();
if (b_modem1_speech_on == true || b_modem2_speech_on == true)
{
//clkmux_sel(MT_MUX_AUDINTBUS, 0, "AUDIO");
SetClkCfg(AUDIO_CLK_CFG_4, 0x1000000, 0x1000000);
return 0;
}
return 0;
}
开发者ID:Swapnil133609,项目名称:Zeus_exp,代码行数:17,代码来源:mt_soc_pcm_voice_md2_bt.c
示例5: mtk_voice_pm_ops_resume
static int mtk_voice_pm_ops_resume(struct device *device)
{
bool b_modem1_speech_on;
bool b_modem2_speech_on;
AudDrv_Clk_On(); /* should enable clk for access reg */
b_modem1_speech_on = (bool) (Afe_Get_Reg(PCM2_INTF_CON) & 0x1);
b_modem2_speech_on = (bool) (Afe_Get_Reg(PCM_INTF_CON) & 0x1);
AudDrv_Clk_Off();
if (b_modem1_speech_on == true || b_modem2_speech_on == true) {
/* mainpll */
clkmux_sel(MT_CLKMUX_AUD_HF_26M_SEL, MT_CG_SYS_TEMP, "AUDIO ");
clkmux_sel(MT_CLKMUX_AUD_INTBUS_SEL, MT_CG_MPLL_D12, "AUDIO ");
return 0;
}
return 0;
}
开发者ID:John677,项目名称:Kernal_k3note,代码行数:17,代码来源:mt_soc_pcm_voice_md1.c
示例6: mtk_voice_pcm_open
static int mtk_voice_pcm_open(struct snd_pcm_substream *substream)
{
struct snd_pcm_runtime *runtime = substream->runtime;
int err = 0;
int ret = 0;
AudDrv_Clk_On();
AudDrv_ADC_Clk_On();
pr_warn("mtk_voice_pcm_open\n");
if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) {
pr_warn("%s with SNDRV_PCM_STREAM_CAPTURE\n", __func__);
runtime->rate = 16000;
return 0;
}
runtime->hw = mtk_pcm_hardware;
memcpy((void *)(&(runtime->hw)), (void *)&mtk_pcm_hardware,
sizeof(struct snd_pcm_hardware));
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)
pr_warn("snd_pcm_hw_constraint_integer failed\n");
/* print for hw pcm information */
pr_warn("mtk_voice_pcm_open runtime rate = %d channels = %d\n", runtime->rate,
runtime->channels);
runtime->hw.info |= SNDRV_PCM_INFO_INTERLEAVED;
runtime->hw.info |= SNDRV_PCM_INFO_NONINTERLEAVED;
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
pr_warn("SNDRV_PCM_STREAM_PLAYBACK mtkalsa_voice_constraints\n");
runtime->rate = 16000;
}
if (err < 0) {
pr_warn("mtk_voice_close\n");
mtk_voice_close(substream);
return err;
}
pr_warn("mtk_voice_pcm_open return\n");
return 0;
}
开发者ID:John677,项目名称:Kernal_k3note,代码行数:46,代码来源:mt_soc_pcm_voice_md1.c
示例7: mtk_voice_bt1_prepare
static int mtk_voice_bt1_prepare(struct snd_pcm_substream *substream)
{
struct snd_pcm_runtime *runtimeStream = substream->runtime;
pr_debug("mtk_alsa_prepare rate = %d channels = %d period_size = %lu\n",
runtimeStream->rate, runtimeStream->channels, runtimeStream->period_size);
if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) {
pr_err("%s with SNDRV_PCM_STREAM_CAPTURE\n", __func__);
return 0;
}
AudDrv_ANA_Clk_On();
AudDrv_Clk_On();
/* here start digital part */
SetConnection(Soc_Aud_InterCon_Connection, Soc_Aud_InterConnectionInput_I02,
Soc_Aud_InterConnectionOutput_O17);
SetConnection(Soc_Aud_InterCon_Connection, Soc_Aud_InterConnectionInput_I02,
Soc_Aud_InterConnectionOutput_O18);
SetConnection(Soc_Aud_InterCon_Connection, Soc_Aud_InterConnectionInput_I14,
Soc_Aud_InterConnectionOutput_O02);
SetConnection(Soc_Aud_InterCon_Connection, Soc_Aud_InterConnectionInput_I21,
Soc_Aud_InterConnectionOutput_O08);
if (GetMemoryPathEnable(Soc_Aud_Digital_Block_DAI_BT) == false) {
/* set merge interface */
SetMemoryPathEnable(Soc_Aud_Digital_Block_DAI_BT, true);
} else
SetMemoryPathEnable(Soc_Aud_Digital_Block_DAI_BT, true);
/* now use samplerate 8000 */
SetModemSpeechDAIBTAttribute(runtimeStream->rate);
SetDaiBtEnable(true);
voice_bt1Pcm.mPcmModeWidebandSel =
(runtimeStream->rate ==
8000) ? Soc_Aud_PCM_MODE_PCM_MODE_8K : Soc_Aud_PCM_MODE_PCM_MODE_16K;
voice_bt1Pcm.mAsyncFifoSel = Soc_Aud_BYPASS_SRC_SLAVE_USE_ASYNC_FIFO;
SetModemPcmConfig(MODEM_1, voice_bt1Pcm);
SetModemPcmEnable(MODEM_1, true);
EnableAfe(true);
voice_bt_Status = true;
return 0;
}
开发者ID:P-D-A,项目名称:android_kernel_lge_mt6753,代码行数:45,代码来源:mt_soc_pcm_voice_md1_bt.c
示例8: mtk_pcm_fmtx_open
static int mtk_pcm_fmtx_open(struct snd_pcm_substream *substream)
{
int ret = 0;
struct snd_pcm_runtime *runtime = substream->runtime;
PRINTK_AUD_FMTX("mtk_pcm_fmtx_open\n");
AudDrv_Clk_On();
// get dl1 memconptrol and record substream
pMemControl = Get_Mem_ControlT(Soc_Aud_Digital_Block_MEM_DL1);
runtime->hw = mtk_fmtx_hardware;
memcpy((void *)(&(runtime->hw)), (void *)&mtk_fmtx_hardware , sizeof(struct snd_pcm_hardware));
//PRINTK_AUDDRV("runtime->hw->rates= 0x%x mtk_pcm_hardware = = 0x%x\n ", runtime->hw.rates, &mtk_pcm_hardware);
ret = snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
&constraints_fmtx_sample_rates);
ret = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS);
if (ret < 0)
{
PRINTK_AUD_FMTX("[mtk_pcm_fmtx_open]snd_pcm_hw_constraint_integer failed\n");
}
//print for hw pcm information
PRINTK_AUD_FMTX("[mtk_pcm_fmtx_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_AUD_FMTX("[mtk_pcm_fmtx_open]SNDRV_PCM_FMTX_PLAYBACK mtkalsa_playback_constraints\n");
}
else
{
}
if (ret < 0)
{
PRINTK_AUD_FMTX("[mtk_pcm_fmtx_open]mtk_pcm_fmtx_close\n");
mtk_pcm_fmtx_close(substream);
return ret;
}
//PRINTK_AUDDRV("mtk_pcm_open return\n");
return 0;
}
开发者ID:4Fwolf,项目名称:signal75-kernel-3.10.61,代码行数:44,代码来源:mt_soc_pcm_fmtx.c
示例9: mtk_pcm_fm_i2s_open
static int mtk_pcm_fm_i2s_open(struct snd_pcm_substream *substream)
{
struct snd_pcm_runtime *runtime = substream->runtime;
int ret = 0;
AudDrv_Clk_On();
AudDrv_I2S_Clk_On();
printk("mtk_pcm_fm_i2s_open\n");
runtime->hw = mtk_fm_i2s_hardware;
memcpy((void *)(&(runtime->hw)), (void *)&mtk_fm_i2s_hardware , sizeof(struct snd_pcm_hardware));
ret = snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
&fm_i2s_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");
}
printk("mtk_pcm_fm_i2s_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_fm_i2s_playback_constraints\n");
}
else
{
}
if (ret < 0)
{
printk("mtk_pcm_fm_i2s_close\n");
mtk_pcm_fm_i2s_close(substream);
return ret;
}
SetFMEnableFlag(true);
printk("mtk_pcm_fm_i2s_open return\n");
return 0;
}
开发者ID:John677,项目名称:Kernal_k3note,代码行数:42,代码来源:mt_soc_pcm_fm_i2s.c
示例10: Audio_I2S0dl1_hdoutput_Set
static int Audio_I2S0dl1_hdoutput_Set(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{
printk("%s()\n", __func__);
if (ucontrol->value.enumerated.item[0] > ARRAY_SIZE(I2S0dl1_HD_output))
{
printk("return -EINVAL\n");
return -EINVAL;
}
mI2S0dl1_hdoutput_control = ucontrol->value.integer.value[0];
if (GetMemoryPathEnable(Soc_Aud_Digital_Block_MEM_HDMI) == true )
{
printk("return HDMI enabled\n");
return 0;
}
if (mI2S0dl1_hdoutput_control)
{
// set APLL clock setting
AudDrv_Clk_On();
EnableApll1(true);
EnableApll2(true);
EnableI2SDivPower(AUDIO_APLL1_DIV0, true);
EnableI2SDivPower(AUDIO_APLL2_DIV0, true);
AudDrv_APLL1Tuner_Clk_On();
AudDrv_APLL2Tuner_Clk_On();
}
else
{
// set APLL clock setting
EnableApll1(false);
EnableApll2(false);
EnableI2SDivPower(AUDIO_APLL1_DIV0, false);
EnableI2SDivPower(AUDIO_APLL2_DIV0, false);
AudDrv_APLL1Tuner_Clk_Off();
AudDrv_APLL2Tuner_Clk_Off();
AudDrv_Clk_Off();
}
return 0;
}
开发者ID:AudioGod,项目名称:MediaTek-HelioX10-Kernel,代码行数:42,代码来源:mt_soc_pcm_dl1_i2s0Dl1.c
示例11: mtk_pcm_dl2_open
static int mtk_pcm_dl2_open(struct snd_pcm_substream *substream)
{
int ret = 0;
struct snd_pcm_runtime *runtime = substream->runtime;
PRINTK_AUDDRV("mtk_pcm_dl2_open\n");
mtk_pcm_dl2_hardware.buffer_bytes_max = GetPLaybackDramLowLatencySize();
mPlaybackSramState = SRAM_STATE_PLAYBACKDRAM;
mPlaybackUseSram = false;
if (mPlaybackSramState == SRAM_STATE_PLAYBACKDRAM)
AudDrv_Emi_Clk_On();
pr_warn("mtk_pcm_dl2_hardware.buffer_bytes_max = %zu mPlaybackSramState = %d\n",
mtk_pcm_dl2_hardware.buffer_bytes_max, mPlaybackSramState);
runtime->hw = mtk_pcm_dl2_hardware;
AudDrv_Clk_On();
memcpy((void *)(&(runtime->hw)), (void *)&mtk_pcm_dl2_hardware,
sizeof(struct snd_pcm_hardware));
pMemControl = Get_Mem_ControlT(Soc_Aud_Digital_Block_MEM_DL2);
ret = snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
&constraints_sample_rates);
if (ret < 0)
pr_err("snd_pcm_hw_constraint_integer failed\n");
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
pr_warn("SNDRV_PCM_STREAM_PLAYBACK mtkalsa_dl2playback_constraints\n");
else
pr_warn("SNDRV_PCM_STREAM_CAPTURE mtkalsa_dl2playback_constraints\n");
if (ret < 0) {
pr_err("ret < 0 mtk_soc_pcm_dl2_close\n");
mtk_soc_pcm_dl2_close(substream);
return ret;
}
/* PRINTK_AUDDRV("mtk_pcm_dl2_open return\n"); */
return 0;
}
开发者ID:P-D-A,项目名称:android_kernel_lge_mt6753,代码行数:41,代码来源:mt_soc_pcm_dl2.c
示例12: mtk_mrgrx_awb_pcm_open
static int mtk_mrgrx_awb_pcm_open(struct snd_pcm_substream *substream)
{
struct snd_pcm_runtime *runtime = substream->runtime;
int ret = 0;
printk("mtk_mrgrx_awb_pcm_open\n");
Mrgrx_AWB_Control_context = Get_Mem_ControlT(Soc_Aud_Digital_Block_MEM_AWB);
runtime->hw = mtk_mgrrx_awb_hardware;
memcpy((void *)(&(runtime->hw)), (void *)&mtk_mgrrx_awb_hardware , sizeof(struct snd_pcm_hardware));
ret = snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
&mrgrx_awb_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");
}
printk("mtk_mrgrx_awb_pcm_open runtime rate = %d channels = %d \n", runtime->rate, runtime->channels);
if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
{
printk("SNDRV_PCM_STREAM_CAPTURE \n");
}
else
{
return -1;
}
// here open audio clocks
AudDrv_Clk_On();
AudDrv_I2S_Clk_On();
if (ret < 0)
{
printk("mtk_mrgrx_awb_pcm_close\n");
mtk_mrgrx_awb_pcm_close(substream);
return ret;
}
printk("mtk_mrgrx_awb_pcm_open return\n");
return 0;
}
开发者ID:Swapnil133609,项目名称:Zeus_exp,代码行数:41,代码来源:mt_soc_pcm_mrgrx_awb.c
示例13: mtk_voice_pm_ops_suspend
/* supend and resume function */
static int mtk_voice_pm_ops_suspend(struct device *device)
{
/* if now in phone call state, not suspend!! */
bool b_modem1_speech_on;
bool b_modem2_speech_on;
AudDrv_Clk_On(); /* should enable clk for access reg */
b_modem1_speech_on = (bool) (Afe_Get_Reg(PCM2_INTF_CON) & 0x1);
b_modem2_speech_on = (bool) (Afe_Get_Reg(PCM_INTF_CON) & 0x1);
AudDrv_Clk_Off(); /* should enable clk for access reg */
pr_warn
("mtk_voice_pm_ops_suspend, b_modem1_speech_on=%d, b_modem2_speech_on=%d, speech_md_usage_control=%d\n",
b_modem1_speech_on, b_modem2_speech_on, speech_md_usage_control);
if (b_modem1_speech_on == true || b_modem2_speech_on == true
|| speech_md_usage_control == true) {
/* select 26M */
clkmux_sel(MT_CLKMUX_AUD_HF_26M_SEL, MT_CG_SYS_26M, "AUDIO ");
clkmux_sel(MT_CLKMUX_AUD_INTBUS_SEL, MT_CG_SYS_26M, "AUDIO ");
return 0;
}
return 0;
}
开发者ID:John677,项目名称:Kernal_k3note,代码行数:22,代码来源:mt_soc_pcm_voice_md1.c
示例14: mtk_voice_bt_pm_ops_resume
static int mtk_voice_bt_pm_ops_resume(struct device *device)
{
bool b_modem1_speech_on;
bool b_modem2_speech_on;
AudDrv_ANA_Clk_On();
AudDrv_Clk_On(); /* should enable clk for access reg */
b_modem1_speech_on = (bool) (Afe_Get_Reg(PCM2_INTF_CON) & 0x1);
b_modem2_speech_on = (bool) (Afe_Get_Reg(PCM_INTF_CON) & 0x1);
AudDrv_Clk_Off();
AudDrv_ANA_Clk_Off();
if (b_modem1_speech_on == true || b_modem2_speech_on == true) {
#ifdef CONFIG_MTK_CLKMGR
clkmux_sel(MT_MUX_AUDINTBUS, 1, "AUDIO"); /* mainpll */
#endif
return 0;
}
return 0;
}
开发者ID:P-D-A,项目名称:android_kernel_lge_mt6753,代码行数:21,代码来源:mt_soc_pcm_voice_md1_bt.c
示例15: Audio_Hpr_Offset_Get
static int Audio_Hpr_Offset_Get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
#ifndef EFUSE_HP_TRIM
printk("%s \n", __func__);
AudDrv_Clk_On();
if (mHprCalibrated == false)
{
GetAudioTrimOffset(AUDIO_OFFSET_TRIM_MUX_HPR);
SetHprTrimOffset(mHprOffset);
SetHplTrimOffset(mHplOffset);
mHplCalibrated = true;
mHprCalibrated = true;
}
ucontrol->value.integer.value[0] = mHprOffset;
AudDrv_Clk_Off();
#else
ucontrol->value.integer.value[0] = 2048;
#endif
return 0;
}
开发者ID:Jlsmily,项目名称:android_kernel_meilan2,代码行数:21,代码来源:mt_soc_pcm_routing.c
示例16: mtk_voice_bt_pm_ops_suspend
/* supend and resume function */
static int mtk_voice_bt_pm_ops_suspend(struct device *device)
{
/* if now in phone call state, not suspend!! */
bool b_modem1_speech_on;
bool b_modem2_speech_on;
AudDrv_ANA_Clk_On();
AudDrv_Clk_On(); /* should enable clk for access reg */
b_modem1_speech_on = (bool) (Afe_Get_Reg(PCM2_INTF_CON) & 0x1);
b_modem2_speech_on = (bool) (Afe_Get_Reg(PCM_INTF_CON) & 0x1);
AudDrv_Clk_Off();
AudDrv_ANA_Clk_Off();
if (b_modem1_speech_on == true || b_modem2_speech_on == true) {
#ifdef CONFIG_MTK_CLKMGR
clkmux_sel(MT_MUX_AUDINTBUS, 0, "AUDIO"); /* select 26M */
#endif
return 0;
}
return 0;
}
开发者ID:P-D-A,项目名称:android_kernel_lge_mt6753,代码行数:22,代码来源:mt_soc_pcm_voice_md1_bt.c
示例17: 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();
if ( (ucontrol->value.integer.value[0] == true) &&(mi2s0_hdoutput_control == false) )
{
printk("%s(), mi2s0_hdoutput_control=%d, enable APLL!!!!\n", __func__, mi2s0_hdoutput_control);
// set APLL clock setting
EnableApll1(true);
EnableApll2(true);
EnableI2SDivPower(AUDIO_APLL1_DIV0, true);
EnableI2SDivPower(AUDIO_APLL2_DIV0, true);
AudDrv_APLL1Tuner_Clk_On();
AudDrv_APLL2Tuner_Clk_On();
}
else if( (ucontrol->value.integer.value[0] == false) &&(mi2s0_hdoutput_control == true) )
{
printk("%s(), mi2s0_hdoutput_control=%d, disable APLL!!!!\n", __func__, mi2s0_hdoutput_control);
// set APLL clock setting
EnableApll1(false);
EnableApll2(false);
EnableI2SDivPower(AUDIO_APLL1_DIV0, false);
EnableI2SDivPower(AUDIO_APLL2_DIV0, false);
AudDrv_APLL1Tuner_Clk_Off();
AudDrv_APLL2Tuner_Clk_Off();
}
mi2s0_hdoutput_control = ucontrol->value.integer.value[0];
printk("%s(), mi2s0_hdoutput_control=%d\n", __func__, mi2s0_hdoutput_control);
AudDrv_Clk_Off();
printk("-%s(), mi2s0_hdoutput_control=%d\n", __func__, mi2s0_hdoutput_control);
return 0;
}
开发者ID:AudioGod,项目名称:MediaTek-HelioX10-Kernel,代码行数:40,代码来源:mt_soc_pcm_dl1_i2s0.c
示例18: mtk_pcm_hdmi_open
static int mtk_pcm_hdmi_open(struct snd_pcm_substream *substream)
{
int ret = 0;
struct snd_pcm_runtime *runtime = substream->runtime;
pr_debug("%s\n", __func__);
AudDrv_ANA_Clk_On();
AudDrv_Emi_Clk_On();
AudDrv_Clk_On();
runtime->hw = mtk_hdmi_hardware;
pMemControl = Get_Mem_ControlT(Soc_Aud_Digital_Block_MEM_HDMI);
memcpy((void *)(&(runtime->hw)), (void *)&mtk_hdmi_hardware,
sizeof(struct snd_pcm_hardware));
ret = snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
&constraints_sample_rates);
if (ret < 0) {
PRINTK_AUD_HDMI("snd_pcm_hw_constraint_integer failed\n");
return ret;
}
/* print for hw pcm information */
pr_debug("%s, runtime->rate = %d, channels = %d, substream->pcm->device = %d\n",
__func__, runtime->rate, runtime->channels, substream->pcm->device);
runtime->hw.info |= SNDRV_PCM_INFO_INTERLEAVED;
runtime->hw.info |= SNDRV_PCM_INFO_NONINTERLEAVED;
runtime->hw.info |= SNDRV_PCM_INFO_MMAP_VALID;
PRINTK_AUD_HDMI("mtk_pcm_hdmi_open return\n");
return 0;
}
开发者ID:P-D-A,项目名称:android_kernel_lge_mt6753,代码行数:39,代码来源:mt_soc_pcm_hdmi.c
示例19: mtk_bt_dai_pcm_open
static int mtk_bt_dai_pcm_open(struct snd_pcm_substream *substream)
{
struct snd_pcm_runtime *runtime = substream->runtime;
int ret = 0;
pr_warn("mtk_bt_dai_pcm_open\n");
Bt_Dai_Control_context = Get_Mem_ControlT(Soc_Aud_Digital_Block_MEM_DAI);
runtime->hw = mtk_btdai_hardware;
memcpy((void *)(&(runtime->hw)), (void *)&mtk_btdai_hardware , sizeof(struct snd_pcm_hardware));
ret = snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
&bt_dai_constraints_sample_rates);
ret = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS);
if (ret < 0)
pr_err("snd_pcm_hw_constraint_integer failed\n");
AudDrv_Clk_On();
/* print for hw pcm information */
pr_warn("mtk_bt_dai_pcm_open runtime rate = %d channels = %d\n", runtime->rate, runtime->channels);
runtime->hw.info |= SNDRV_PCM_INFO_INTERLEAVED;
runtime->hw.info |= SNDRV_PCM_INFO_NONINTERLEAVED;
if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
pr_warn("SNDRV_PCM_STREAM_CAPTURE\n");
else
return -1;
if (ret < 0) {
pr_err("mtk_bt_dai_pcm_close\n");
mtk_bt_dai_pcm_close(substream);
return ret;
}
pr_warn("mtk_bt_dai_pcm_open return\n");
return 0;
}
开发者ID:John677,项目名称:Kernal_k3note,代码行数:37,代码来源:mt_soc_pcm_bt_dai.c
示例20: Afe_Log_Print
void Afe_Log_Print(void)
{
AudDrv_Clk_On();
pr_debug("+AudDrv Afe_Log_Print\n");
pr_debug("AUDIO_TOP_CON0 = 0x%x\n", Afe_Get_Reg(AUDIO_TOP_CON0));
pr_debug("AUDIO_TOP_CON1 = 0x%x\n", Afe_Get_Reg(AUDIO_TOP_CON1));
pr_debug("AUDIO_TOP_CON3 = 0x%x\n", Afe_Get_Reg(AUDIO_TOP_CON3));
pr_debug("AFE_DAC_CON0 = 0x%x\n", Afe_Get_Reg(AFE_DAC_CON0));
pr_debug("AFE_DAC_CON1 = 0x%x\n", Afe_Get_Reg(AFE_DAC_CON1));
pr_debug("AFE_I2S_CON = 0x%x\n", Afe_Get_Reg(AFE_I2S_CON));
pr_debug("AFE_DAIBT_CON0 = 0x%x\n", Afe_Get_Reg(AFE_DAIBT_CON0));
pr_debug("AFE_CONN0 = 0x%x\n", Afe_Get_Reg(AFE_CONN0));
pr_debug("AFE_CONN1 = 0x%x\n", Afe_Get_Reg(AFE_CONN1));
pr_debug("AFE_CONN2 = 0x%x\n", Afe_Get_Reg(AFE_CONN2));
pr_debug("AFE_CONN3 = 0x%x\n", Afe_Get_Reg(AFE_CONN3));
pr_debug("AFE_CONN4 = 0x%x\n", Afe_Get_Reg(AFE_CONN4));
pr_debug("AFE_I2S_CON1 = 0x%x\n", Afe_Get_Reg(AFE_I2S_CON1));
pr_debug("AFE_I2S_CON2 = 0x%x\n", Afe_Get_Reg(AFE_I2S_CON2));
pr_debug("AFE_MRGIF_CON = 0x%x\n", Afe_Get_Reg(AFE_MRGIF_CON));
pr_debug("AFE_DL1_BASE = 0x%x\n", Afe_Get_Reg(AFE_DL1_BASE));
pr_debug("AFE_DL1_CUR = 0x%x\n", Afe_Get_Reg(AFE_DL1_CUR));
pr_debug("AFE_DL1_END = 0x%x\n", Afe_Get_Reg(AFE_DL1_END));
pr_debug("AFE_VUL_D2_BASE = 0x%x\n", Afe_Get_Reg(AFE_VUL_D2_BASE));
pr_debug("AFE_VUL_D2_END = 0x%x\n", Afe_Get_Reg(AFE_VUL_D2_END));
pr_debug("AFE_VUL_D2_CUR = 0x%x\n", Afe_Get_Reg(AFE_VUL_D2_CUR));
pr_debug("AFE_I2S_CON3 = 0x%x\n", Afe_Get_Reg(AFE_I2S_CON3));
pr_debug("AFE_DL2_BASE = 0x%x\n", Afe_Get_Reg(AFE_DL2_BASE));
pr_debug("AFE_DL2_CUR = 0x%x\n", Afe_Get_Reg(AFE_DL2_CUR));
pr_debug("AFE_DL2_END = 0x%x\n", Afe_Get_Reg(AFE_DL2_END));
pr_debug("AFE_CONN5 = 0x%x\n", Afe_Get_Reg(AFE_CONN5));
pr_debug("AFE_CONN_24BIT = 0x%x\n", Afe_Get_Reg(AFE_CONN_24BIT));
pr_debug("AFE_AWB_BASE = 0x%x\n", Afe_Get_Reg(AFE_AWB_BASE));
pr_debug("AFE_AWB_END = 0x%x\n", Afe_Get_Reg(AFE_AWB_END));
pr_debug("AFE_AWB_CUR = 0x%x\n", Afe_Get_Reg(AFE_AWB_CUR));
pr_debug("AFE_VUL_BASE = 0x%x\n", Afe_Get_Reg(AFE_VUL_BASE));
pr_debug("AFE_VUL_END = 0x%x\n", Afe_Get_Reg(AFE_VUL_END));
pr_debug("AFE_VUL_CUR = 0x%x\n", Afe_Get_Reg(AFE_VUL_CUR));
pr_debug("AFE_DAI_BASE = 0x%x\n", Afe_Get_Reg(AFE_DAI_BASE));
pr_debug("AFE_DAI_END = 0x%x\n", Afe_Get_Reg(AFE_DAI_END));
pr_debug("AFE_DAI_CUR = 0x%x\n", Afe_Get_Reg(AFE_DAI_CUR));
pr_debug("AFE_CONN6 = 0x%x\n", Afe_Get_Reg(AFE_CONN6));
pr_debug("AFE_MEMIF_MSB = 0x%x\n", Afe_Get_Reg(AFE_MEMIF_MSB));
pr_debug("AFE_MEMIF_MON0 = 0x%x\n", Afe_Get_Reg(AFE_MEMIF_MON0));
pr_debug("AFE_MEMIF_MON1 = 0x%x\n", Afe_Get_Reg(AFE_MEMIF_MON1));
pr_debug("AFE_MEMIF_MON2 = 0x%x\n", Afe_Get_Reg(AFE_MEMIF_MON2));
pr_debug("AFE_MEMIF_MON4 = 0x%x\n", Afe_Get_Reg(AFE_MEMIF_MON4));
pr_debug("AFE_ADDA_DL_SRC2_CON0 = 0x%x\n", Afe_Get_Reg(AFE_ADDA_DL_SRC2_CON0));
pr_debug("AFE_ADDA_DL_SRC2_CON1 = 0x%x\n", Afe_Get_Reg(AFE_ADDA_DL_SRC2_CON1));
pr_debug("AFE_ADDA_UL_SRC_CON0 = 0x%x\n", Afe_Get_Reg(AFE_ADDA_UL_SRC_CON0));
pr_debug("AFE_ADDA_UL_SRC_CON1 = 0x%x\n", Afe_Get_Reg(AFE_ADDA_UL_SRC_CON1));
pr_debug("AFE_ADDA_TOP_CON0 = 0x%x\n", Afe_Get_Reg(AFE_ADDA_TOP_CON0));
pr_debug("AFE_ADDA_UL_DL_CON0 = 0x%x\n", Afe_Get_Reg(AFE_ADDA_UL_DL_CON0));
pr_debug("AFE_ADDA_SRC_DEBUG = 0x%x\n", Afe_Get_Reg(AFE_ADDA_SRC_DEBUG));
pr_debug("AFE_ADDA_SRC_DEBUG_MON0= 0x%x\n", Afe_Get_Reg(AFE_ADDA_SRC_DEBUG_MON0));
pr_debug("AFE_ADDA_SRC_DEBUG_MON1= 0x%x\n", Afe_Get_Reg(AFE_ADDA_SRC_DEBUG_MON1));
pr_debug("AFE_ADDA_NEWIF_CFG0 = 0x%x\n", Afe_Get_Reg(AFE_ADDA_NEWIF_CFG0));
pr_debug("AFE_ADDA_NEWIF_CFG1 = 0x%x\n", Afe_Get_Reg(AFE_ADDA_NEWIF_CFG1));
pr_debug("AFE_ADDA_NEWIF_CFG2 = 0x%x\n", Afe_Get_Reg(AFE_ADDA_NEWIF_CFG2));
pr_debug("AFE_SIDETONE_DEBUG = 0x%x\n", Afe_Get_Reg(AFE_SIDETONE_DEBUG));
pr_debug("AFE_SIDETONE_MON = 0x%x\n", Afe_Get_Reg(AFE_SIDETONE_MON));
pr_debug("AFE_SIDETONE_CON0 = 0x%x\n", Afe_Get_Reg(AFE_SIDETONE_CON0));
pr_debug("AFE_SIDETONE_COEFF = 0x%x\n", Afe_Get_Reg(AFE_SIDETONE_COEFF));
pr_debug("AFE_SIDETONE_CON1 = 0x%x\n", Afe_Get_Reg(AFE_SIDETONE_CON1));
pr_debug("AFE_SIDETONE_GAIN = 0x%x\n", Afe_Get_Reg(AFE_SIDETONE_GAIN));
pr_debug("AFE_SGEN_CON0 = 0x%x\n", Afe_Get_Reg(AFE_SGEN_CON0));
pr_debug("AFE_TOP_CON0 = 0x%x\n", Afe_Get_Reg(AFE_TOP_CON0));
pr_debug("AFE_ADDA_PREDIS_CON0 = 0x%x\n", Afe_Get_Reg(AFE_ADDA_PREDIS_CON0));
pr_debug("AFE_ADDA_PREDIS_CON1 = 0x%x\n", Afe_Get_Reg(AFE_ADDA_PREDIS_CON1));
pr_debug("AFE_MRGIF_MON0 = 0x%x\n", Afe_Get_Reg(AFE_MRGIF_MON0));
pr_debug("AFE_MRGIF_MON1 = 0x%x\n", Afe_Get_Reg(AFE_MRGIF_MON1));
pr_debug("AFE_MRGIF_MON2 = 0x%x\n", Afe_Get_Reg(AFE_MRGIF_MON2));
pr_debug("AFE_MOD_DAI_BASE = 0x%x\n", Afe_Get_Reg(AFE_MOD_DAI_BASE));
pr_debug("AFE_MOD_DAI_END = 0x%x\n", Afe_Get_Reg(AFE_MOD_DAI_END));
pr_debug("AFE_MOD_DAI_CUR = 0x%x\n", Afe_Get_Reg(AFE_MOD_DAI_CUR));
pr_debug("AFE_IRQ_MCU_CON = 0x%x\n", Afe_Get_Reg(AFE_IRQ_MCU_CON));
pr_debug("AFE_IRQ_MCU_STATUS = 0x%x\n", Afe_Get_Reg(AFE_IRQ_MCU_STATUS));
pr_debug("AFE_IRQ_MCU_CLR = 0x%x\n", Afe_Get_Reg(AFE_IRQ_MCU_CLR));
pr_debug("AFE_IRQ_MCU_CNT1 = 0x%x\n", Afe_Get_Reg(AFE_IRQ_MCU_CNT1));
pr_debug("AFE_IRQ_MCU_CNT2 = 0x%x\n", Afe_Get_Reg(AFE_IRQ_MCU_CNT2));
pr_debug("AFE_IRQ_MCU_EN = 0x%x\n", Afe_Get_Reg(AFE_IRQ_MCU_EN));
pr_debug("AFE_IRQ_MCU_MON2 = 0x%x\n", Afe_Get_Reg(AFE_IRQ_MCU_MON2));
pr_debug("AFE_IRQ_MCU_CNT5 = 0x%x\n", Afe_Get_Reg(AFE_IRQ_MCU_CNT5));
pr_debug("AFE_IRQ1_MCU_CNT_MON = 0x%x\n", Afe_Get_Reg(AFE_IRQ1_MCU_CNT_MON));
pr_debug("AFE_IRQ2_MCU_CNT_MON = 0x%x\n", Afe_Get_Reg(AFE_IRQ2_MCU_CNT_MON));
pr_debug("AFE_IRQ1_MCU_EN_CNT_MON= 0x%x\n", Afe_Get_Reg(AFE_IRQ1_MCU_EN_CNT_MON));
pr_debug("AFE_IRQ5_MCU_CNT_MON = 0x%x\n", Afe_Get_Reg(AFE_IRQ5_MCU_CNT_MON));
pr_debug("AFE_MEMIF_MAXLEN = 0x%x\n", Afe_Get_Reg(AFE_MEMIF_MAXLEN));
pr_debug("AFE_MEMIF_PBUF_SIZE = 0x%x\n", Afe_Get_Reg(AFE_MEMIF_PBUF_SIZE));
pr_debug("AFE_IRQ_MCU_CNT7 = 0x%x\n", Afe_Get_Reg(AFE_IRQ_MCU_CNT7));
pr_debug("AFE_APLL1_TUNER_CFG = 0x%x\n", Afe_Get_Reg(AFE_APLL1_TUNER_CFG));
pr_debug("AFE_APLL2_TUNER_CFG = 0x%x\n", Afe_Get_Reg(AFE_APLL2_TUNER_CFG));
pr_debug("AFE_GAIN1_CON0 = 0x%x\n", Afe_Get_Reg(AFE_GAIN1_CON0));
pr_debug("AFE_GAIN1_CON1 = 0x%x\n", Afe_Get_Reg(AFE_GAIN1_CON1));
pr_debug("AFE_GAIN1_CON2 = 0x%x\n", Afe_Get_Reg(AFE_GAIN1_CON2));
pr_debug("AFE_GAIN1_CON3 = 0x%x\n", Afe_Get_Reg(AFE_GAIN1_CON3));
pr_debug("AFE_GAIN1_CUR = 0x%x\n", Afe_Get_Reg(AFE_GAIN1_CUR));
pr_debug("AFE_GAIN2_CON0 = 0x%x\n", Afe_Get_Reg(AFE_GAIN2_CON0));
pr_debug("AFE_GAIN2_CON1 = 0x%x\n", Afe_Get_Reg(AFE_GAIN2_CON1));
pr_debug("AFE_GAIN2_CON2 = 0x%x\n", Afe_Get_Reg(AFE_GAIN2_CON2));
pr_debug("AFE_GAIN2_CON3 = 0x%x\n", Afe_Get_Reg(AFE_GAIN2_CON3));
//.........这里部分代码省略.........
开发者ID:P-D-A,项目名称:android_kernel_lge_mt6753,代码行数:101,代码来源:AudDrv_Afe.c
注:本文中的AudDrv_Clk_On函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论