Skip to content

Commit

Permalink
msm8660: board-holiday-audio: workaround audience chip for AT&T in-ca…
Browse files Browse the repository at this point in the history
…ll microphone
  • Loading branch information
h8rift committed Dec 14, 2012
1 parent 6b4d263 commit b96d958
Showing 1 changed file with 32 additions and 46 deletions.
78 changes: 32 additions & 46 deletions arch/arm/mach-msm/board-holiday-audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,54 +192,40 @@ void holiday_mic_enable(int en, int shift)

void holiday_imic_pamp_on_with_audience(int en)
{
int ret, call_state = 0;
pr_aud_info("%s %d\n", __func__, en);

call_state = msm_get_call_state();
if (en) {
ret = pm8058_micbias_enable(OTHC_MICBIAS_0, OTHC_SIGNAL_ALWAYS_ON);
if (ret)
pr_aud_err("%s: Enabling int mic power failed\n", __func__);

/* select internal mic path */
if (call_state) {
gpio_set_value(PM8058_GPIO_PM_TO_SYS(HOLIDAY_AUD_MIC_SEL2), 0);
ret = pm8058_micbias_enable(OTHC_MICBIAS_1, OTHC_SIGNAL_ALWAYS_ON);
if (ret)
pr_aud_err("%s: Enabling back mic power failed\n", __func__);
} else {
if (!force_a1026_on)
gpio_set_value(PM8058_GPIO_PM_TO_SYS(HOLIDAY_AUD_MIC_SEL2), 1);
}
} else {
ret = pm8058_micbias_enable(OTHC_MICBIAS_0, OTHC_SIGNAL_OFF);
if (ret)
pr_aud_err("%s: Enabling int mic power failed\n", __func__);
if (call_state) {
ret = pm8058_micbias_enable(OTHC_MICBIAS_1, OTHC_SIGNAL_OFF);
if (ret)
pr_aud_err("%s: Enabling back mic power failed\n", __func__);
}
}
}

int ret;

pr_aud_info("%s %d\n", __func__, en);

holiday_snddev_bmic_pamp_on(en);
if (en) {
ret = pm8058_micbias_enable(OTHC_MICBIAS_0, OTHC_SIGNAL_ALWAYS_ON);
if (ret)
pr_aud_err("%s: Enabling int mic power failed\n", __func__);

} else {
ret = pm8058_micbias_enable(OTHC_MICBIAS_0, OTHC_SIGNAL_OFF);
if (ret)
pr_aud_err("%s: Enabling int mic power failed\n", __func__);
}
}

void holiday_imic_pamp_on_without_audience(int en)
{
int ret;

This comment has been minimized.

Copy link
@intervigilium

intervigilium Dec 14, 2012

Member

isn't this section actually completely unchanged?

This comment has been minimized.

Copy link
@homeslice976

homeslice976 Dec 15, 2012

Yes..this part was not changed..just above is diff


pr_aud_info("%s %d\n", __func__, en);

holiday_snddev_bmic_pamp_on(en);
if (en) {
ret = pm8058_micbias_enable(OTHC_MICBIAS_0, OTHC_SIGNAL_ALWAYS_ON);
if (ret)
pr_aud_err("%s: Enabling int mic power failed\n", __func__);

} else {
ret = pm8058_micbias_enable(OTHC_MICBIAS_0, OTHC_SIGNAL_OFF);
if (ret)
pr_aud_err("%s: Enabling int mic power failed\n", __func__);
}
int ret;
pr_aud_info("%s %d\n", __func__, en);
holiday_snddev_bmic_pamp_on(en);
if (en) {
ret = pm8058_micbias_enable(OTHC_MICBIAS_0, OTHC_SIGNAL_ALWAYS_ON);
if (ret)
pr_aud_err("%s: Enabling int mic power failed\n", __func__);
} else {
ret = pm8058_micbias_enable(OTHC_MICBIAS_0, OTHC_SIGNAL_OFF);
if (ret)
pr_aud_err("%s: Enabling int mic power failed\n", __func__);
}
}

void holiday_snddev_imic_pamp_on(int en)
Expand Down

0 comments on commit b96d958

Please sign in to comment.