[alsa-devel] [PATCH 1/2] Revert "ALSA: usb-audio: ignore delay calculation for capture stream"

Takashi Iwai tiwai at suse.de
Wed Dec 19 18:24:55 CET 2012


At Wed, 19 Dec 2012 11:18:38 -0600,
Pierre-Louis Bossart wrote:
> 
> This reverts commit 3f94fad09538ec988919ec3f371841182df71d04.
> 
> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>

Revert is no good method in this case.  The correct usage for revert
is for fixing a regression.  But in this case, reverting this commit
introduces the bug again until it's fixed in your next commit.  

So, simply fold all in a single patch.


thanks,

Takashi

> ---
>  sound/usb/pcm.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
> index c659310..b09b895 100644
> --- a/sound/usb/pcm.c
> +++ b/sound/usb/pcm.c
> @@ -78,8 +78,7 @@ 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;
> -	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
> -		substream->runtime->delay = snd_usb_pcm_delay(subs,
> +	substream->runtime->delay = snd_usb_pcm_delay(subs,
>  						substream->runtime->rate);
>  	spin_unlock(&subs->lock);
>  	return hwptr_done / (substream->runtime->frame_bits >> 3);
> -- 
> 1.7.9.5
> 


More information about the Alsa-devel mailing list