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


C++ pmic_hsed_enable函数代码示例

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


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

示例1: speedy_snddev_imic_pamp_on

void speedy_snddev_imic_pamp_on(int en)
{
	pr_info("%s: %d\n", __func__, en);

	if (en)
		pmic_hsed_enable(PM_HSED_CONTROLLER_0, PM_HSED_ENABLE_ALWAYS);
	else
		pmic_hsed_enable(PM_HSED_CONTROLLER_0, PM_HSED_ENABLE_OFF);
}
开发者ID:Scaryghoul,项目名称:7x30-Sense-kernel,代码行数:9,代码来源:board-speedy-audio.c

示例2: debugfs_adie_loopback

static void debugfs_adie_loopback(u32 loop)
{
	struct snddev_icodec_drv_state *drv = &snddev_icodec_drv;

	if (loop) {

		/* enable MI2S RX master block */
		/* enable MI2S RX bit clock */
		clk_set_rate(drv->rx_mclk,
			SNDDEV_ICODEC_CLK_RATE(8000));
		clk_enable(drv->rx_mclk);
		clk_enable(drv->rx_sclk);

		MM_INFO("configure ADIE RX path\n");
		/* Configure ADIE */
		adie_codec_open(&debug_rx_profile, &debugfs_rx_adie);
		adie_codec_setpath(debugfs_rx_adie, 8000, 256);
		adie_codec_proceed_stage(debugfs_rx_adie,
		ADIE_CODEC_DIGITAL_ANALOG_READY);

		MM_INFO("Enable Handset Mic bias\n");
		pmic_hsed_enable(PM_HSED_CONTROLLER_0, PM_HSED_ENABLE_PWM_TCXO);
		/* enable MI2S TX master block */
		/* enable MI2S TX bit clock */
		clk_set_rate(drv->tx_mclk,
			SNDDEV_ICODEC_CLK_RATE(8000));
		clk_enable(drv->tx_mclk);
		clk_enable(drv->tx_sclk);

		MM_INFO("configure ADIE TX path\n");
		/* Configure ADIE */
		adie_codec_open(&debug_tx_lb_profile, &debugfs_tx_adie);
		adie_codec_setpath(debugfs_tx_adie, 8000, 256);
		adie_codec_proceed_stage(debugfs_tx_adie,
		ADIE_CODEC_DIGITAL_ANALOG_READY);
	} else {
		/* Disable ADIE */
		adie_codec_proceed_stage(debugfs_rx_adie,
		ADIE_CODEC_DIGITAL_OFF);
		adie_codec_close(debugfs_rx_adie);
		adie_codec_proceed_stage(debugfs_tx_adie,
		ADIE_CODEC_DIGITAL_OFF);
		adie_codec_close(debugfs_tx_adie);

		pmic_hsed_enable(PM_HSED_CONTROLLER_0, PM_HSED_ENABLE_OFF);

		/* Disable MI2S RX master block */
		/* Disable MI2S RX bit clock */
		clk_disable(drv->rx_sclk);
		clk_disable(drv->rx_mclk);

		/* Disable MI2S TX master block */
		/* Disable MI2S TX bit clock */
		clk_disable(drv->tx_sclk);
		clk_disable(drv->tx_mclk);
	}
}
开发者ID:lolhi,项目名称:No.5-Kernel,代码行数:57,代码来源:snddev_icodec.c

示例3: mecha_mic_bias_enable

void mecha_mic_bias_enable(int en, int shift)
{
	pr_info("%s: %d\n", __func__, en);

	if (en)
		pmic_hsed_enable(PM_HSED_CONTROLLER_2, PM_HSED_ENABLE_ALWAYS);
	else
		pmic_hsed_enable(PM_HSED_CONTROLLER_2, PM_HSED_ENABLE_OFF);
}
开发者ID:drod2169,项目名称:drodspeed-cfs,代码行数:9,代码来源:board-mecha-audio.c

示例4: runnymede_back_mic_enable

void runnymede_back_mic_enable(int en)
{
	pr_aud_info("%s %d\n", __func__, en);
	if (en) {
		gpio_set_value(runnymede_AUD_MICPATH_SEL, 0);
		pmic_hsed_enable(PM_HSED_CONTROLLER_1, PM_HSED_ENABLE_ALWAYS);
	} else {
		pmic_hsed_enable(PM_HSED_CONTROLLER_1, PM_HSED_ENABLE_OFF);
	}
}
开发者ID:DutchDanny,项目名称:runnymede-2.6.35.13,代码行数:10,代码来源:board-runnymede-audio.c

示例5: mecha_snddev_imic_pamp_on

