Merge remote-tracking branch 'asoc/topic/omap' into asoc-next
authorMark Brown <broonie@kernel.org>
Fri, 27 May 2016 12:45:41 +0000 (13:45 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 27 May 2016 12:45:41 +0000 (13:45 +0100)
sound/soc/omap/mcbsp.c
sound/soc/omap/omap-pcm.c

index c7563e230c7dd261175c613624e16c0a7ed339ee..4a16e778966bb4fc64346c8d535ff45877bfd8e1 100644 (file)
@@ -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);
 }
index 99381a27295bbbd9452f0d0050c1509651373bff..a84f677234f08c5bd1ddaa7cd4a444111d4d8cf5 100644 (file)
@@ -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.
This page took 0.025595 seconds and 5 git commands to generate.