From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F16D5C3DA7D for ; Tue, 3 Jan 2023 16:04:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230397AbjACQD7 (ORCPT ); Tue, 3 Jan 2023 11:03:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231270AbjACQD6 (ORCPT ); Tue, 3 Jan 2023 11:03:58 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C736F112C for ; Tue, 3 Jan 2023 08:03:57 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 84561227DF; Tue, 3 Jan 2023 16:03:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1672761836; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xx94thxYeaPJ0cWVKCcjoVjusmkFByzZznJxWr7hfT4=; b=BW2LgrNhYB/ShUvELE79mF0CDNpC/1UxnHuJ5ofyumkB58w07djt2IUZ2T94QxkhKo72WA fYhi1FgY4L1WeV4RtzvlCQg1KKO/xxyTLzpzHWGsQRP5O5vosT8CL2F3kTVpPdQObGiXmg LEGH0FLzn9UBwdx4WsTFcDI+VTxjMW0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1672761836; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xx94thxYeaPJ0cWVKCcjoVjusmkFByzZznJxWr7hfT4=; b=QuuooW3Y+yKAIbetYivAGGAoQby9xZ7Vt4VgVLNDHXAkhGW9C/B9AS7Td3xJaMyjz2wMSZ LsT7uMnQZ3ZgmuCw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 5B9201390C; Tue, 3 Jan 2023 16:03:56 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id VR2MFexRtGP8fgAAMHmgww (envelope-from ); Tue, 03 Jan 2023 16:03:56 +0000 Date: Tue, 03 Jan 2023 17:03:55 +0100 Message-ID: <87zgazppuc.wl-tiwai@suse.de> From: Takashi Iwai To: Michael Ralston Cc: Thorsten Leemhuis , alsa-devel@alsa-project.org, regressions@lists.linux.dev, stable@vger.kernel.org, Jaroslav Kysela , Takashi Iwai Subject: Re: USB-Audio regression on behringer UMC404HD In-Reply-To: References: <87zgb0q7x4.wl-tiwai@suse.de> <87sfgrrb5f.wl-tiwai@suse.de> <87bknfr6rd.wl-tiwai@suse.de> <878rijr6dz.wl-tiwai@suse.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Tue, 03 Jan 2023 16:31:13 +0100, Michael Ralston wrote: > > On Wed, 4 Jan 2023 at 02:21, Takashi Iwai wrote: > > > > Hrm... Try to reload snd_usb_audio module with the dyndbg=+p option, > > e.g. > > > > # modprobe -r snd-usb-audio > > # modprobe snd_usb_audio dyndbg=+p > > > > Or you can try to put your own debug printk(); we need to make sure > > whether it's really the right code you're testing at first. > > > > Ok, it looks like it was ignoring the kernel command line for some > reason. modprobing it with the option brought up debug messages again. > > I'm still running kernel 6.1.2 vanilla with the revert and the patches. > > aplay hung again when I ran it, the kernel was stuck on: > Jan 04 02:25:59 leatherback kernel: usb 1-4: 1:1 Start Playback PCM > > and didn't output another line until I ctrl+c aplay. OK, thanks. Then it's not about the USB interface reset. It must be subtle and nasty difference. Could you apply the change below on the top? It essentially reverts the hw_params/prepare split again. Takashi -- 8< -- --- a/sound/usb/pcm.c +++ b/sound/usb/pcm.c @@ -564,6 +564,21 @@ static int snd_usb_hw_params(struct snd_pcm_substream *substream, } ret = snd_usb_endpoint_set_params(chip, subs->data_endpoint); + if (ret < 0) + goto unlock; + + if (subs->sync_endpoint) { + ret = snd_usb_endpoint_prepare(chip, subs->sync_endpoint); + if (ret < 0) + goto unlock; + } + + ret = snd_usb_endpoint_prepare(chip, subs->data_endpoint); + if (ret < 0) + goto unlock; + else if (ret > 0) + snd_usb_set_format_quirk(subs, subs->cur_audiofmt); + ret = 0; unlock: if (ret < 0)