void mecha_snddev_imic_pamp_on(int en)
{
	pr_info("%s %d\n", __func__, en);
	if (en) {
		pmic_hsed_enable(PM_HSED_CONTROLLER_0, PM_HSED_ENABLE_ALWAYS);
		mecha_back_mic_enable(1);
	} else {
		pmic_hsed_enable(PM_HSED_CONTROLLER_0, PM_HSED_ENABLE_OFF);
		mecha_back_mic_enable(0);
	}
}
开发者ID:drod2169,项目名称:drodspeed-cfs,代码行数:11,代码来源:board-mecha-audio.c

示例6: mecha_back_mic_enable

void mecha_back_mic_enable(int en)
{
	pr_info("%s %d\n", __func__, en);
	if (en) {
		gpio_set_value(MECHA_AUD_MICPATH_SEL, 0);
		pmic_hsed_enable(PM_HSED_CONTROLLER_1, PM_HSED_ENABLE_ALWAYS);
	} else {
		gpio_set_value(MECHA_AUD_MICPATH_SEL, 1);
		pmic_hsed_enable(PM_HSED_CONTROLLER_1, PM_HSED_ENABLE_OFF);
	}
}
开发者ID:drod2169,项目名称:drodspeed-cfs,代码行数:11,代码来源:board-mecha-audio.c

示例7: runnymede_mic_bias_enable

void runnymede_mic_bias_enable(int en, int shift)
{
	pr_aud_info("%s: %d\n", __func__, en);

	if (en) {
		runnymede_audio_2v85_enable(en);
		pmic_hsed_enable(PM_HSED_CONTROLLER_2, PM_HSED_ENABLE_ALWAYS);
	} else {
		pmic_hsed_enable(PM_HSED_CONTROLLER_2, PM_HSED_ENABLE_OFF);
		runnymede_audio_2v85_enable(en);
	}
}
开发者ID:DevChun,项目名称:htc-runnymede-ics-kernel,代码行数:12,代码来源:board-runnymede-audio.c

示例8: glacier_mic_disable

void glacier_mic_disable(int mic)
{
	switch (mic) {
	case 0: /* main mic */
		pr_info("%s: disable main mic\n", __func__);
		pmic_hsed_enable(PM_HSED_CONTROLLER_0, PM_HSED_ENABLE_OFF);
		break;
	case 1: /* back mic */
		pr_info("%s: disable back mic\n", __func__);
		pmic_hsed_enable(PM_HSED_CONTROLLER_2, PM_HSED_ENABLE_OFF);
		break;
	default:
		break;
	}
}
开发者ID:Akinus,项目名称:htc-kernel-msm7x30,代码行数:15,代码来源:board-glacier-audio.c

示例9: runnymede_snddev_imic_pamp_on

void runnymede_snddev_imic_pamp_on(int en)
{
	pr_aud_info("%s: %d\n", __func__, en);

	if (en) {
		runnymede_audio_2v85_enable(en);
		gpio_set_value(PM8058_GPIO_PM_TO_SYS(runnymede_AUD_STEREO_REC), 1);
		pmic_hsed_enable(PM_HSED_CONTROLLER_0, PM_HSED_ENABLE_ALWAYS);
		runnymede_back_mic_enable(1);
	} else {
		runnymede_back_mic_enable(0);
		pmic_hsed_enable(PM_HSED_CONTROLLER_0, PM_HSED_ENABLE_OFF);
		gpio_set_value(PM8058_GPIO_PM_TO_SYS(runnymede_AUD_STEREO_REC), 0);
		runnymede_audio_2v85_enable(en);
	}
}
开发者ID:DutchDanny,项目名称:runnymede-2.6.35.13,代码行数:16,代码来源:board-runnymede-audio.c

示例10: remove_headset

static void remove_headset(void)
{
#ifdef FEATURE_AUD_HOOK_BTN	
	unsigned long irq_flags;
#endif

    H2W_DBG("");
    hi->ignore_btn = 1;  /* FIH-SW2-MM-AY-TAP_Tapioca-00746_00 */
    pmic_hsed_enable(PM_HSED_CONTROLLER_0, PM_HSED_ENABLE_OFF); /* FIH-SW2-MM-AY-TAP-ControlHSED_BIAS1-01 */
	switch_set_state(&hi->sdev, NO_DEVICE);
		
  	input_sync(hi->hs_input);
#ifdef FEATURE_AUD_HOOK_BTN

	mHeadphone = false;

	if (bn_irq_enable) {
		
		local_irq_save(irq_flags);
		
		disable_irq(hi->irq_btn);

		local_irq_restore(irq_flags);
		
		bn_irq_enable=0;

		irq_set_irq_wake(hi->irq_btn, 0);
	}
	
	if (atomic_read(&hi->btn_state))
		button_released();
#endif
}
开发者ID:NoelMacwan,项目名称:SXDMesona,代码行数:33,代码来源:fih_headset.c

