From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935564AbdADG2d (ORCPT ); Wed, 4 Jan 2017 01:28:33 -0500 Received: from mx2.suse.de ([195.135.220.15]:45313 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935368AbdADG2c (ORCPT ); Wed, 4 Jan 2017 01:28:32 -0500 Date: Wed, 04 Jan 2017 07:28:28 +0100 Message-ID: From: Takashi Iwai To: "Ioan-Adrian Ratiu" Cc: , , , Subject: Re: [PATCH v2 1/2] ALSA: usb-audio: Fix irq/process data synchronization In-Reply-To: <20170102155031.3638-2-adi@adirat.com> References: <20170102155031.3638-1-adi@adirat.com> <20170102155031.3638-2-adi@adirat.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.1 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 02 Jan 2017 16:50:30 +0100, Ioan-Adrian Ratiu wrote: > > --- a/sound/usb/pcm.c > +++ b/sound/usb/pcm.c (snip) > @@ -850,7 +850,7 @@ static int snd_usb_pcm_prepare(struct snd_pcm_substream *substream) > /* for playback, submit the URBs now; otherwise, the first hwptr_done > * updates for all URBs would happen at the same time when starting */ > if (subs->direction == SNDRV_PCM_STREAM_PLAYBACK) > - ret = start_endpoints(subs, true); > + return start_endpoints(subs); Here you miss the unlock below. > > unlock: > snd_usb_unlock_shutdown(subs->stream->chip); ... and this must be the reason of the hang up at disconnection, where the driver ways forever at wait_event() in usb_audio_disconnect(). Could you fix this and resubmit v3? Other than that, it looks OK. thanks, Takashi