diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/tegra/tegra_i2s.c | 1 | ||||
-rw-r--r-- | sound/soc/tegra/tegra_soc.h | 1 | ||||
-rw-r--r-- | sound/soc/tegra/tegra_soc_wm8753.c | 2 | ||||
-rw-r--r-- | sound/soc/tegra/tegra_soc_wm8903.c | 2 | ||||
-rw-r--r-- | sound/soc/tegra/tegra_wired_jack.c | 11 |
5 files changed, 15 insertions, 2 deletions
diff --git a/sound/soc/tegra/tegra_i2s.c b/sound/soc/tegra/tegra_i2s.c index ee197165dc9d..070d5dc2b487 100644 --- a/sound/soc/tegra/tegra_i2s.c +++ b/sound/soc/tegra/tegra_i2s.c @@ -325,7 +325,6 @@ int tegra_i2s_resume(struct snd_soc_dai *cpu_dai) tegra_das_set_all_regs(&info->das_regs); i2s_set_all_regs(cpu_dai->id, &info->i2s_regs); - tegra_jack_resume(); clk_disable(info->i2s_clk); diff --git a/sound/soc/tegra/tegra_soc.h b/sound/soc/tegra/tegra_soc.h index a1dd3076f4ed..68e74183a409 100644 --- a/sound/soc/tegra/tegra_soc.h +++ b/sound/soc/tegra/tegra_soc.h @@ -138,6 +138,7 @@ int tegra_controls_init(struct snd_soc_codec *codec); int tegra_jack_init(struct snd_soc_codec *codec); void tegra_jack_exit(void); +void tegra_jack_suspend(void); void tegra_jack_resume(void); void tegra_switch_set_state(int state); diff --git a/sound/soc/tegra/tegra_soc_wm8753.c b/sound/soc/tegra/tegra_soc_wm8753.c index 4e9c3881b4e0..c661a62c2169 100644 --- a/sound/soc/tegra/tegra_soc_wm8753.c +++ b/sound/soc/tegra/tegra_soc_wm8753.c @@ -410,6 +410,7 @@ void tegra_codec_shutdown(struct snd_pcm_substream *substream) int tegra_soc_suspend_pre(struct platform_device *pdev, pm_message_t state) { + tegra_jack_suspend(); return 0; } @@ -435,6 +436,7 @@ int tegra_soc_resume_pre(struct platform_device *pdev) int tegra_soc_resume_post(struct platform_device *pdev) { + tegra_jack_resume(); return 0; } diff --git a/sound/soc/tegra/tegra_soc_wm8903.c b/sound/soc/tegra/tegra_soc_wm8903.c index d97f825c51b1..ee5b0af8d3ac 100644 --- a/sound/soc/tegra/tegra_soc_wm8903.c +++ b/sound/soc/tegra/tegra_soc_wm8903.c @@ -304,6 +304,7 @@ void tegra_codec_shutdown(struct snd_pcm_substream *substream) int tegra_soc_suspend_pre(struct platform_device *pdev, pm_message_t state) { + tegra_jack_suspend(); return 0; } @@ -329,6 +330,7 @@ int tegra_soc_resume_pre(struct platform_device *pdev) int tegra_soc_resume_post(struct platform_device *pdev) { + tegra_jack_resume(); return 0; } diff --git a/sound/soc/tegra/tegra_wired_jack.c b/sound/soc/tegra/tegra_wired_jack.c index 9a434fe57715..8c1ff4f354cd 100644 --- a/sound/soc/tegra/tegra_wired_jack.c +++ b/sound/soc/tegra/tegra_wired_jack.c @@ -128,10 +128,18 @@ static int wired_switch_notify(struct notifier_block *self, return NOTIFY_OK; } +void tegra_jack_suspend(void) +{ + snd_soc_jack_free_gpios(tegra_wired_jack, + ARRAY_SIZE(wired_jack_gpios), + wired_jack_gpios); +} void tegra_jack_resume(void) { - tegra_switch_set_state(get_headset_state()); + snd_soc_jack_add_gpios(tegra_wired_jack, + ARRAY_SIZE(wired_jack_gpios), + wired_jack_gpios); } static struct notifier_block wired_switch_nb = { @@ -232,6 +240,7 @@ static int tegra_wired_jack_remove(struct platform_device *pdev) gpio_free(tegra_wired_jack_conf.en_mic_int); gpio_free(tegra_wired_jack_conf.en_mic_ext); gpio_free(tegra_wired_jack_conf.en_spkr); + gpio_free(tegra_wired_jack_conf.cdc_irq); if (tegra_wired_jack_conf.amp_reg) { if (tegra_wired_jack_conf.amp_reg_enabled) |