]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ASoC: Intel: Clear stored Baytrail DSP DMA pointer before stream start
authorJarkko Nikula <jarkko.nikula@linux.intel.com>
Mon, 26 May 2014 13:56:30 +0000 (16:56 +0300)
committerMark Brown <broonie@linaro.org>
Sun, 1 Jun 2014 10:50:45 +0000 (11:50 +0100)
Stored DSP DMA pointer must be cleared before starting the stream since
PCM pointer callback sst_byt_pcm_pointer() can be called before pointer is
updated. In that case last position of previous stream was wronly returned.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/intel/sst-baytrail-pcm.c

index 3af38576e91eeb961269f14261316443ff5c56bd..8eab97368ea7681f6a294a0e18a0987a7c88bfdf 100644 (file)
@@ -180,6 +180,7 @@ static int sst_byt_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
 
        switch (cmd) {
        case SNDRV_PCM_TRIGGER_START:
+               pcm_data->hw_ptr = 0;
                sst_byt_stream_start(byt, pcm_data->stream, 0);
                break;
        case SNDRV_PCM_TRIGGER_RESUME: