Skip to content

Commit

Permalink
ALSA: usb-audio: process pending stop at PCM hw_free and close
Browse files Browse the repository at this point in the history
PCM hw_free and close should wait until all the pending stop
operations have been finished.  Basically only PCM trigger callback
should use non-wait calls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Nov 21, 2012
1 parent b2eb950 commit b0db606
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/usb/pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ static int configure_endpoint(struct snd_usb_substream *subs)
int ret;

/* format changed */
stop_endpoints(subs, false);
stop_endpoints(subs, true);
ret = snd_usb_endpoint_set_params(subs->data_endpoint,
subs->pcm_format,
subs->channels,
Expand Down Expand Up @@ -1012,7 +1012,7 @@ static int snd_usb_pcm_close(struct snd_pcm_substream *substream, int direction)
struct snd_usb_stream *as = snd_pcm_substream_chip(substream);
struct snd_usb_substream *subs = &as->substream[direction];

stop_endpoints(subs, false);
stop_endpoints(subs, true);

if (!as->chip->shutdown && subs->interface >= 0) {
usb_set_interface(subs->dev, subs->interface, 0);
Expand Down

0 comments on commit b0db606

Please sign in to comment.