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 X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 2F9ABC47082 for ; Mon, 7 Jun 2021 15:13:44 +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 A932461185 for ; Mon, 7 Jun 2021 15:13:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A932461185 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 E8743166C; Mon, 7 Jun 2021 17:12:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E8743166C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1623078821; bh=mjW2TAfssW5Enzm0ONrV9vwWI/dQVdw6x/wAKNlUC+o=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=cO0yiJdQiYL6ttzLeQ7ED+oVn1Npu+vW45baD17F1/DEAQAb3479jqhn841ZVlnYQ njh1MS4+hLXeLePKIPrWa+RsQ439EaYjQSZC3f62lk+FQL1TdFoi9XMMvaKhjS5LVc qeJyObfYZ0wDe0A8WIn27OM0r5WRuNcER3EuZg6U= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 846CAF801EC; Mon, 7 Jun 2021 17:12:50 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C5316F80212; Mon, 7 Jun 2021 17:12:48 +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 D578CF800DF for ; Mon, 7 Jun 2021 17:12:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D578CF800DF Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="WqPw+/a5"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="EfiK1zq0" Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 9D7691FD30; Mon, 7 Jun 2021 15:12:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1623078760; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AhMCl9svDYnQQR+w7q3ztYzBa+7kP27nakdsofS4c9M=; b=WqPw+/a5sLQL7Rb1rqu1LNvUvCgVPzYPMp3Jd5ays8VmSuYA2Q/PAKwMzAMWvyDtAuWYN7 GbFNhMPTeJre2+OgeyoNoD6baYGiSCNmmm/gJJRr2b8CwBy8f+ZnG21ProrFb12xcD6uTM dU02wZdtN3Gnv6rSs095LaGTXk+GHDU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1623078760; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AhMCl9svDYnQQR+w7q3ztYzBa+7kP27nakdsofS4c9M=; b=EfiK1zq0BNjTFVaB0nSOWiLRMF21s8uJiYIlNi4OKoilI2OVqrXAfPPbAWG12ROZFr9oem V4GOG/DRcdsUt1CA== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id C1EE2A3B84; Mon, 7 Jun 2021 15:12:38 +0000 (UTC) Date: Mon, 07 Jun 2021 17:12:38 +0200 Message-ID: From: Takashi Iwai To: Vladimir Sadovnikov Subject: Re: [PATCH 0/2] ALSA: usb-audio: scarlett2: Read all configuration at init time In-Reply-To: <3c7a458a-a5cd-08e4-a462-293c5bf633ec@gmail.com> References: <3c7a458a-a5cd-08e4-a462-293c5bf633ec@gmail.com> 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=UTF-8 Content-Transfer-Encoding: 8bit Cc: Daniel Sales , alsa-devel@alsa-project.org, "Geoffrey D. Bennett" , 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 Mon, 07 Jun 2021 17:00:10 +0200, Vladimir Sadovnikov wrote: > > Hello! > > I would like to say some words from my side. > > The Scarlett device (especially 18i20) is pretty complicated device > and holds a lot of settings in it's internal > configuration area (hardware and software). > > So this is not the only patch which will configure the driver in proper way. > Since the device stores it's internal state (and that's good for power > safety and mobility), ideally, we should get > the almost fully compatible mixer settings with the original Focusrite > Control Software. > > The huge amount of job I've already done i my fork of Geoffrey's driver: > https://github.com/sadko4u/focusrite-scarlett-backports/blob/master/prod-drv/mixer_scarlett_gen2.c > > So we're planning to work on integrating our changes into the common > patch sets and will submit changes here. Sure, I don't mean against the patches, this looks like an acceptable approach. So don't worry, I'd take the patches once when the fixed version is submitted. However, from the system design POV, all those configurations should be a software issue, and ideally we shouldn't rely on the hardware preset state which has been done *somehow* -- it may allow malfunction easily. One thing I've learned over years is that you can never trust hardware :) Takashi > > Best, > Vladimir > > 07.06.2021 10:23, Takashi Iwai пишет: > > 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 > >