summaryrefslogtreecommitdiffstats
path: root/sound/soc/omap/mcbsp.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2016-05-27 17:16:53 +0200
committerTakashi Iwai <tiwai@suse.de>2016-05-27 17:16:53 +0200
commiteb4606e64a7d548f5d60a9583baa8104890b2c6e (patch)
tree2dc8e587fc79c207dab2fb74830963cc84dcf801 /sound/soc/omap/mcbsp.c
parent86c72d1ce91d804e4fa8d90b316a89597dd220f1 (diff)
parentbf65921380cd50b87618df550398e06581f4a361 (diff)
downloadlinux-stable-eb4606e64a7d548f5d60a9583baa8104890b2c6e.tar.gz
linux-stable-eb4606e64a7d548f5d60a9583baa8104890b2c6e.tar.bz2
linux-stable-eb4606e64a7d548f5d60a9583baa8104890b2c6e.zip
Merge tag 'asoc-v4.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Updates for v4.7 part 2 Really sorry about this late pull request. It looks like at the time I sent my pull request for v4.7 there was some conflict or other issue which caused my script to stop merging the ASoC branches at some point after the HDMI changes. It's all specific driver updates, including: - New drivers for MAX98371 and TAS5720. - SPI support for TLV320AIC32x4. - TDM support for STI Uniperf IPs. This code should all have been in -next prior to the merge window apart from some fixes, it dropped out on the 18th.
Diffstat (limited to 'sound/soc/omap/mcbsp.c')
-rw-r--r--sound/soc/omap/mcbsp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c
index c7563e230c7d..4a16e778966b 100644
--- a/sound/soc/omap/mcbsp.c
+++ b/sound/soc/omap/mcbsp.c
@@ -260,6 +260,10 @@ static void omap_st_on(struct omap_mcbsp *mcbsp)
if (mcbsp->pdata->enable_st_clock)
mcbsp->pdata->enable_st_clock(mcbsp->id, 1);
+ /* Disable Sidetone clock auto-gating for normal operation */
+ w = MCBSP_ST_READ(mcbsp, SYSCONFIG);
+ MCBSP_ST_WRITE(mcbsp, SYSCONFIG, w & ~(ST_AUTOIDLE));
+
/* Enable McBSP Sidetone */
w = MCBSP_READ(mcbsp, SSELCR);
MCBSP_WRITE(mcbsp, SSELCR, w | SIDETONEEN);
@@ -279,6 +283,10 @@ static void omap_st_off(struct omap_mcbsp *mcbsp)
w = MCBSP_READ(mcbsp, SSELCR);
MCBSP_WRITE(mcbsp, SSELCR, w & ~(SIDETONEEN));
+ /* Enable Sidetone clock auto-gating to reduce power consumption */
+ w = MCBSP_ST_READ(mcbsp, SYSCONFIG);
+ MCBSP_ST_WRITE(mcbsp, SYSCONFIG, w | ST_AUTOIDLE);
+
if (mcbsp->pdata->enable_st_clock)
mcbsp->pdata->enable_st_clock(mcbsp->id, 0);
}