diff options
author | Mark Brown <broonie@kernel.org> | 2016-05-27 12:45:41 (GMT) |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-05-27 12:45:41 (GMT) |
commit | e61249bb8a67a9f31a52f91259569aa44e9f6ca2 (patch) | |
tree | 5b25a721fcb4fbcba6f35bbe51e2a90965dceada | |
parent | aaa36d3a98e20b858438eb16cd5c81f27be6dfd5 (diff) | |
parent | 989ff7754a27a1fcc0c3b2794c985b31811871a0 (diff) | |
download | linux-e61249bb8a67a9f31a52f91259569aa44e9f6ca2.tar.xz |
Merge remote-tracking branch 'asoc/topic/omap' into asoc-next
-rw-r--r-- | sound/soc/omap/mcbsp.c | 8 | ||||
-rw-r--r-- | sound/soc/omap/omap-pcm.c | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c index c7563e2..4a16e77 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); } diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index 99381a2..a84f677 100644 --- a/sound/soc/omap/omap-pcm.c +++ b/sound/soc/omap/omap-pcm.c @@ -82,6 +82,8 @@ static int omap_pcm_hw_params(struct snd_pcm_substream *substream, struct dma_chan *chan; int err = 0; + memset(&config, 0x00, sizeof(config)); + dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream); /* return if this is a bufferless transfer e.g. |