Skip to content
  • Takashi Iwai's avatar
    ALSA: usb-audio: Avoid unnecessary EP setups in prepare · 384dc085
    Takashi Iwai authored
    
    
    The recent fix for USB suspend breakage moved the code to set up EP
    from hw_params to prepare, but it means also the EP setup might be
    called multiple times unnecessarily because the prepare callback can
    be called multiple times without starting the stream (e.g. OSS
    emulation).
    
    This patch adds a new flag to struct snd_usb_substream indicating
    whether the setup of EP is required, and do it only when necessary,
    i.e. right after hw_params or suspend.
    
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    384dc085