diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-09-18 14:49:31 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-09-19 08:08:16 +0200 |
commit | 384dc085c32285e6548511bf80c5d5a5b246ed24 (patch) | |
tree | 09d8c9b74426145ff754690d19a12ec2f8991ddb /sound/usb/card.h | |
parent | 61a709504b079110cd5b12ea9a4590ffea687a5c (diff) |
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: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/card.h')
-rw-r--r-- | sound/usb/card.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/usb/card.h b/sound/usb/card.h index 6cc883c3567d..afa4f9e9b27a 100644 --- a/sound/usb/card.h +++ b/sound/usb/card.h @@ -125,6 +125,7 @@ struct snd_usb_substream { struct snd_usb_endpoint *data_endpoint; struct snd_usb_endpoint *sync_endpoint; unsigned long flags; + bool need_setup_ep; /* (re)configure EP at prepare? */ u64 formats; /* format bitmasks (all or'ed) */ unsigned int num_formats; /* number of supported audio formats (list) */ |