Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E226C47082 for ; Mon, 7 Jun 2021 07:24:35 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 629AE61185 for ; Mon, 7 Jun 2021 07:24:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 629AE61185 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 28DCA1671; Mon, 7 Jun 2021 09:23:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 28DCA1671 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1623050671; bh=XGNI7bBhwnBEHWR+INtluze9hrXar4HDOOqPTRYwwo8=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=u3C16FVOHwsUmqNPpoyaapZolq21NLQFowX1tEF/qEVNXr9GWIzovlcKTSwWXgW3C h/3GuFqukc4Ffh1GLSHNdgQ9CrUc+/X1rcuuNbIXEQXxCad7ZpfOUv5UazB925dGom 2oKEZdlF5xiu7qa5z6PuM5Jcp1dX8U5RcPCHX/qk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B1A24F8020D; Mon, 7 Jun 2021 09:23:40 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 04844F80212; Mon, 7 Jun 2021 09:23:39 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5FF5AF800AF for ; Mon, 7 Jun 2021 09:23:35 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5FF5AF800AF Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="XcxynWvL"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="zf7n9Pmc" Received: from relay2.suse.de (unknown [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 6F6621FDA5; Mon, 7 Jun 2021 07:23:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1623050615; 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=I3tqKwJw9j5mEEcQomZFxhw/ckcX77u6XH+FJHJ8fg8=; b=XcxynWvLYokZnok1NaRd89yjszdyGsO9ieK+f5Z0ElKOahA9+4gkim0+/58hayViSxnJEx PXZVXu/kmMfqfqNUh+iuAbHatAwfMEyJjJnA7arFb3e5ynA8M7gzRoXtoUAcoUo0EadzZe Zicl//uRxwrUU8+bSnbUgcKIdFyT4QU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1623050615; 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=I3tqKwJw9j5mEEcQomZFxhw/ckcX77u6XH+FJHJ8fg8=; b=zf7n9PmcXtRbohrXrzZ5qw5A8nPeFRH440IXKSPhGAHrD8PEmMUhBo5AJAjcTHDqbVDF/h gI9ZzQisW/eLduCQ== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id 5EA9DA3B92; Mon, 7 Jun 2021 07:23:34 +0000 (UTC) Date: Mon, 07 Jun 2021 09:23:34 +0200 Message-ID: From: Takashi Iwai To: "Geoffrey D. Bennett" Subject: Re: [PATCH 0/2] ALSA: usb-audio: scarlett2: Read all configuration at init time In-Reply-To: References: 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 Cc: Daniel Sales , alsa-devel@alsa-project.org, Vladimir Sadovnikov , Markus Schroetter , Alex Fellows X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Sun, 06 Jun 2021 16:16:44 +0200, Geoffrey D. Bennett wrote: > > These two patches add support for reading the mixer volumes and mux > configuration from the hardware when the driver is initialising. > > Previously the ALSA volume controls were initialised to zero and the > mux configuration set to a fixed default instead of being initialised > to match the hardware state. > > The ALSA controls for the Scarlett Gen 2 interfaces should now always > be in sync with the hardware. Thanks to Vladimir Sadovnikov for > figuring out how to do this. > > Takashi, if these pass your review, I believe that they are > appropriate for: > #Cc: stable@vger.kernel.org Well, in general, having a proper fixed value for the initial mixer value is the right thing, which is a part of the driver's role. Though, in snd-usb-audio, we don't set up the initial values just because of laziness; since the topology in USB audio is variable per device and often hard to parse correctly, it's difficult to determine the suitable initial values, hence we leave untouched. So, in that sense, setting the zero isn't wrong, rather safer, per se. However, Scarlett 2 seems to want to be different; it has already some initialization code to read the existing configs. So this change sounds more or less acceptable. But it's questionable whether it's really for stable as a "fix". In anyway, please fix the bug ktest bot spotted, the missing endian conversions and resubmit. thanks, Takashi