diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2012-02-09 00:57:29 (GMT) |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-02-09 10:50:53 (GMT) |
commit | 1987877d869027ab63dc9df515e11f19279a8091 (patch) | |
tree | dfd5d306a80c6d558b8c53aaf05473872e53f7ef /sound/soc/sh | |
parent | a7c4183be2d6a7da8c97a9b671b5f3aed321127e (diff) | |
download | linux-fsl-qoriq-1987877d869027ab63dc9df515e11f19279a8091.tar.xz |
ASoC: fsi: fixup fsi_pointer() calculation method
current fsi_pointer() calculation was not correct for FSI driver.
This patch fix it up.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/sh')
-rw-r--r-- | sound/soc/sh/fsi.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index db6c89a..ea4a82d0 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c @@ -1152,12 +1152,8 @@ static snd_pcm_uframes_t fsi_pointer(struct snd_pcm_substream *substream) { struct fsi_priv *fsi = fsi_get_priv(substream); struct fsi_stream *io = fsi_get_stream(fsi, fsi_is_play(substream)); - int samples_pos = io->buff_sample_pos - 1; - if (samples_pos < 0) - samples_pos = 0; - - return fsi_sample2frame(fsi, samples_pos); + return fsi_sample2frame(fsi, io->buff_sample_pos); } static struct snd_pcm_ops fsi_pcm_ops = { |