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

C++ Afe_Set_Reg函数代码示例

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

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



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

示例1: AudDrv_Suspend_Clk_Off

void AudDrv_Suspend_Clk_Off(void)
{
    unsigned long flags;
    spin_lock_irqsave(&auddrv_Clk_lock, flags);
    if (Aud_AFE_Clk_cntr > 0)
    {
        PRINTK_AUD_CLK("AudDrv_Suspend_Clk_Off Aud_AFE_Clk_cntr:%d ANA_Clk(%d)\n", Aud_AFE_Clk_cntr, Aud_ANA_Clk_cntr);
#ifdef PM_MANAGER_API
        //Disable AFE clock and I2S clock
        Afe_Set_Reg(AUDIO_TOP_CON0, 0x00004044, 0x00004044); // bit2: afe power off, bit6: I2S power off

        if (disable_clock(MT_CG_AUDIO_AFE, "AUDIO"))
        {
            xlog_printk(ANDROID_LOG_ERROR, "Sound", "AudDrv_Suspend_Clk_Off() disable_clock MT_CG_AUDIO_AFE fail");
        }

        if (Aud_I2S_Clk_cntr > 0)
        {
            if (disable_clock(MT_CG_AUDIO_I2S, "AUDIO"))
            {
                xlog_printk(ANDROID_LOG_ERROR, "Sound", "AudDrv_Suspend_Clk_Off() disable_clock MT_CG_AUDIO_I2S fail");
            }
        }
#else
        Afe_Set_Reg(AUDIO_TOP_CON0, 0x00004044, 0x00004044);  // bit2: afe power off, bit6: I2S power off
#endif
    }
    spin_unlock_irqrestore(&auddrv_Clk_lock, flags);
    if (Aud_ANA_Clk_cntr > 0)
    {
        PRINTK_AUD_CLK("AudDrv_Suspend_Clk_On Aud_AFE_Clk_cntr:%d ANA_Clk(%d) \n", Aud_AFE_Clk_cntr, Aud_ANA_Clk_cntr);
    }
}
开发者ID:4Fwolf,项目名称:motorola-hawk-kernel-3.4.67,代码行数:33,代码来源:AudDrv_Clk.c


示例2: mtk_pcm_hdmi_stop

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

    printk("mtk_pcm_hdmi_stop \n");

    SetIrqEnable(Soc_Aud_IRQ_MCU_MODE_IRQ5_MCU_MODE, false);

    SetMemoryPathEnable(Soc_Aud_Digital_Block_MEM_HDMI, false);

#ifdef _DEBUG_TDM_KERNEL_
    #if 0
    Afe_Set_Reg(AFE_TDM_CON2, 0, 0x00010000); // disable TDM to I2S path
    #endif
    Afe_Set_Reg(AFE_I2S_CON, 0, 0x00000001); // I2S disable
    msleep(1);
#endif
    SetTDMEnable(false); //disable TDM
    SetHDMIEnable(false);
    Afe_Set_Reg(AUDIO_TOP_CON0, 0 << 20,  1 << 20); //  disable HDMI CK
    EnableAfe(false);
    RemoveMemifSubStream(Soc_Aud_Digital_Block_MEM_HDMI, substream);


    Afe_Block->u4DMAReadIdx  = 0;
    Afe_Block->u4WriteIdx  = 0;
    Afe_Block->u4DataRemained = 0;

    return 0;
}
开发者ID:Jlsmily,项目名称:android_kernel_meilan2,代码行数:30,代码来源:mt_soc_pcm_hdmi.c


示例3: 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


示例4: SetHDMIAddress

static void SetHDMIAddress(void)
{
	pr_debug("%s buffer length = %d\n", __func__, (int)HDMI_dma_buf->bytes);
	Afe_Set_Reg(AFE_HDMI_BASE, HDMI_dma_buf->addr, 0xffffffff);
	Afe_Set_Reg(AFE_HDMI_END, HDMI_dma_buf->addr + (HDMI_dma_buf->bytes - 1),
		0xffffffff);
}
开发者ID:P-D-A,项目名称:android_kernel_lge_mt6753,代码行数:7,代码来源:mt_soc_pcm_hdmi.c


示例5: SetHDMIBuffer

