• Clemens Ladisch's avatar
    [ALSA] usb-audio: start submitting URBs in the prepared state · b55bbf06
    Clemens Ladisch authored
    Modules: USB generic driver
    
    If we submit all our URBs when a playback stream is started, the first
    hwptr_done update for each URB happens at the same time.  This results
    in an underrun when there isn't enough PCM data available at this
    point for all URBs.
    
    To avoid this, we begin submitting our URBs earlier (when the stream
    is prepared), with empy packets.  When the stream is started, the
    prepare_playback_urb() call for each URB will be run only when the
    respective URB has completed previously, so the first hwptr_done
    updates will be done nicely staggered.
    Signed-off-by: default avatarClemens Ladisch <clemens@ladisch.de>
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    b55bbf06
usbaudio.c 95 KB