Skip to content

Commit

Permalink
ALSA: usb-audio: ignore delay calculation for capture stream
Browse files Browse the repository at this point in the history
It doesn't make sense to calculate the delay for capture streams in
the current implementation.  It's always zero, so we should skip the
computation in snd_usb_pcm_pointer() in the case of capture.

Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Nov 23, 2012
1 parent ffe4d12 commit 3f94fad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sound/usb/pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ static snd_pcm_uframes_t snd_usb_pcm_pointer(struct snd_pcm_substream *substream
return SNDRV_PCM_POS_XRUN;
spin_lock(&subs->lock);
hwptr_done = subs->hwptr_done;
substream->runtime->delay = snd_usb_pcm_delay(subs,
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
substream->runtime->delay = snd_usb_pcm_delay(subs,
substream->runtime->rate);
spin_unlock(&subs->lock);
return hwptr_done / (substream->runtime->frame_bits >> 3);
Expand Down

0 comments on commit 3f94fad

Please sign in to comment.