Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp960079iob; Fri, 13 May 2022 17:46:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIQW+cRp0PXZc6Fu9JOpDTeYSv4xWfrAm2lA24ZC3ry+bfQ4E9t9V1BUdyVvJsscrpi/x6 X-Received: by 2002:a5d:4dcc:0:b0:20a:ddaa:1c30 with SMTP id f12-20020a5d4dcc000000b0020addaa1c30mr5596860wru.419.1652489216258; Fri, 13 May 2022 17:46:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652489216; cv=none; d=google.com; s=arc-20160816; b=c+JPQglD3MHCsBYFD1gckj8YOaNZgRLTrfLsk3jTuHLmeMdbJRnrtuykvBHOM4LKCK V6UQ1FthZYFSKYi/KX4gd+H99iqe4XCWwkv3eEQsqVL329hz23DQ0ROxZOMJjor4j4jW xP2jCoRiaVMRkcwfTQZHXaAllLW+0HZutIGiPISmMAt9+CmNDf0zNGmlgcdYvwUr3C0P Yv3fMv0Igxrw/3RAlpCUD6wyDKuxiB8uZSog58Gj9s+sAmIxRXahcS1ATKhrAbHUMwqT gRB8h5Md/5xIRvFYIw+eFIm+s6RXgir2qPsFIFriudKrhTv8W9JfBOF7cGXBjnyqrn3P 2t6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=mUztazuSyDgxN4IJuGsokHY/xl1xmIQV403RgKJ0d1A=; b=tLoGfetvqvRT+Rz8P6zTnxeYyyXMQ11H6cOjOiJQ3IIoDmvcNmcdFqCq82w3CniP2t A8FG7meqA8HYAXnywDREpGX9+/0Od/MZZP57F8E1QlemYTtS7YHJQkcrKxw8tPQoaiYA pMLVnVIDBBPSeD9/aTd4ZyU5U2F98NC6f1mx8RJ4833wSRhLZ6Zl6prh/2Wb6o00foVy ruENSLHgAXW2nIGgHJEa4jNbgfTt75XrCNpp5vzxAJgnD+igySYVa+2Pd1BMSdmxgwrC usAlDHjpqaZk24tPB8byevufFIBmh2L8mZPbiRy4Cl8HjA91YGLoLAlPmMJao4TVo6v9 tNYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=exBhr0fe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id h5-20020a05600c414500b00391983fce87si3516283wmm.68.2022.05.13.17.46.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 17:46:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=exBhr0fe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 52559331CD7; Fri, 13 May 2022 16:25:54 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344165AbiELKqw (ORCPT + 99 others); Thu, 12 May 2022 06:46:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352790AbiELKqt (ORCPT ); Thu, 12 May 2022 06:46:49 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03A2A6CA87 for ; Thu, 12 May 2022 03:46:47 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id gh6so9462775ejb.0 for ; Thu, 12 May 2022 03:46:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=mUztazuSyDgxN4IJuGsokHY/xl1xmIQV403RgKJ0d1A=; b=exBhr0feoHxv67tzko0LaAbgsRFgF+WeYOI16AQIEIEA+ahzVeV229CoWiQggBp59T HEQyurCaR6bbN3aFuckPLTxXF4rXreefHMr4uH8ds8t+qctxW1Mtui6o3phQUsXB74j3 q4Oc66AA9bzAfEhIFg1tjII/FI/mqUvxxmDeM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=mUztazuSyDgxN4IJuGsokHY/xl1xmIQV403RgKJ0d1A=; b=0R8mkCC/kha3y8B2L/bThI+FCvxSV1u8JFBF73Y05MO6jw10rbR57yJw3KHrohcIZk itnnbORV4/wpsqEdA+bnVBbFcWEpx+xhzRM2tFrwxMmO0bzfXw12LxxpfxBbpuGeQ2xe EQe3GExLVW9TnXnQBBsN5bdNPfIlYyRXp8NQYdwzf2yCWU6oS/1A65GJ/VA7WitkmArA tGr23SEsua4O5AU1Wf6+H1bBKyiD2rXwrrdHF206BVf3Ka86ouf4r9B4GrzQ9EvGJAWA gOyuoQ+oik6zk9CA6OWshiFFzNOKrFkxtKLqL0PoTG76YqZWN/34t2aOu/Bv8RSESwc8 JJmw== X-Gm-Message-State: AOAM533+I4vTqSv+/tii+6onT8rGJoAqzdY8fk+vRym3+4/1zJ3h2tt6 tgz+vrkIxxw/tuW3rQECjs8+2Q== X-Received: by 2002:a17:906:58d4:b0:6f4:cebd:c4b with SMTP id e20-20020a17090658d400b006f4cebd0c4bmr28988010ejs.492.1652352405476; Thu, 12 May 2022 03:46:45 -0700 (PDT) Received: from tom-ThinkPad-T14s-Gen-2i (net-188-217-59-245.cust.vodafonedsl.it. [188.217.59.245]) by smtp.gmail.com with ESMTPSA id sa3-20020a170906eda300b006f3ef214ddasm1961028ejb.64.2022.05.12.03.46.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 May 2022 03:46:45 -0700 (PDT) Date: Thu, 12 May 2022 12:46:42 +0200 From: Tommaso Merciai To: Mark Brown Cc: linux-amarula@amarulasolutions.com, linuxfancy@googlegroups.com, Liam Girdwood , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ASoC: max98088: add support for reg_4a_cfg_bypass reg Message-ID: <20220512104642.GD649073@tom-ThinkPad-T14s-Gen-2i> References: <20220512074359.446999-1-tommaso.merciai@amarulasolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Thu, May 12, 2022 at 11:12:02AM +0100, Mark Brown wrote: > On Thu, May 12, 2022 at 09:43:58AM +0200, Tommaso Merciai wrote: > > > Add mixer controls support for M98088_REG_4A_CFG_BYPASS register > > > +++ b/sound/soc/codecs/max98088.c > > @@ -486,6 +486,11 @@ static const struct snd_kcontrol_new max98088_snd_controls[] = { > > SOC_SINGLE("EQ1 Switch", M98088_REG_49_CFG_LEVEL, 0, 1, 0), > > SOC_SINGLE("EQ2 Switch", M98088_REG_49_CFG_LEVEL, 1, 1, 0), > > > > + SOC_SINGLE("SPK Bypass Switch", M98088_REG_4A_CFG_BYPASS, 0, 1, 0), > > + SOC_SINGLE("REC Bypass Switch", M98088_REG_4A_CFG_BYPASS, 1, 1, 0), > > + SOC_SINGLE("MIC2 Bypass Switch", M98088_REG_4A_CFG_BYPASS, 4, 1, 0), > > + SOC_SINGLE("INA Bypass Switch", M98088_REG_4A_CFG_BYPASS, 7, 1, 0), > > These look like they should be DAPM controls since they're controlling > audio routing but they're being added as regular controls. Hi Mark, Sorry again. You suggest to create a new structure for these entries, for example: /* Out Bypass mixer switch */ static const struct snd_kcontrol_new max98088_out_bypass_mixer_controls[] = { SOC_DAPM_SINGLE("INA Switch", M98088_REG_4A_CFG_BYPASS, 7, 1, 0), SOC_DAPM_SINGLE("MIC2 Switch", M98088_REG_4A_CFG_BYPASS, 4, 1, 0), SOC_DAPM_SINGLE("REC Switch", M98088_REG_4A_CFG_BYPASS, 1, 1, 0), SOC_DAPM_SINGLE("SPK Switch", M98088_REG_4A_CFG_BYPASS, 0, 1, 0), }; Let me know. Thanks in advance. Tommaso -- Tommaso Merciai Embedded Linux Engineer tommaso.merciai@amarulasolutions.com __________________________________ Amarula Solutions SRL Via Le Canevare 30, 31100 Treviso, Veneto, IT T. +39 042 243 5310 info@amarulasolutions.com www.amarulasolutions.com