BACKPORT: ALSA: usb-audio: Move configuration to prepare.
authorDylan Reid <dgreid@chromium.org>
Tue, 18 Sep 2012 21:33:41 +0000 (14:33 -0700)
committerGerrit <chrome-bot@google.com>
Thu, 27 Sep 2012 21:31:03 +0000 (14:31 -0700)
commit90ce2c9c93541e702aa2b6773eed7b34f9e41249
tree5cd1db747e2d13308a8606b54b50b5f26c69345e
parent5482d3b7b0a784d87f21a11b2ae1d3b0628d951f
BACKPORT: ALSA: usb-audio: Move configuration to prepare.

Move interface and endpoint configuration from hw_params to prepare
callback.  During system suspend/resume when the USB device power isn't
cycled the interface and endpoint configuration need to be set before
audio playback can continue.  Resume involves another call to prepare
but not to hw_params, moving it here allows a playing stream to continue
after resume.

This is modified from the version going upstream as the endpoint rework
in 3.5 has changed all of these interfaces.  Same functionality however.

BUG=chrome-os-parnter:12822
TEST=suspend/resume while playing audio to USB speakers.

(Backported from 61a709504b079110cd5b12ea9a4590ffea687a5c)
Change-Id: Ie70d8c4c74014b877b2b6244c5accb81b6fb8d5c
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33583
Reviewed-by: Chih-Chung Chang <chihchung@chromium.org>
sound/usb/card.h
sound/usb/pcm.c