From: Greg Meiste Date: Wed, 6 Oct 2010 19:27:28 +0000 (-0500) Subject: [ARM] mfd: tegra-cpcap-audio: workaround for audio wakelock preventing LP0 X-Git-Tag: firefly_0821_release~9834^2~457 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f922d75a29624dc250a74d90f8c8e9e7c1f8988d;p=firefly-linux-kernel-4.4.55.git [ARM] mfd: tegra-cpcap-audio: workaround for audio wakelock preventing LP0 The audio output FIFO is not empty when the request to put audio in standby occurs. This stops the DMA callbacks, preventing the FIFO from ever emptying. Therefore, audio will forever hold a wakelock, preventing the device from entering LP0. Change-Id: I8a642916707d07e2ff71f4e0ff7fc0f23dd41959 Signed-off-by: Greg Meiste Signed-off-by: Iliyan Malchev --- diff --git a/drivers/mfd/tegra-cpcap-audio.c b/drivers/mfd/tegra-cpcap-audio.c index ba150ad40131..4f47840f1dee 100644 --- a/drivers/mfd/tegra-cpcap-audio.c +++ b/drivers/mfd/tegra-cpcap-audio.c @@ -30,6 +30,7 @@ #include #include #include +#include #include @@ -259,6 +260,8 @@ static long cpcap_audio_ctl_ioctl(struct file *file, unsigned int cmd, current_output.on = !out.on; if (out.on) { pr_info("%s: standby mode\n", __func__); + /* HACK: Give output audio FIFO time to empty */ + msleep(100); tegra_setup_audio_output_off(); break; }