static void SetHDMIBuffer(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *hw_params)
{

	kal_uint32 volatile u4tmpMrg1;

	struct snd_pcm_runtime *runtime = substream->runtime;
	AFE_BLOCK_T *pblock = &(pMemControl->rBlock);

	pblock->pucPhysBufAddr = runtime->dma_addr;
	pblock->pucVirtBufAddr = runtime->dma_area;
	pblock->u4BufferSize = runtime->dma_bytes;
	pblock->u4SampleNumMask = 0x001f;	/* 32 byte align */
	pblock->u4WriteIdx = 0;
	pblock->u4DMAReadIdx = 0;
	pblock->u4DataRemained = 0;
	pblock->u4fsyncflag = false;
	pblock->uResetFlag = true;

	PRINTK_AUD_HDMI("%s, dma_bytes = %d, dma_area = %p, dma_addr = 0x%x\n",
		__func__, pblock->u4BufferSize, pblock->pucVirtBufAddr,
		pblock->pucPhysBufAddr);

	Afe_Set_Reg(AFE_HDMI_BASE, pblock->pucPhysBufAddr, 0xffffffff);
	Afe_Set_Reg(AFE_HDMI_END, pblock->pucPhysBufAddr + (pblock->u4BufferSize - 1),
		0xffffffff);

	u4tmpMrg1 = Afe_Get_Reg(AFE_HDMI_BASE);

	u4tmpMrg1 &= 0x00ffffff;

	PRINTK_AUD_HDMI("SetHDMIBuffer AFE_HDMI_BASE = 0x%x\n", u4tmpMrg1);
}
开发者ID:P-D-A,项目名称:android_kernel_lge_mt6753,代码行数:32,代码来源:mt_soc_pcm_hdmi.c


示例6: SetConnectionState

