void __init rider_audio_init(void)
{
	mutex_init(&bt_sco_lock);
	mutex_init(&mic_lock);

#ifdef CONFIG_MSM8X60_AUDIO
	pr_aud_info("%s\n", __func__);
	htc_8x60_register_analog_ops(&ops);
	htc_8x60_register_icodec_ops(&iops);
	htc_8x60_register_ecodec_ops(&eops);
	acoustic_register_ops(&acoustic);
	htc_8x60_register_aic3254_ops(&aops);
	msm_set_voc_freq(8000, 8000);
#endif

	aic3254_register_ctl_ops(&cops);

	/* PMIC GPIO Init (See board-rider.c) */
	/* Reset AIC3254 */
	rider_reset_3254();
	gpio_tlmm_config(
		GPIO_CFG(RIDER_AUD_CDC_LDO_SEL, 0, GPIO_CFG_OUTPUT,
			GPIO_CFG_PULL_DOWN, GPIO_CFG_2MA), GPIO_CFG_DISABLE);
	gpio_tlmm_config(msm_snddev_gpio[0], GPIO_CFG_DISABLE);
	gpio_tlmm_config(msm_snddev_gpio[1], GPIO_CFG_DISABLE);
	gpio_tlmm_config(msm_snddev_gpio[2], GPIO_CFG_DISABLE);
}
void __init doubleshot_audio_init(void)
{
	mutex_init(&mic_lock);

	pr_aud_info("%s\n", __func__);
	htc_8x60_register_analog_ops(&ops);
	htc_register_q6asm_ops(&qops);
	acoustic_register_ops(&acoustic);
	htc_8x60_register_aic3254_ops(&aops);
	msm_set_voc_freq(8000, 8000);	
	aic3254_register_ctl_ops(&cops);
	doubleshot_audio_gpios_init();
	doubleshot_reset_3254();
}
void __init doubleshot_audio_init(void)
{
	int i = 0;
	mutex_init(&bt_sco_lock);
	mutex_init(&mic_lock);

#ifdef CONFIG_MSM8X60_AUDIO
	pr_aud_info("%s\n", __func__);
	htc_8x60_register_analog_ops(&ops);
	htc_8x60_register_icodec_ops(&iops);
	htc_8x60_register_ecodec_ops(&eops);
	acoustic_register_ops(&acoustic);
	htc_8x60_register_aic3254_ops(&aops);

	/*fix voice sample rate as 8KHz for 3254 dual mic.*/
	msm_set_voc_freq(8000, 8000);
#endif
	aic3254_register_ctl_ops(&cops);

	/* PMIC GPIO Init (See board-doubleshot.c) */

	/*
	EVT XA : 0x0000FFFF
	DVT XB : 0x0101FFFF
	DVT XC : 0x0202FFFF

	Use XB as critiria because there are some XA devices did
	not follow this rule.
	*/
	pr_info("%s: system_rev = 0x%08x", __func__, system_rev);
	switch (system_rev)
	{
	case XA_DEV:
		emic_micbias = OTHC_MICBIAS_1;
		bmic_micbias = OTHC_MICBIAS_2;
		break;
	case XB_DEV:
	case XC_DEV:
	default:
		emic_micbias = OTHC_MICBIAS_2;
		bmic_micbias = OTHC_MICBIAS_1;
		break;
	}
	/* Reset AIC3254 */
	doubleshot_reset_3254();
	for (i=0 ; i<sizeof(msm_snddev_gpio); i++)
		gpio_tlmm_config(msm_snddev_gpio[i], GPIO_CFG_DISABLE);
}
void __init holiday_audio_init(void)
{
	int i = 0;
	mutex_init(&bt_sco_lock);
	mutex_init(&mic_lock);
	pr_aud_info("%s: 0x%x\n", __func__, skuid);
	switch (skuid) {
	case SKU_ATT1:
	case SKU_ATT2:
	case SKU_ATT3:
		support_audience = 1;
		break;
	default:
		support_audience = 0;
		break;
	}

#ifdef CONFIG_MSM8X60_AUDIO
	pr_aud_info("%s\n", __func__);
	htc_8x60_register_analog_ops(&ops);
	htc_8x60_register_ecodec_ops(&eops);
	htc_8x60_register_icodec_ops(&iops);
	acoustic_register_ops(&acoustic);
	htc_8x60_register_aic3254_ops(&aops);
	htc_8x60_register_q6asm_ops(&qops);

#ifdef CONFIG_VP_A1026
	a1026_register_ctl_ops(&a1026ops);
#endif

	if (!support_audience)
		/*fix voice sample rate as 8KHz for 3254 dual mic.*/
		msm_set_voc_freq(8000, 8000);

	aic3254_register_ctl_ops(&cops);
#endif

	/* PMIC GPIO Init (See board-holiday.c) */
	/* Reset AIC3254 */
	holiday_reset_3254();
	for (i = 0; i < sizeof(msm_snddev_gpio); i++)
		gpio_tlmm_config(msm_snddev_gpio[i], GPIO_CFG_DISABLE);

	/* Configure A1026 GPIOs */
	audience_gpio_init();
}
예제 #5
0
void __init pyramid_audio_init(void)
{
	mutex_init(&bt_sco_lock);
	mutex_init(&mic_lock);

#ifdef CONFIG_MSM8X60_AUDIO
	pr_aud_info("%s\n", __func__);
	htc_8x60_register_analog_ops(&ops);
	htc_8x60_register_icodec_ops(&iops);
	htc_8x60_register_ecodec_ops(&eops);
	acoustic_register_ops(&acoustic);
	htc_8x60_register_aic3254_ops(&aops);
	htc_8x60_register_q6asm_ops(&qops);
	msm_set_voc_freq(8000, 8000);
#endif

	aic3254_register_ctl_ops(&cops);

	/* PMIC GPIO Init (See board-pyramid.c) */

	/* Reset AIC3254 */
	pyramid_reset_3254();
}