Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 257563
b: refs/heads/master
c: 57cc243
h: refs/heads/master
i:
  257561: 22270d3
  257559: 4f43650
v: v3
  • Loading branch information
Mark Brown committed Jun 29, 2011
1 parent 94ac135 commit 5098d82
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4e8e78e37c615e7904f51e62b5a06cb8fa3b3b53
refs/heads/master: 57cc2432e172b191db488ec8ad430b283807af0a
13 changes: 11 additions & 2 deletions trunk/sound/soc/blackfin/bf5xx-i2s-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,20 @@ static snd_pcm_uframes_t bf5xx_pcm_pointer(struct snd_pcm_substream *substream)
pr_debug("%s enter\n", __func__);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
diff = sport_curr_offset_tx(sport);
frames = bytes_to_frames(substream->runtime, diff);
} else {
diff = sport_curr_offset_rx(sport);
frames = bytes_to_frames(substream->runtime, diff);
}

/*
* TX at least can report one frame beyond the end of the
* buffer if we hit the wraparound case - clamp to within the
* buffer as the ALSA APIs require.
*/
if (diff == snd_pcm_lib_buffer_bytes(substream))
diff = 0;

frames = bytes_to_frames(substream->runtime, diff);

return frames;
}

Expand Down

0 comments on commit 5098d82

Please sign in to comment.