diff options
author | oder_chiou@realtek.com <oder_chiou@realtek.com> | 2017-08-07 18:39:32 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-08-07 12:32:31 +0100 |
commit | b56bff43a965ffe03b4a994fd1a102059d272807 (patch) | |
tree | 18072f5b5da56f8e04f44bc148b03a2d116b81c0 /sound/soc/codecs/rt5514-spi.c | |
parent | 818010dac09183e99ff02e35836544b2e1d659f3 (diff) | |
download | linux-b56bff43a965ffe03b4a994fd1a102059d272807.tar.bz2 |
ASoC: rt5514: reset dma_offset at hw_params
dma_offset needs reset every time otherwise for consecutive PCM
open the last dma_offset value will cause incorrect pointer position
be reported to user space.
Signed-off-by: Hsin-Yu Chao <hychao@chromium.org>
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt5514-spi.c')
-rw-r--r-- | sound/soc/codecs/rt5514-spi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/rt5514-spi.c b/sound/soc/codecs/rt5514-spi.c index 6f513cc4c56c..640193d845be 100644 --- a/sound/soc/codecs/rt5514-spi.c +++ b/sound/soc/codecs/rt5514-spi.c @@ -151,7 +151,6 @@ static irqreturn_t rt5514_spi_irq(int irq, void *data) u8 buf[8]; rt5514_dsp->get_size = 0; - rt5514_dsp->dma_offset = 0; /** * The address area x1800XXXX is the register address, and it cannot @@ -205,6 +204,7 @@ static int rt5514_spi_hw_params(struct snd_pcm_substream *substream, ret = snd_pcm_lib_alloc_vmalloc_buffer(substream, params_buffer_bytes(hw_params)); rt5514_dsp->substream = substream; + rt5514_dsp->dma_offset = 0; mutex_unlock(&rt5514_dsp->dma_lock); return ret; |