bool SetConnectionState(uint32 ConnectionState, uint32 Input, uint32 Output)
{
	/* printk("SetinputConnection ConnectionState = %d
	Input = %d Output = %d\n", ConnectionState, Input, Output); */
	int connectReg = 0;

	switch (ConnectionState) {
	case Soc_Aud_InterCon_DisConnect:
	{
		/* printk("nConnectionState = %d\n", ConnectionState); */
		if ((mConnectionState[Input][Output] & Soc_Aud_InterCon_Connection)
			== Soc_Aud_InterCon_Connection) {

			/* here to disconnect connect bits */
			connectReg = mConnectionReg[Output];
			if (CheckBitsandReg(connectReg, Input)) {
				Afe_Set_Reg(connectReg, 0, 1 << Input);
				mConnectionState[Input][Output] &= ~(Soc_Aud_InterCon_Connection);
			}
		}
		if ((mConnectionState[Input][Output] & Soc_Aud_InterCon_ConnectionShift)
			== Soc_Aud_InterCon_ConnectionShift) {

			/* here to disconnect connect shift bits */
			if (CheckBitsandReg(AFE_CONN_RS, Input)) {
				Afe_Set_Reg(AFE_CONN_RS, 0, 1 << Input);
				mConnectionState[Input][Output] &= ~(Soc_Aud_InterCon_ConnectionShift);
			}
		}
		break;
	}
	case Soc_Aud_InterCon_Connection:
	{
		/* printk("nConnectionState = %d\n", ConnectionState); */
		connectReg = mConnectionReg[Output];
		if (CheckBitsandReg(connectReg, Input)) {
			Afe_Set_Reg(connectReg, 1 << Input, 1 << Input);
			mConnectionState[Input][Output] |= Soc_Aud_InterCon_Connection;
		}
		break;
	}
	case Soc_Aud_InterCon_ConnectionShift:
	{
		/* printk("nConnectionState = %d\n", ConnectionState); */
		if (CheckBitsandReg(AFE_CONN_RS, Input)) {
			Afe_Set_Reg(AFE_CONN_RS, 1 << Input, 1 << Input);
			mConnectionState[Input][Output] |= Soc_Aud_InterCon_ConnectionShift;
		}
		break;
	}
	default:
		pr_err("no this state ConnectionState = %d\n", ConnectionState);
		break;
	}

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


示例7: SetHDMIAddress

static void SetHDMIAddress(void)
{
#if 0
    printk("%s buffer length = %d\n", __func__,    HDMI_dma_buf->bytes);
    Afe_Set_Reg(AFE_HDMI_BASE , HDMI_dma_buf->addr , 0xffffffff);
    Afe_Set_Reg(AFE_HDMI_END  , HDMI_dma_buf->addr + (HDMI_dma_buf->bytes - 1), 0xffffffff);
#else
    printk("%s mt6572 not support!!!\n", __func__);
#endif
}
开发者ID:Jlsmily,项目名称:android_kernel_meilan2,代码行数:10,代码来源:mt_soc_pcm_hdmi.c


示例8: AudDrv_APLL2Tuner_Clk_On

void AudDrv_APLL2Tuner_Clk_On(void)
{
    unsigned long flags;
    spin_lock_irqsave(&auddrv_Clk_lock, flags);
    if (Aud_APLL2_Tuner_cntr == 0)
    {
        PRINTK_AUD_CLK("+Aud_APLL2_Tuner_cntr, Aud_APLL2_Tuner_cntr:%d \n", Aud_APLL2_Tuner_cntr);
        Afe_Set_Reg(AUDIO_TOP_CON0, 0x0 << 18, 0x1 << 18);
        Afe_Set_Reg(AFE_APLL2_TUNER_CFG, 0x00000033, 0x1 << 19);
    }
    Aud_APLL2_Tuner_cntr++;
    spin_unlock_irqrestore(&auddrv_Clk_lock, flags);
}
开发者ID:dadimesin,项目名称:mt6577-kernel-3.10.65,代码行数:13,代码来源:AudDrv_Clk.c


示例9: AudDrv_ADC2_Clk_Off

void AudDrv_ADC2_Clk_Off(void)
{
    //PRINTK_AUDDRV("+%s %d \n", __func__,Aud_ADC2_Clk_cntr);
    mutex_lock(&auddrv_pmic_mutex);
    Aud_ADC2_Clk_cntr--;
    if (Aud_ADC2_Clk_cntr == 0)
    {
        PRINTK_AUDDRV("+%s disable_clock ADC clk(%x)\n", __func__, Aud_ADC2_Clk_cntr);
#if 0 //K2 removed		
#ifdef PM_MANAGER_API
        if (disable_clock(MT_CG_AUDIO_ADDA2, "AUDIO"))
        {
            PRINTK_AUD_CLK("%s fail", __func__);
        }
#else
        Afe_Set_Reg(AUDIO_TOP_CON0, 1 << 23 , 1 << 23); //temp hard code setting, after confirm with enable clock usage, this could be removed.
#endif
#endif
    }
    if (Aud_ADC2_Clk_cntr < 0)
    {
        PRINTK_AUDDRV("%s  <0 (%d) \n", __func__, Aud_ADC2_Clk_cntr);
        Aud_ADC2_Clk_cntr = 0;
    }
    mutex_unlock(&auddrv_pmic_mutex);
    //PRINTK_AUDDRV("-AudDrv_ADC_Clk_Off, Aud_ADC_Clk_cntr:%d \n", Aud_ADC_Clk_cntr);
}
开发者ID:Swapnil133609,项目名称:Zeus_exp,代码行数:27,代码来源:AudDrv_Clk.c


示例10: AudDrv_Clk_Off

void AudDrv_Clk_Off(void)
{
    unsigned long flags;
    PRINTK_AUD_CLK("+!! AudDrv_Clk_Off, Aud_AFE_Clk_cntr:%d \n",Aud_AFE_Clk_cntr);
    spin_lock_irqsave(&auddrv_Clk_lock, flags);

    Aud_AFE_Clk_cntr--;
    if (Aud_AFE_Clk_cntr == 0)
    {
        printk("------------AudDrv_Clk_Off, Aud_AFE_Clk_cntr:%d \n", Aud_AFE_Clk_cntr);
        {
            // Disable AFE clock
#ifdef PM_MANAGER_API
            if (disable_clock(MT_CG_AUDIO_AFE, "AUDIO"))
            {
                xlog_printk(ANDROID_LOG_ERROR, "Sound", "disable_clock MT_CG_AUDIO_AFE fail");
            }
#else
            Afe_Set_Reg(AUDIO_TOP_CON0, 0x06000044, 0x06000044);
#endif

        }
    }
    else if (Aud_AFE_Clk_cntr < 0)
    {
        PRINTK_AUD_ERROR("!! AudDrv_Clk_Off, Aud_AFE_Clk_cntr<0 (%d) \n", Aud_AFE_Clk_cntr);
        AUDIO_ASSERT(true);
        Aud_AFE_Clk_cntr = 0;
    }
    PRINTK_AUD_CLK("-!! AudDrv_Clk_Off, Aud_AFE_Clk_cntr:%d \n",Aud_AFE_Clk_cntr);
    spin_unlock_irqrestore(&auddrv_Clk_lock, flags);
}
开发者ID:Swapnil133609,项目名称:Zeus_exp,代码行数:32,代码来源:AudDrv_Clk.c


示例11: AudDrv_ADC_Clk_Off

void AudDrv_ADC_Clk_Off(void)
{
    //PRINTK_AUDDRV("+AudDrv_ADC_Clk_Off, Aud_ADC_Clk_cntr:%d \n", Aud_ADC_Clk_cntr);
    mutex_lock(&auddrv_pmic_mutex);
    Aud_ADC_Clk_cntr--;
    if (Aud_ADC_Clk_cntr == 0)
    {
        PRINTK_AUDDRV("+AudDrv_ADC_Clk_On disable_clock ADC clk(%x)\n", Aud_ADC_Clk_cntr);
        //Afe_Set_Reg(AUDIO_TOP_CON0, 1 << 24 , 1 << 24);
#ifdef PM_MANAGER_API
#if defined(CONFIG_MTK_LEGACY)

        if (disable_clock(MT_CG_AUDIO_ADC, "AUDIO"))
        {
            PRINTK_AUD_CLK("%s fail", __func__);
        }
#else
        if (paudclk->aud_adc_clk_status)
        {
            clk_disable_unprepare(paudclk->aud_adc_clk);
        }
#endif
#else
        Afe_Set_Reg(AUDIO_TOP_CON0, 1 << 24 , 1 << 24);
#endif
    }
    if (Aud_ADC_Clk_cntr < 0)
    {
        PRINTK_AUDDRV("!! AudDrv_ADC_Clk_Off, Aud_ADC_Clk_cntr<0 (%d) \n", Aud_ADC_Clk_cntr);
        Aud_ADC_Clk_cntr = 0;
    }
    mutex_unlock(&auddrv_pmic_mutex);
    //PRINTK_AUDDRV("-AudDrv_ADC_Clk_Off, Aud_ADC_Clk_cntr:%d \n", Aud_ADC_Clk_cntr);
}
开发者ID:dadimesin,项目名称:mt6577-kernel-3.10.65,代码行数:34,代码来源:AudDrv_Clk.c


示例12: AudDrv_I2S_Clk_Off

void AudDrv_I2S_Clk_Off(void)
{
    unsigned long flags;
    //PRINTK_AUD_CLK("+AudDrv_I2S_Clk_Off, Aud_I2S_Clk_cntr:%d \n", Aud_I2S_Clk_cntr);
    spin_lock_irqsave(&auddrv_Clk_lock, flags);
    Aud_I2S_Clk_cntr--;
    if (Aud_I2S_Clk_cntr == 0)
    {
#ifdef PM_MANAGER_API
        if (disable_clock(MT_CG_AUDIO_I2S, "AUDIO"))
        {
            PRINTK_AUD_ERROR("disable_clock MT_CG_AUDIO_I2S fail");
        }
#else
        Afe_Set_Reg(AUDIO_TOP_CON0, 0x00000000, 0x00000040);  //power off I2S clock
#endif
    }
    else if (Aud_I2S_Clk_cntr < 0)
    {
        PRINTK_AUD_ERROR("!! AudDrv_I2S_Clk_Off, Aud_I2S_Clk_cntr<0 (%d) \n", Aud_I2S_Clk_cntr);
        AUDIO_ASSERT(true);
        Aud_I2S_Clk_cntr = 0;
    }
    spin_unlock_irqrestore(&auddrv_Clk_lock, flags);
    //PRINTK_AUD_CLK("-AudDrv_I2S_Clk_Off, Aud_I2S_Clk_cntr:%d \n",Aud_I2S_Clk_cntr);
}
开发者ID:4Fwolf,项目名称:motorola-hawk-kernel-3.4.67,代码行数:26,代码来源:AudDrv_Clk.c


示例13: AudDrv_Clk_AllOn

void AudDrv_Clk_AllOn(void)
{
    unsigned long flags;
    printk("AudDrv_Clk_AllOn \n");
    spin_lock_irqsave(&auddrv_Clk_lock, flags);
    Afe_Set_Reg(AUDIO_TOP_CON0, 0x00004000, 0xffffffff);
    spin_unlock_irqrestore(&auddrv_Clk_lock, flags);
}
开发者ID:Swapnil133609,项目名称:Zeus_exp,代码行数:8,代码来源:AudDrv_Clk.c


示例14: Auddrv_Bus_Init

void Auddrv_Bus_Init(void)
{
    unsigned long flags;
    printk("%s  \n", __func__);
    spin_lock_irqsave(&auddrv_Clk_lock, flags);
    Afe_Set_Reg(AUDIO_TOP_CON0, 0x00004000, 0x00004000); //must set, system will default set bit14 to 0
    spin_unlock_irqrestore(&auddrv_Clk_lock, flags);
}
开发者ID:Swapnil133609,项目名称:Zeus_exp,代码行数:8,代码来源:AudDrv_Clk.c


示例15: 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


示例16: AudDrv_APLL1Tuner_Clk_Off

void AudDrv_APLL1Tuner_Clk_Off(void)
{
    unsigned long flags;
    spin_lock_irqsave(&auddrv_Clk_lock, flags);

    Aud_APLL1_Tuner_cntr--;
    if (Aud_APLL1_Tuner_cntr == 0)
    {
        Afe_Set_Reg(AUDIO_TOP_CON0, 0x1 << 19, 0x1 << 19);
        Afe_Set_Reg(AFE_APLL1_TUNER_CFG, 0x00000033, 0x1 << 19);
    }
    // handle for clock error
    else if (Aud_APLL1_Tuner_cntr < 0)
    {
        PRINTK_AUD_ERROR("!! AudDrv_APLLTuner_Clk_Off, Aud_APLL1_Tuner_cntr<0 (%d) \n", Aud_APLL1_Tuner_cntr);
        Aud_APLL1_Tuner_cntr = 0;
    }
    spin_unlock_irqrestore(&auddrv_Clk_lock, flags);
}
开发者ID:dadimesin,项目名称:mt6577-kernel-3.10.65,代码行数:19,代码来源:AudDrv_Clk.c


示例17: StartAudioI2S0AWBHardware

static void StartAudioI2S0AWBHardware(struct snd_pcm_substream *substream)
{
    struct snd_pcm_runtime *runtime = substream->runtime;

    uint32 Audio_I2S_Dac = 0;
    uint32 MclkDiv0 = 0;

    const bool bEnablePhaseShiftFix = true;

    printk("StartAudioI2S0AWBHardware \n");


    MclkDiv0 = SetCLkMclk(Soc_Aud_I2S0, runtime->rate); //select I2S
    SetCLkBclk(MclkDiv0,  runtime->rate, runtime->channels, Soc_Aud_I2S_WLEN_WLEN_32BITS);
    
    // 2nd I2S In
    SetSampleRate(Soc_Aud_Digital_Block_MEM_I2S,  runtime->rate);

    Audio_I2S_Dac |= (bEnablePhaseShiftFix << 31);
    Audio_I2S_Dac |= (Soc_Aud_I2S_IN_PAD_SEL_I2S_IN_FROM_IO_MUX << 28);//I2S in from io_mux
    Audio_I2S_Dac |= Soc_Aud_LOW_JITTER_CLOCK << 12 ; //Low jitter mode
    Audio_I2S_Dac |= (Soc_Aud_INV_LRCK_NO_INVERSE << 5);
    Audio_I2S_Dac |= (Soc_Aud_I2S_FORMAT_I2S << 3);
    Audio_I2S_Dac |= (Soc_Aud_I2S_WLEN_WLEN_32BITS << 1);
    Afe_Set_Reg(AFE_I2S_CON, Audio_I2S_Dac | 0x1, MASK_ALL);

    // here to set interrupt
    SetIrqMcuCounter(Soc_Aud_IRQ_MCU_MODE_IRQ2_MCU_MODE, substream->runtime->period_size >> 1);
    SetIrqMcuSampleRate(Soc_Aud_IRQ_MCU_MODE_IRQ2_MCU_MODE, substream->runtime->rate);
    SetIrqEnable(Soc_Aud_IRQ_MCU_MODE_IRQ2_MCU_MODE, true);

    SetSampleRate(Soc_Aud_Digital_Block_MEM_AWB, substream->runtime->rate);
    SetMemoryPathEnable(Soc_Aud_Digital_Block_MEM_AWB, true);
    SetMemoryPathEnable(Soc_Aud_Digital_Block_I2S_IN_2, true);

    // here to turn off digital part
#ifdef DUMP_HWGAIN1_AWB
        uint32 REG420 = 0;
        SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I00, Soc_Aud_InterConnectionOutput_O05);
        SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I01, Soc_Aud_InterConnectionOutput_O06);
        printk("%s() Soc_Aud_InterCon_Connection  I10  O5\n",  __func__);
        SetConnection(Soc_Aud_InterCon_Connection, Soc_Aud_InterConnectionInput_I10, Soc_Aud_InterConnectionOutput_O05);
        printk("%s() Soc_Aud_InterCon_Connection  I11  O6\n",  __func__);
        SetConnection(Soc_Aud_InterCon_Connection, Soc_Aud_InterConnectionInput_I11, Soc_Aud_InterConnectionOutput_O06);

        
        REG420 = Afe_Get_Reg(AFE_GAIN1_CONN);
        printk("%s() AFE_GAIN1_CONN (0X420) =0x%x\n",  __func__, REG420);