示例11: snddev_icodec_close_tx

static int snddev_icodec_close_tx(struct snddev_icodec_state *icodec)
{
	struct snddev_icodec_drv_state *drv = &snddev_icodec_drv;

	afe_disable(AFE_HW_PATH_CODEC_TX);

	/* Disable ADIE */
	adie_codec_proceed_stage(icodec->adie_path, ADIE_CODEC_DIGITAL_OFF);
	adie_codec_close(icodec->adie_path);
	icodec->adie_path = NULL;

	/* Disable MI2S TX master block */
	/* Disable MI2S TX bit clock */
	clk_disable(drv->tx_sclk);
	clk_disable(drv->tx_mclk);

	/* Disable mic bias */
	pmic_hsed_enable(PM_HSED_CONTROLLER_0, PM_HSED_ENABLE_OFF);
	vreg_disable(drv->vreg_gp16);
	vreg_disable(drv->vreg_ncp);
	vreg_disable(drv->vreg_msme);
	vreg_disable(drv->vreg_rf2);

	icodec->enabled = 0;
	return 0;
}
开发者ID:BobZhome,项目名称:kernel-2.6.29-M860,代码行数:26,代码来源:snddev_icodec.c

示例12: glacier_snddev_imic_pamp_on

void glacier_snddev_imic_pamp_on(int en)
{
	unsigned int engineerID = glacier_get_engineerid();
	pr_info("%s: %d\n", __func__, en);
	if (en)
		pmic_hsed_enable(PM_HSED_CONTROLLER_0, PM_HSED_ENABLE_ALWAYS);
	else
		pmic_hsed_enable(PM_HSED_CONTROLLER_0, PM_HSED_ENABLE_OFF);

	/* enable/disable back mic */
	if ((engineerID & 0x4) == 0) {
		if (en)
			pmic_hsed_enable(PM_HSED_CONTROLLER_2, PM_HSED_ENABLE_ALWAYS);
		else
			pmic_hsed_enable(PM_HSED_CONTROLLER_2, PM_HSED_ENABLE_OFF);
	}
}
开发者ID:Akinus,项目名称:htc-kernel-msm7x30,代码行数:17,代码来源:board-glacier-audio.c

示例13: fsa8008_set_headset_mic_bias

void fsa8008_set_headset_mic_bias(int enable) {
#ifdef CONFIG_LGE_HEADSET_DETECTION_FSA8008
   printk(KERN_INFO "[FSA8008] Set MIC BIAS %d .\n", enable);
   pmic_hsed_enable(PM_HSED_CONTROLLER_0,(enable ? PM_HSED_ENABLE_ALWAYS : PM_HSED_ENABLE_OFF )); 
#else
    if (enable)
        gpio_set_value(GPIO_EAR_MIC_EN, 1);
    else 
        gpio_set_value(GPIO_EAR_MIC_EN, 0);
#endif
}
开发者ID:F4uzan,项目名称:f4kernel-u0,代码行数:11,代码来源:board-msm7x27a-sound_v1.c

示例14: snddev_icodec_close_tx

static int snddev_icodec_close_tx(struct snddev_icodec_state *icodec)
{
	struct snddev_icodec_drv_state *drv = &snddev_icodec_drv;
	int i, err;

	pm_qos_update_request(&drv->tx_pm_qos_req,
			      msm_cpuidle_get_deep_idle_latency());

	/* Remove the vote for SMPS mode*/
	err = pmapp_smps_mode_vote(SMPS_AUDIO_RECORD_ID,
			PMAPP_VREG_S4, PMAPP_SMPS_MODE_VOTE_DONTCARE);
	if (err != 0)
		MM_ERR("pmapp_smps_mode_vote error %d\n", err);

	afe_disable(AFE_HW_PATH_CODEC_TX);

	/* Disable ADIE */
	adie_codec_proceed_stage(icodec->adie_path, ADIE_CODEC_DIGITAL_OFF);
	adie_codec_close(icodec->adie_path);
	icodec->adie_path = NULL;

	/* Disable MI2S TX master block */
	/* Disable MI2S TX bit clock */
	clk_disable_unprepare(drv->tx_sclk);
	clk_disable_unprepare(drv->tx_mclk);

	/* Disable mic bias */
	for (i = 0; i < icodec->data->pmctl_id_sz; i++) {
		pmic_hsed_enable(icodec->data->pmctl_id[i],
			 PM_HSED_ENABLE_OFF);
	}

	/* Reuse pamp_off for TX platform-specific setup  */
	if (icodec->data->pamp_off)
		icodec->data->pamp_off();

	icodec->enabled = 0;

	pm_qos_update_request(&drv->tx_pm_qos_req, PM_QOS_DEFAULT_VALUE);
	return 0;
}
开发者ID:Alexxis2233,项目名称:gcore_kernel,代码行数:41,代码来源:snddev_icodec.c

