void bravo_analog_init(void)
{
	D("%s\n", __func__);
	/* stereo pmic init */
	pmic_spkr_set_gain(LEFT_SPKR, SPKR_GAIN_PLUS12DB);
	pmic_spkr_set_gain(RIGHT_SPKR, SPKR_GAIN_PLUS12DB);
	pmic_spkr_en_right_chan(OFF_CMD);
	pmic_spkr_en_left_chan(OFF_CMD);
	pmic_spkr_add_right_left_chan(OFF_CMD);
	pmic_spkr_en_stereo(OFF_CMD);
	pmic_spkr_select_usb_with_hpf_20hz(OFF_CMD);
	pmic_spkr_bypass_mux(OFF_CMD);
	pmic_spkr_en_hpf(ON_CMD);
	pmic_spkr_en_sink_curr_from_ref_volt_cir(OFF_CMD);
	pmic_spkr_set_mux_hpf_corner_freq(SPKR_FREQ_0_73KHZ);
	pmic_mic_set_volt(MIC_VOLT_1_80V);
	pmic_set_speaker_delay(SPKR_DLY_100MS);

	gpio_request(BRAVO_AUD_JACKHP_EN, "aud_jackhp_en");
	gpio_direction_output(BRAVO_AUD_JACKHP_EN, 1);
	gpio_set_value(BRAVO_AUD_JACKHP_EN, 0);

	mutex_lock(&bt_sco_lock);
	config_gpio_table(bt_sco_disable,
			ARRAY_SIZE(bt_sco_disable));
	gpio_set_value(BRAVO_BT_PCM_OUT, 0);
	mutex_unlock(&bt_sco_lock);
}
Exemple #2
0
static int debug_set_speaker_delay(char *buf, int size)
{
	int	delay;
	int	cnt;

	cnt = sscanf(buf, "%d", &delay);
	if (cnt < 1) {
		printk(KERN_ERR "%s: sscanf failed cnt=%d" , __func__, cnt);
		return -EINVAL;
	}
	if (pmic_set_speaker_delay(delay) < 0)
		return -EFAULT;

	return size;
}