• Takashi Iwai's avatar
    ALSA: usb-audio: fix delay account during pause · 48779a0b
    Takashi Iwai authored
    When a playback stream is paused, the stream isn't actually stopped,
    thus we still need to take care of the in-flight data amount for the
    delay calculation.  Otherwise the value of subs->last_delay is no
    longer reliable and can give a bogus value after resuming from pause.
    This will result in "delay: estimated XX, actual YY" error messages.
    
    Also, during pause after all in flight data are processed
    (i.e. last_delay = 0), we don't have to calculate the actual delay
    from the current frame.  Give a short path in such a case.
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    48779a0b
pcm.c 37.3 KB