Loading sound/soc/blackfin/bf5xx-i2s-pcm.c +11 −2 Original line number Original line Diff line number Diff line Loading @@ -138,11 +138,20 @@ static snd_pcm_uframes_t bf5xx_pcm_pointer(struct snd_pcm_substream *substream) pr_debug("%s enter\n", __func__); pr_debug("%s enter\n", __func__); if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { diff = sport_curr_offset_tx(sport); diff = sport_curr_offset_tx(sport); frames = bytes_to_frames(substream->runtime, diff); } else { } else { diff = sport_curr_offset_rx(sport); 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; return frames; } } Loading Loading
sound/soc/blackfin/bf5xx-i2s-pcm.c +11 −2 Original line number Original line Diff line number Diff line Loading @@ -138,11 +138,20 @@ static snd_pcm_uframes_t bf5xx_pcm_pointer(struct snd_pcm_substream *substream) pr_debug("%s enter\n", __func__); pr_debug("%s enter\n", __func__); if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { diff = sport_curr_offset_tx(sport); diff = sport_curr_offset_tx(sport); frames = bytes_to_frames(substream->runtime, diff); } else { } else { diff = sport_curr_offset_rx(sport); 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; return frames; } } Loading