From 35ec7aa29833de350f51922736aefe22ebf76c4d Mon Sep 17 00:00:00 2001 From: Dylan Reid Date: Tue, 18 Sep 2012 09:49:47 -0700 Subject: 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 Signed-off-by: Takashi Iwai --- sound/usb/pcm.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'sound/usb/pcm.c') 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); } -- cgit v1.2.3