Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp978169rwb; Wed, 14 Dec 2022 05:16:43 -0800 (PST) X-Google-Smtp-Source: AA0mqf7Sm78ews32myyGKhjeP+z3AgBRjvO9GyFJBtffQLDSPTeVmKAoGu8qpKqgjp9VUmnBN1Ha X-Received: by 2002:a05:6a20:d90a:b0:a3:587b:56ac with SMTP id jd10-20020a056a20d90a00b000a3587b56acmr29624708pzb.52.1671023803646; Wed, 14 Dec 2022 05:16:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671023803; cv=none; d=google.com; s=arc-20160816; b=VYKfm9JM92dteAikKiu+tjJzc1aytkkZk9oqor9gEeGCgkmteKWbdyqrDj09tkArOk ZrSULROme2dNazf1v2wJ53tspxfb2L6g0jG8M9uhGZ9EbSKJEjVYOa488ps+/3CHtYy/ UD0O2aGzr3r908CNQkc8Iz+xWKdzFlaDB35Aw1dRl8r6R7iFmMCnDSE0b7sUDBIFSfwT 6gUnjBkHqGOiwDbjOsevX0bgNKfYjosWvlWRJo+hKJ14toFFmJ0oML2kNEF9ERvQfpvD mj1zccoY+Ss+dYSDlIm+ldqEylfco1JuwKy84uxhJM4FRYHzlmFm6ZfTOidPSFSDQnBw Fhsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=UyzhN43ccI1JWqdgjhhFSuz2hJR6kaTdH3csHQRjZNU=; b=Exrt4Pkfw553+If6w1zRJz61UaVBnZJ1mYzTt78YdS4NHWBdGE5CWLjcBUFM15P9/v QlV2w9W21IYZyuCc2dyxp+ubgw2aZgwEESmJ5/bvNAAp5XWHpdZYhJ8mloT6TxHCf1O2 q1YIyXgqcDGXVDhSHhozh/h4Vx69MLJY7BA8txhOKgw3e47cgTp6599gtVsjU2RWizY6 og1Uyn7MNXvafV75Et8rQNY8mtqCJa6E1w3K/PmLT88i1h92SyVQHOa/AAnrm8WeAv+S V+61u8YO849jxHYUyD9eQ6SAJOT4VQkjjSsJWC6j26Hh2w4q7CrMFdMBZwKW2heeIHNj FkYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=VkfOpCFd; 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=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oo8-20020a17090b1c8800b0021a205825besi2058148pjb.83.2022.12.14.05.16.34; Wed, 14 Dec 2022 05:16:43 -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=@cirrus.com header.s=PODMain02222019 header.b=VkfOpCFd; 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=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238534AbiLNNK1 (ORCPT + 70 others); Wed, 14 Dec 2022 08:10:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238529AbiLNNKW (ORCPT ); Wed, 14 Dec 2022 08:10:22 -0500 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43761DEBD for ; Wed, 14 Dec 2022 05:10:20 -0800 (PST) Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2BEAosGN030155; Wed, 14 Dec 2022 07:09:15 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=PODMain02222019; bh=UyzhN43ccI1JWqdgjhhFSuz2hJR6kaTdH3csHQRjZNU=; b=VkfOpCFdzjvKij6H3afTftDJEW+hPOLjxbrehvbAcYv2vDUgwz57XSlKcWjzAxwFDjMD tDhza+UblELd9qwAHvHkm1+f6rpegq7YWglN9MjQsuUB3JdBjf5Mp21Z3W5nIATiF2ub YNoKps06aK8d0UfjG0CIEPlguLjenbYfP8XMtb/zfKcaI9hZSYrWwxFZfyICd5pwYNVM dR/R+zz9u31ovyqwR2Af7NkOqtWyGo4dbmYAWxfu2IxTGeZXA+NlOWl4mKy+3vhbouki GNk8ty8JJwZlQ5Ae47JcMcfAo2c1vieO/mQvDRWR6ZWRT9xOZvCRZZQuzGO2hPVNJR2o Cg== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3mf6rh8dge-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 14 Dec 2022 07:09:14 -0600 Received: from ediex01.ad.cirrus.com (198.61.84.80) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.20; Wed, 14 Dec 2022 07:09:13 -0600 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.2.1118.20 via Frontend Transport; Wed, 14 Dec 2022 07:09:13 -0600 Received: from ediswmail.ad.cirrus.com (ediswmail.ad.cirrus.com [198.61.86.93]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id F29E011CB; Wed, 14 Dec 2022 13:09:12 +0000 (UTC) Date: Wed, 14 Dec 2022 13:09:12 +0000 From: Charles Keepax To: Lukasz Majewski CC: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Stephen Kitt , , , Subject: Re: [PATCH 3/4] ASoC: wm8940: Mute also the speaker output Message-ID: <20221214130912.GN105268@ediswmail.ad.cirrus.com> References: <20221214123743.3713843-1-lukma@denx.de> <20221214123743.3713843-4-lukma@denx.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20221214123743.3713843-4-lukma@denx.de> User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-ORIG-GUID: fS8F40HtUhvDkvdpvoBXyFUigz4aIK20 X-Proofpoint-GUID: fS8F40HtUhvDkvdpvoBXyFUigz4aIK20 X-Proofpoint-Spam-Reason: safe X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,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 Wed, Dec 14, 2022 at 01:37:42PM +0100, Lukasz Majewski wrote: > Without this change the BTL speaker produces some > "distortion" noise when test program > (speaker-test -t waw) is ended with ctrl+c. > > As our design uses speaker outputs to drive BTL speaker, > it was necessary to also mute the speaker via the codec > internal WM8940_SPKVOL register with setting > WM8940_SPKMUTE bit. > > Signed-off-by: Lukasz Majewski > --- > + spkvol_reg &= ~WM8940_SPKMUTE; > + if (mute) { > mute_reg |= 0x40; > + spkvol_reg |= WM8940_SPKMUTE; > + } > + > + ret = snd_soc_component_write(component, WM8940_SPKVOL, spkvol_reg); > + if (ret) > + return ret; This bit is also controlled by the "Speaker Playback Switch" so you probably need some locking between them to stop them clobbering each other. Thanks, Charles