#else
        SetConnection(Soc_Aud_InterCon_Connection, Soc_Aud_InterConnectionInput_I00, Soc_Aud_InterConnectionOutput_O05);
        SetConnection(Soc_Aud_InterCon_Connection, Soc_Aud_InterConnectionInput_I01, Soc_Aud_InterConnectionOutput_O06);
#endif

    EnableAfe(true);
}
开发者ID:dimsink1,项目名称:android_kernel_alcatel_4033,代码行数:55,代码来源:mt_soc_pcm_i2s0_awb.c


示例18: AudDrv_Clk_AllOn

void AudDrv_Clk_AllOn(void)
{
    printk("AudDrv_Clk_AllOn \n");
    unsigned long flags;
    spin_lock_irqsave(&auddrv_Clk_lock, flags);

    Afe_Set_Reg(AUDIO_TOP_CON0, 0x00004000, 0xffffffff);

    spin_unlock_irqrestore(&auddrv_Clk_lock, flags);
    //PRINTK_AUD_CLK("-AudDrv_Clk_On, Aud_AFE_Clk_cntr:%d \n",Aud_AFE_Clk_cntr);
}
开发者ID:4Fwolf,项目名称:motorola-hawk-kernel-3.4.67,代码行数:11,代码来源:AudDrv_Clk.c


