Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5575596pxu; Tue, 22 Dec 2020 23:11:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJwS9RGYyU5QZhN21ZF/I5rqS/sxEbLheWYH+bhrzBiQe07POgnrNVtKN/vDaQnVDbjMj7cz X-Received: by 2002:aa7:c355:: with SMTP id j21mr22870373edr.338.1608707490274; Tue, 22 Dec 2020 23:11:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608707490; cv=none; d=google.com; s=arc-20160816; b=NUHuzManFO0Eeo3dh29ognJlKgdRH20vnJH7vIx6l2Jp33BiHBOxWe38qQKfoabgeK MDmaMLkosmGqC/UCHToMyGNKgJ6BHBTZa7lrCw7ppZDtvQ+/r3TbOzQ08ROj9WR3zQ70 GEQ5pFg3mSCezUEvBUHqrORbY3fpVoAorpd3XOjjouBeVIPGnGfwv6sdt0RyYmqCBjJ1 8GGfpK1rJdZy9Ra3ST5wRJr1w9MLDYIR3pi16WuxXpKZ7cjozVfRS0l0XWffgeGnFKvN HECQbkJBtztNxE4G1JrXDtReTBm1r+DKCw1KG051U+ueSR/7PqaPmQRaj/SHSAj8vPPc Qw9w== 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; bh=y8/LTYg6QvxY4a7QVn4lnIdFyykVWrHld6CLUs7xS4s=; b=pa43euZg+UnN9eux1GvMuHzH/P7e/voTQQWuWbTsmV1CCbJDjitCmt/iJMlIo97WM/ +cH7B6dgH4q1tdhgGtdoEF0yS/lCvcTwtEVgNJM1m7kM+T8isLI27kfh5HLVtNyqACAx ZlOh+q/zbqnl5XiO01x4/JCCxd2/9RZlpLbwC9N/ozjQyMecw3nYwW4pQbNjdyWElxdi mbDF61ERyT15paOhBHAE9gDEVm4ZEzcOyNlJq3SL2+K2TovdOx6hNf3QHZjsHTyQDKXJ MKWnlvJN4I+0EvUHklEdDERv1wae+VuDj2gQqW8uBt3WwUEcVtfGX/CequmW+d2+mtkn Dfdw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jp24si11723792ejb.371.2020.12.22.23.11.07; Tue, 22 Dec 2020 23:11:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727468AbgLWHKY (ORCPT + 99 others); Wed, 23 Dec 2020 02:10:24 -0500 Received: from mx2.suse.de ([195.135.220.15]:41480 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727046AbgLWHKX (ORCPT ); Wed, 23 Dec 2020 02:10:23 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id E04D8ACC4; Wed, 23 Dec 2020 07:09:41 +0000 (UTC) Date: Wed, 23 Dec 2020 08:09:41 +0100 Message-ID: From: Takashi Iwai To: Sasha Levin Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Dylan Robinson , Keith Milner , alsa-devel@alsa-project.org Subject: Re: [PATCH AUTOSEL 5.4 057/130] ALSA: usb-audio: Check valid altsetting at parsing rates for UAC2/3 In-Reply-To: <20201223021813.2791612-57-sashal@kernel.org> References: <20201223021813.2791612-1-sashal@kernel.org> <20201223021813.2791612-57-sashal@kernel.org> 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.3 (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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 23 Dec 2020 03:17:00 +0100, Sasha Levin wrote: > > From: Takashi Iwai > > [ Upstream commit 93db51d06b32227319dae2ac289029ccf1b33181 ] > > The current driver code assumes blindly that all found sample rates for > the same endpoint from the UAC2 and UAC3 descriptors can be used no > matter which altsetting, but actually this was wrong: some devices > accept only limited sample rates in each altsetting. For determining > which altsetting supports which rate, we need to verify each sample rate > and check the validity via UAC2_AS_VAL_ALT_SETTINGS. This control > reports back the available altsettings as a bitmap. > > This patch implements the missing piece above, the verification and > reconstructs the sample rate tables based on the result. > > An open question is how to deal with the altsettings that ended up > with no valid sample rates after verification. At least, there is a > device that showed this problem although the sample rates did work in > the later usage (see bug link). For now, we accept such an altset as > is, assuming that it's a firmware bug. > > Reported-by: Dylan Robinson > Tested-by: Keith Milner > Tested-by: Dylan Robinson > BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1178203 > Link: https://lore.kernel.org/r/20201123085347.19667-4-tiwai@suse.de > Signed-off-by: Takashi Iwai > Signed-off-by: Sasha Levin Please drop this for 5.4 or older. At least this caused some problem on 5.3 kernel that confused USB core by some reason while it works fine with the recent upstream. thanks, Takashi