audio: tegra: Disable SPDIF GPIO
authorPraveen Bharathi <pbharathi@motorola.com>
Tue, 15 Mar 2011 08:07:18 +0000 (03:07 -0500)
committerIliyan Malchev <malchev@google.com>
Wed, 16 Mar 2011 18:28:56 +0000 (11:28 -0700)
Leaving the SPDIF GPIO unset is causing interference/audio loss
when stingray is mounted on dock connected to HMDI Monitor.
Turning off the SPDIF GPIO (which is unused in the current h/w)
gets rid of the audio pops and eventual audio loss.

Signed-off-by: Praveen Bharathi <pbharathi@motorola.com>
arch/arm/mach-tegra/board-stingray.c
arch/arm/mach-tegra/include/mach/cpcap_audio.h

index 6e4f027d6f9da8043dd95597091617d8882ed04d..8d048e29c7e59bcb9783ab5e41cc7fbe1313e7e1 100644 (file)
@@ -193,6 +193,7 @@ static struct cpcap_audio_platform_data cpcap_audio_pdata = {
        .state = &stingray_cpcap_audio_state,
        .speaker_gpio = TEGRA_GPIO_PR3,
        .headset_gpio = -1,
+       .spdif_gpio = TEGRA_GPIO_PD4,
        .bluetooth_bypass = init_dac2,
 };
 
@@ -1146,6 +1147,15 @@ static void __init tegra_stingray_init(void)
                tegra_dvfs_rail_disable_by_name("vdd_core");
        }
 
+       /* disable spdif GPIO for now */
+       /* spdif line is turned on but never used, this causes pops
+          on a speaker dock connected to HDMI monitor, later version
+          h/w with spdif audio out will need this pin */
+       tegra_gpio_enable(TEGRA_GPIO_PD4);
+       gpio_request(TEGRA_GPIO_PD4, "spdif_enable");
+       gpio_direction_output(TEGRA_GPIO_PD4, 0);
+       gpio_export(TEGRA_GPIO_PD4, false);
+
        /* Enable 4329 Power GPIO */
        tegra_gpio_enable(TEGRA_GPIO_PU4);
        gpio_request(TEGRA_GPIO_PU4, "4329_pwr");
index 2c572b749b38cbd4c4209b2dda023eb190170d5b..33c71c05fce72abb8d2d643e4efa0494b8abeb0c 100644 (file)
@@ -230,6 +230,7 @@ struct cpcap_audio_platform_data {
        struct cpcap_audio_state *state;
        int speaker_gpio;
        int headset_gpio;
+       int spdif_gpio;
        void (*bluetooth_bypass)(bool);
 };