diff options
author | Adam Thomson <Adam.Thomson.Opensource@diasemi.com> | 2016-09-26 15:29:21 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-09-26 18:39:50 +0200 |
commit | bb0c35fcaf8f2ad3383dd43ca8abf5203cd06cc3 (patch) | |
tree | 0e97ce1ffbbfe4f9cb0fbdd5b53d63acb552cc2e /sound/soc/codecs/da7219-aad.h | |
parent | ASoC: da7219: Reset codec gracefully, if still active (diff) | |
download | linux-bb0c35fcaf8f2ad3383dd43ca8abf5203cd06cc3.tar.xz linux-bb0c35fcaf8f2ad3383dd43ca8abf5203cd06cc3.zip |
ASoC: da7219: Disable AAD if codec is not a wake-up source
Currently if AAD is enabled in the device, during system suspend
the feature remains, regardless of whether the codec is a wake-up
source or not. This means some additional power is being used
which is unnecessary, and can causes issues with some platforms'
IRQ handlers where state changes during system suspend aren't
captured.
This patch updates the driver to disable AAD during suspend, if
we're not a wake-up source, and then re-enables this on resume.
Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/da7219-aad.h')
-rw-r--r-- | sound/soc/codecs/da7219-aad.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/codecs/da7219-aad.h b/sound/soc/codecs/da7219-aad.h index a34be4828f97..117a3d7ccd31 100644 --- a/sound/soc/codecs/da7219-aad.h +++ b/sound/soc/codecs/da7219-aad.h @@ -201,12 +201,17 @@ struct da7219_aad_priv { struct work_struct hptest_work; struct snd_soc_jack *jack; + bool micbias_resume_enable; bool jack_inserted; }; /* AAD control */ void da7219_aad_jack_det(struct snd_soc_codec *codec, struct snd_soc_jack *jack); +/* Suspend/Resume */ +void da7219_aad_suspend(struct snd_soc_codec *codec); +void da7219_aad_resume(struct snd_soc_codec *codec); + /* Init/Exit */ int da7219_aad_init(struct snd_soc_codec *codec); void da7219_aad_exit(struct snd_soc_codec *codec); |