summaryrefslogtreecommitdiffstats
path: root/sound/soc/omap/mcbsp.h
diff options
context:
space:
mode:
authorMatt Ranostay <matt@ranostay.consulting>2017-01-31 22:21:43 +0100
committerMark Brown <broonie@kernel.org>2017-02-01 18:19:53 +0100
commit9834ffd1ecc3a401d0ce64c2d4235a726da6d4f9 (patch)
treeb9241a9299e5e8f4d26072d0eb72e540f895e272 /sound/soc/omap/mcbsp.h
parentMerge remote-tracking branches 'asoc/topic/wm9712', 'asoc/topic/wm9713' and '... (diff)
downloadlinux-9834ffd1ecc3a401d0ce64c2d4235a726da6d4f9.tar.xz
linux-9834ffd1ecc3a401d0ce64c2d4235a726da6d4f9.zip
ASoC: omap-mcbsp: Add PM QoS support for McBSP to prevent glitches
We can get audio errors if hitting deeper idle states on omaps: [alsa.c:230] error: Fatal problem with alsa output, error -5. [audio.c:614] error: Error in writing audio (Input/output error?)! This seems to happen with off mode idle enabled as power for the whole SoC may get cut off between filling the McBSP fifo using DMA. While active DMA blocks deeper idle states in hardware, McBSP activity does not seem to do so. Basing the QoS latency calculation on the FIFO size, threshold, sample rate, and channels. Based on the original patch by Tony Lindgren Link: https://patchwork.kernel.org/patch/9305867/ Signed-off-by: Matt Ranostay <matt@ranostay.consulting> Signed-off-by: Liam Breck <kernel@networkimprov.net> Tested-by: Tony Lindgren <tony@atomide.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/omap/mcbsp.h')
-rw-r--r--sound/soc/omap/mcbsp.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/omap/mcbsp.h b/sound/soc/omap/mcbsp.h
index 61e93b1c185d..46ae1269a698 100644
--- a/sound/soc/omap/mcbsp.h
+++ b/sound/soc/omap/mcbsp.h
@@ -323,8 +323,11 @@ struct omap_mcbsp {
unsigned int fmt;
unsigned int in_freq;
+ unsigned int latency[2];
int clk_div;
int wlen;
+
+ struct pm_qos_request pm_qos_req;
};
void omap_mcbsp_config(struct omap_mcbsp *mcbsp,