Skip to content

Commit

Permalink
ASoC: fsi: fixup fsi_pointer() calculation method
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kuninori Morimoto authored and Mark Brown committed Feb 9, 2012
1 parent a7c4183 commit 1987877
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions sound/soc/sh/fsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 1987877

Please sign in to comment.