示例15: debugfs_afe_loopback

static void debugfs_afe_loopback(u32 loop)
{
	int trc;
	struct msm_afe_config afe_config;
	struct snddev_icodec_drv_state *drv = &snddev_icodec_drv;

	if (loop) {

		/* enable MI2S RX master block */
		/* enable MI2S RX bit clock */
		trc = clk_set_rate(drv->rx_mclk,
		SNDDEV_ICODEC_CLK_RATE(8000));
		if (IS_ERR_VALUE(trc))
			MM_AUD_ERR("%s: failed to set clk rate\n", __func__);
		clk_enable(drv->rx_mclk);
		clk_enable(drv->rx_sclk);
		clk_enable(drv->lpa_codec_clk);
		clk_enable(drv->lpa_core_clk);
		clk_enable(drv->lpa_p_clk);
		/* Set audio interconnect reg to ADSP */
		audio_interct_codec(AUDIO_INTERCT_ADSP);
		/* Set MI2S */
		mi2s_set_codec_output_path(0, WT_16_BIT);
		MM_AUD_INFO("%s: configure ADIE RX path\n", __func__);
		/* Configure ADIE */
		adie_codec_open(&debug_rx_profile, &debugfs_rx_adie);
		adie_codec_setpath(debugfs_rx_adie, 8000, 256);
		afe_config.sample_rate = 8;
		afe_config.channel_mode = 1;
		afe_config.volume = AFE_VOLUME_UNITY;
		MM_AUD_INFO("%s: enable afe\n", __func__);
		trc = afe_enable(AFE_HW_PATH_CODEC_RX, &afe_config);
		if (IS_ERR_VALUE(trc))
			MM_AUD_ERR("%s: fail to enable afe rx\n", __func__);
		adie_codec_proceed_stage(debugfs_rx_adie,
		ADIE_CODEC_DIGITAL_ANALOG_READY);

		MM_AUD_INFO("%s: Enable Handset Mic bias\n", __func__);
		pmic_hsed_enable(PM_HSED_CONTROLLER_0, PM_HSED_ENABLE_PWM_TCXO);
		/* enable MI2S TX master block */
		/* enable MI2S TX bit clock */
		clk_set_rate(drv->tx_mclk,
			SNDDEV_ICODEC_CLK_RATE(8000));
		clk_enable(drv->tx_mclk);
		clk_enable(drv->tx_sclk);
		/* Set MI2S */
		mi2s_set_codec_input_path(0, WT_16_BIT);
		MM_AUD_INFO("%s: configure ADIE TX path\n", __func__);
		/* Configure ADIE */
		adie_codec_open(&debug_tx_profile, &debugfs_tx_adie);
		adie_codec_setpath(debugfs_tx_adie, 8000, 256);
		adie_codec_proceed_stage(debugfs_tx_adie,
		ADIE_CODEC_DIGITAL_ANALOG_READY);
		/* Start AFE */
		afe_config.sample_rate = 0x8;
		afe_config.channel_mode = 1;
		afe_config.volume = AFE_VOLUME_UNITY;
		trc = afe_enable(AFE_HW_PATH_CODEC_TX, &afe_config);
		if (IS_ERR_VALUE(trc))
			MM_AUD_ERR("%s: failed to enable AFE TX\n", __func__);
	} else {
		/* Disable ADIE */
		adie_codec_proceed_stage(debugfs_rx_adie,
		ADIE_CODEC_DIGITAL_OFF);
		adie_codec_close(debugfs_rx_adie);
		adie_codec_proceed_stage(debugfs_tx_adie,
		ADIE_CODEC_DIGITAL_OFF);
		adie_codec_close(debugfs_tx_adie);

		pmic_hsed_enable(PM_HSED_CONTROLLER_0, PM_HSED_ENABLE_OFF);

		/* Disable MI2S RX master block */
		/* Disable MI2S RX bit clock */
//HTC_CSP_START
#ifndef CONFIG_CODEC_AIC3008
		clk_disable(drv->rx_sclk);
		clk_disable(drv->rx_mclk);
#endif
//HTC_CSP_END

		/* Disable MI2S TX master block */
		/* Disable MI2S TX bit clock */
//HTC_CSP_START
#ifndef CONFIG_CODEC_AIC3008
		clk_disable(drv->tx_sclk);
		clk_disable(drv->tx_mclk);
#endif
//HTC_CSP_END
	}
}
开发者ID:Leoyzen,项目名称:Charm-CM10-Primou,代码行数:90,代码来源:snddev_icodec.c


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