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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EA02FC46467 for ; Tue, 3 Jan 2023 16:04:53 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 34B152D1A; Tue, 3 Jan 2023 17:04:01 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 34B152D1A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1672761891; bh=7F0XncqHHcMafDFS7aMXNJ0zBT0QuCzfk3GZkR6cDqY=; h=Date:From:To:Subject:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=QAq/N0tcXrTEVdL4e7OjpKj+ncVgqGe5n8gkDnoHoIuwZjOQMsnzsKseOSIIFondR awTJqIh/Me63SDwv7Z7aBswqDOPdrYBvtCSwrcEj78JePELpaT24eni+5m9Nl9NsJX XiuG1Oy2Nf0h+QGy/istVUxSkVMPYsLfgRpeUVhA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id CF0E4F804AD; Tue, 3 Jan 2023 17:04:00 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3D442F803DC; Tue, 3 Jan 2023 17:03:59 +0100 (CET) Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 7CB29F8047B for ; Tue, 3 Jan 2023 17:03:56 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7CB29F8047B Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=BW2LgrNh; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=QuuooW3Y 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 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 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, regressions@lists.linux.dev, Takashi Iwai , stable@vger.kernel.org, Thorsten Leemhuis Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 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) From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 31DEF8466 for ; Tue, 3 Jan 2023 16:03:58 +0000 (UTC) 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 Precedence: bulk X-Mailing-List: regressions@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII 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)