Skip to content
Commit 384dc085 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: usb-audio: Avoid unnecessary EP setups in prepare



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>
parent 61a70950
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment