[ARM] tegra_i2s_audio: turn off main speaker and headset amps in dock mode
authorPraveen Bharathi <pbharathi@motorola.com>
Wed, 23 Feb 2011 11:08:33 +0000 (05:08 -0600)
committerIliyan Malchev <malchev@google.com>
Thu, 24 Feb 2011 21:53:26 +0000 (13:53 -0800)
This should have always been there but was somehow missed. Turning off
the main speaker and headset amps in the dock mode eliminates the
unpleasant hiss that is heard from the main speakers.

Signed-off-by: Praveen Bharathi <pbharathi@motorola.com>
drivers/mfd/tegra-cpcap-audio.c

index dd5e917bfc7b1d30d2c464ff92fc17675b47c2f5..02a8e5559d293aec60f13252b4169ce3e6f4cf04 100644 (file)
@@ -127,6 +127,10 @@ static void tegra_setup_audio_out_dock_headset_on(void)
        pdata->state->stdac_primary_speaker = CPCAP_AUDIO_OUT_EMU_STEREO;
        pdata->state->stdac_secondary_speaker = CPCAP_AUDIO_OUT_EMU_STEREO;
        cpcap_audio_set_audio_state(pdata->state);
+
+       /* turn off the headset and speaker amplifiers */
+       gpio_direction_output(pdata->speaker_gpio, 0);
+       gpio_direction_output(pdata->headset_gpio, 0);
 }
 
 static void tegra_setup_audio_in_mute(void)