From: Praveen Bharathi Date: Tue, 15 Mar 2011 08:07:18 +0000 (-0500) Subject: audio: tegra: Disable SPDIF GPIO X-Git-Tag: firefly_0821_release~9834^2~45 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8c86a9db7c2b8036426007a4cc5a77a12ec39051;p=firefly-linux-kernel-4.4.55.git audio: tegra: Disable SPDIF GPIO 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 --- diff --git a/arch/arm/mach-tegra/board-stingray.c b/arch/arm/mach-tegra/board-stingray.c index 6e4f027d6f9d..8d048e29c7e5 100644 --- a/arch/arm/mach-tegra/board-stingray.c +++ b/arch/arm/mach-tegra/board-stingray.c @@ -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"); diff --git a/arch/arm/mach-tegra/include/mach/cpcap_audio.h b/arch/arm/mach-tegra/include/mach/cpcap_audio.h index 2c572b749b38..33c71c05fce7 100644 --- a/arch/arm/mach-tegra/include/mach/cpcap_audio.h +++ b/arch/arm/mach-tegra/include/mach/cpcap_audio.h @@ -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); };