]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: usb-audio: Avoid unnecessary EP setups in prepare
authorTakashi Iwai <tiwai@suse.de>
Tue, 18 Sep 2012 12:49:31 +0000 (14:49 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 19 Sep 2012 06:08:16 +0000 (08:08 +0200)
commit8fb42631176f7a3c51e900fe312482f496ba5446
tree09d8c9b74426145ff754690d19a12ec2f8991ddb
parentd93ce63de3d32b5973617869af44c633df963cdc
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>
sound/usb/card.c
sound/usb/card.h
sound/usb/pcm.c