diff options
author | Dylan Reid <dgreid@chromium.org> | 2012-09-18 18:49:47 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-09-19 08:07:52 +0200 |
commit | 35ec7aa29833de350f51922736aefe22ebf76c4d (patch) | |
tree | 20509b13b846678dbb8c16277bb0c57c936e735b /sound/usb/pcm.c | |
parent | ALSA: usb-audio: set period_bytes in substream. (diff) | |
download | linux-35ec7aa29833de350f51922736aefe22ebf76c4d.tar.xz linux-35ec7aa29833de350f51922736aefe22ebf76c4d.zip |
ALSA: usb-audio: Don't require hw_params in endpoint.
Change the interface to configure an endpoint so that it doesn't require
a hw_params struct. This will allow it to be called from prepare
instead of hw_params, configuring it after system resume.
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to '')
-rw-r--r-- | sound/usb/pcm.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c index 786f7a05e9a6..62ab4fd5880a 100644 --- a/sound/usb/pcm.c +++ b/sound/usb/pcm.c @@ -491,14 +491,24 @@ static int snd_usb_hw_params(struct snd_pcm_substream *substream, mutex_lock(&subs->stream->chip->shutdown_mutex); /* format changed */ stop_endpoints(subs, 0, 0, 0); - ret = snd_usb_endpoint_set_params(subs->data_endpoint, hw_params, fmt, + ret = snd_usb_endpoint_set_params(subs->data_endpoint, + format, + channels, + subs->period_bytes, + rate, + fmt, subs->sync_endpoint); if (ret < 0) goto unlock; if (subs->sync_endpoint) - ret = snd_usb_endpoint_set_params(subs->sync_endpoint, - hw_params, fmt, NULL); + ret = snd_usb_endpoint_set_params(subs->data_endpoint, + format, + channels, + subs->period_bytes, + rate, + fmt, + NULL); unlock: mutex_unlock(&subs->stream->chip->shutdown_mutex); } |