diff options
author | Dylan Reid <dgreid@chromium.org> | 2012-09-18 09:49:48 -0700 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-09-19 08:08:11 +0200 |
commit | 61a709504b079110cd5b12ea9a4590ffea687a5c (patch) | |
tree | f49a7338767f2117c4167904a878f27ec9955162 /sound/usb/card.h | |
parent | 35ec7aa29833de350f51922736aefe22ebf76c4d (diff) | |
download | lwn-61a709504b079110cd5b12ea9a4590ffea687a5c.tar.gz lwn-61a709504b079110cd5b12ea9a4590ffea687a5c.zip |
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.
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/card.h')
-rw-r--r-- | sound/usb/card.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/usb/card.h b/sound/usb/card.h index 23b6f23bd36a..6cc883c3567d 100644 --- a/sound/usb/card.h +++ b/sound/usb/card.h @@ -107,6 +107,8 @@ struct snd_usb_substream { int interface; /* current interface */ int endpoint; /* assigned endpoint */ struct audioformat *cur_audiofmt; /* current audioformat pointer (for hw_params callback) */ + snd_pcm_format_t pcm_format; /* current audio format (for hw_params callback) */ + unsigned int channels; /* current number of channels (for hw_params callback) */ unsigned int cur_rate; /* current rate (for hw_params callback) */ unsigned int period_bytes; /* current period bytes (for hw_params callback) */ unsigned int altset_idx; /* USB data format: index of alternate setting */ |