Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp885455rwb; Tue, 29 Nov 2022 06:34:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf4LCAwyq43v4NUB5fr5Pu/PkFQr2NwsZQ367SOikSIDJs6sYLqZ94DomCzvlkLX9LTQx/7v X-Received: by 2002:a17:902:a5ca:b0:186:bb48:2b34 with SMTP id t10-20020a170902a5ca00b00186bb482b34mr38222334plq.1.1669732453443; Tue, 29 Nov 2022 06:34:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669732453; cv=none; d=google.com; s=arc-20160816; b=X2BM+O2FmABUpqZxY6PYj9Msx3xeUQmTTdk8HU7VdwcEi7BQ9bnzmWewPe0BHIGxVC YYfAggsLoDrO8An+nFkcdZn6dAirNHVz01jeRMpyRpVXWsGARsrBq3UKy2FzLDmR62PB 4jazetWEdctL0i15nIvF73VPl1UVyI5t/IHt5EcQOyyvR/ARCqwDBNkP1HqcRAe60IEp ESmhTO23z/8oqTDQWpCZedoufOQ1NRZU8gXIc0XwSultDMSd2w2g0JTnAalJVhO0p3ng W16ATktB6uNZmO2x0HhMYVGj9baMMkadlEKcKWdyBtoZz0nWJBdlkGhfeTk4xEaIpA+n D3aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature:dkim-signature; bh=irwTfed7jhUDL3QvqQKxnlDd5lsqKyydbwPabpuneq4=; b=RxcyFcuhGcED+uxxoiO5ZG5YHP804l3iaURUWGyrGAm5688EPxFObFP8T+VpLQadFl zVkGUrhTq4dBPDtEUzpxnPiitVHwwrY7gBhtEhWEFcGg7PFRHUoPRudn/99pmv5nFCYI QJzLKsKlKAxcxistVKvYcW9ECUF42txlakd4CtneQzTvcQ+JNrHnAsTJNE0xU+z5XyC1 ikNfetJuvbWwdhM+b/+qeDLYX4Q7uDVmDAmXfP8D9vsOIEl/S0QAc/l7Jcvpht+AuKo5 PH8Z0pOhVZKgrFEf0taF0zuW2mxE1aRUjqc4HzLeAMBtrUVAldbBa77cva6Q8yfbojoi G5gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=rWQX87Xc; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=uZ2Ako6m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o11-20020a17090ac70b00b002134f593f88si1782925pjt.38.2022.11.29.06.34.01; Tue, 29 Nov 2022 06:34:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=rWQX87Xc; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=uZ2Ako6m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234741AbiK2OFv (ORCPT + 83 others); Tue, 29 Nov 2022 09:05:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235379AbiK2OFO (ORCPT ); Tue, 29 Nov 2022 09:05:14 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D334643AD8 for ; Tue, 29 Nov 2022 06:04:53 -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 5292421B0E; Tue, 29 Nov 2022 14:04:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1669730692; 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=irwTfed7jhUDL3QvqQKxnlDd5lsqKyydbwPabpuneq4=; b=rWQX87XckFJaw45/QxzqE6D2vCVsuKQFrb1c/ApufLafZ08Gj6K8KccnaOWA8/Ju4T9hi0 VEd81EZzBahIzXV1xXGD2nRUfuZkY4G0AYkb6/LdZBwR50ChbTCBOC7oILKp/up8zp9Eiq U72GuuOmVUoHSmUFYn46uJAuDks/56Y= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1669730692; 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=irwTfed7jhUDL3QvqQKxnlDd5lsqKyydbwPabpuneq4=; b=uZ2Ako6mj0YyNmMN0H3+5bzv+X1Xvbc3/loYP7THajbB+fqOj9FcHP/Vfa8DQ9GvEHiiKE xDLxjE7tlvV6/sCw== 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 18A1A13428; Tue, 29 Nov 2022 14:04:52 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 3+X4BIQRhmPFRAAAMHmgww (envelope-from ); Tue, 29 Nov 2022 14:04:52 +0000 Date: Tue, 29 Nov 2022 15:04:51 +0100 Message-ID: <87sfi1q2kc.wl-tiwai@suse.de> From: Takashi Iwai To: John Keeping Cc: alsa-devel@alsa-project.org, Jaroslav Kysela , Takashi Iwai , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] ALSA: usb-audio: Add quirk for Tascam Model 12 In-Reply-To: <20221129130100.1257904-1-john@metanate.com> References: <20221129130100.1257904-1-john@metanate.com> 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-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 29 Nov 2022 14:00:59 +0100, John Keeping wrote: > > Tascam's Model 12 is a mixer which can also operate as a USB audio > interface. The audio interface uses explicit feedback but it seems that > it does not correctly handle missing isochronous frames. > > When injecting an xrun (or doing anything else that pauses the playback > stream) the feedback rate climbs (for example, at 44,100Hz nominal, I > see a stable rate around 44,099 but xrun injection sees this peak at > around 44,135 in most cases) and glitches are heard in the audio stream > for several seconds - this is significantly worse than the single glitch > expected for an underrun. > > While the stream does normally recover and the feedback rate returns to > a stable value, I have seen some occurrences where this does not happen > and the rate continues to increase while no audio is heard from the > output. I have not found a solid reproduction for this. > > This misbehaviour can be avoided by totally resetting the stream state > by switching the interface to alt 0 and back before restarting the > playback stream. > > Add a new quirk flag which forces the endpoint and interface to be > reconfigured whenever the stream is stopped, and use this for the Tascam > Model 12. > > Separate interfaces are used for the playback and capture endpoints, so > resetting the playback interface here will not affect the capture stream > if it is running. While there are two endpoints on the interface, > these are the OUT data endpoint and the IN explicit feedback endpoint > corresponding to it and these are always stopped and started together. > > Signed-off-by: John Keeping > --- > v2: > - Set ep->need_prepare not ep->need_setup; this was missed when forward > porting the patch as need_prepare is new in 6.1 > - Add more details to the commit message about why it is safe to reset > the interface here Thanks, applied now. Takashi