summaryrefslogtreecommitdiff
path: root/sound/i2c/other/ak4113.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/i2c/other/ak4113.c')
-rw-r--r--sound/i2c/other/ak4113.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/sound/i2c/other/ak4113.c b/sound/i2c/other/ak4113.c
index c6bba99a90b2..c2b14d981fa1 100644
--- a/sound/i2c/other/ak4113.c
+++ b/sound/i2c/other/ak4113.c
@@ -636,3 +636,19 @@ static void ak4113_stats(struct work_struct *work)
if (atomic_dec_and_test(&chip->wq_processing))
schedule_delayed_work(&chip->work, HZ / 10);
}
+
+#ifdef CONFIG_PM
+void snd_ak4113_suspend(struct ak4113 *chip)
+{
+ atomic_inc(&chip->wq_processing); /* don't schedule new work */
+ cancel_delayed_work_sync(&chip->work);
+}
+EXPORT_SYMBOL(snd_ak4113_suspend);
+
+void snd_ak4113_resume(struct ak4113 *chip)
+{
+ atomic_dec(&chip->wq_processing);
+ snd_ak4113_reinit(chip);
+}
+EXPORT_SYMBOL(snd_ak4113_resume);
+#endif