示例19: mtk_uldlloopbackpcm_close

static int mtk_uldlloopbackpcm_close(struct snd_pcm_substream *substream)
{
    printk("%s \n", __func__);
    if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
    {
        printk("%s  with SNDRV_PCM_STREAM_CAPTURE \n", __func__);
        return 0;
    }

    // interconnection setting
    SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I03, Soc_Aud_InterConnectionOutput_O00);
    SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I04, Soc_Aud_InterConnectionOutput_O01);
    SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I03, Soc_Aud_InterConnectionOutput_O03);
    SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I04, Soc_Aud_InterConnectionOutput_O04);

    
    SetMemoryPathEnable(Soc_Aud_Digital_Block_I2S_IN_ADC, false);
    if (GetMemoryPathEnable(Soc_Aud_Digital_Block_I2S_IN_ADC) == false)
    {
        SetI2SAdcEnable(false);
    }

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

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

    EnableAfe(false);

    AudDrv_Clk_Off();
    AudDrv_ADC_Clk_Off();
    return 0;
}
开发者ID:Jlsmily,项目名称:android_kernel_meilan2,代码行数:41,代码来源:mt_soc_pcm_uldlloopback.c


示例20: SetAWBBuffer

static void SetAWBBuffer(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *hw_params)
{
	AFE_BLOCK_T *pblock = &FM_I2S_AWB_Control_context->rBlock;
	struct snd_pcm_runtime *runtime = substream->runtime;
	pr_warn("SetAWBBuffer\n");
	pblock->pucPhysBufAddr = runtime->dma_addr;
	pblock->pucVirtBufAddr = runtime->dma_area;
	pblock->u4BufferSize = runtime->dma_bytes;
	pblock->u4SampleNumMask = 0x001f;	/* 32 byte align */
	pblock->u4WriteIdx = 0;
	pblock->u4DMAReadIdx = 0;
	pblock->u4DataRemained = 0;
	pblock->u4fsyncflag = false;
	pblock->uResetFlag = true;
	pr_warn("dma_bytes = %d dma_area = %p dma_addr = 0x%x\n",
	       pblock->u4BufferSize, pblock->pucVirtBufAddr, pblock->pucPhysBufAddr);
	/* set sram address top hardware */
	Afe_Set_Reg(AFE_AWB_BASE, pblock->pucPhysBufAddr, 0xffffffff);
	Afe_Set_Reg(AFE_AWB_END, pblock->pucPhysBufAddr + (pblock->u4BufferSize - 1), 0xffffffff);

}
开发者ID:John677,项目名称:Kernal_k3note,代码行数:21,代码来源:mt_soc_pcm_fm_i2s_awb.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ After函数代码示例发布时间:2022-05-30
下一篇:
C++ Admin_sendMessage函数代码示例发布时间: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