Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4373393imw; Tue, 19 Jul 2022 05:34:08 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uaiAsmK3Z8Oejuwa+l4hFyT8mHB9BDIxQwrDwZJxmJy2SGNU9dP+M/ZVBl20Ho+Qq3aRNu X-Received: by 2002:a17:902:ea10:b0:16c:1b1f:cca with SMTP id s16-20020a170902ea1000b0016c1b1f0ccamr33179191plg.34.1658234048597; Tue, 19 Jul 2022 05:34:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658234048; cv=none; d=google.com; s=arc-20160816; b=TL/RJxs/JPG6nKlPTmpj4Xlfm5LQqxW7lOHm7ip+luHwApPg+Z5CiB1tlh5CJBH8+M pRiRzo/16VnlmxyFmNIqCJEaoEq8MWS1lx5U6kw0j2zFcyzBfAFTzjqGFPu683S4KtML yriamo0o9qrghiLzQ2nDCe8bfolC70M48bp3qMPhUfDEgY4zwDnqZsdC/Ga7ybzFTpGk iNvYqZG4lVDCuxXVi582xInXdSnlGAoFHO+y83a7jgfUNtSxnNhlj2srfz9bokCq38zZ uhwe4pVkIZzjj0+7GXZ+HA2bmg8qyKbiilcTgrtZU5A+iNG9M9YJwFEYKAuackYtzJJR 1l4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=NR+8vBkU4x/gbJgLT7wnlIcfy/XFnD/p40VJModgDxM=; b=dDCDe74v2PmaFOzpV1JkAvqmF+0l54BKmNbDGEqUWr/gvTzQGb4t7kTJvCP00js3qo ALcbRJvKH/qwKFNziht7o9tjONfjhKA7rDxunxiOG4Fv7sNAecKQn+M3lwQ9zwAkRxNT UAD4H7pphhSX5rFbatETwZCxjtI8y8fVaZKa93JOjKlO7plI/x6f8z4bq89FWL1VkY1a hMsOMc7b+gzw1IA8ynRbchoY9r39887jMMZfMX6okb/DsJPSxhr9yq0ZjrHb+qzXbgiZ rZ8Nie8lGTxIazm+eN3uGRQr9aMAqvr9Vt/NHK55XJ04Ngl+xrXitRrxArNjCFLbe2DA wPyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=r2pzJorI; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mi12-20020a17090b4b4c00b001ef86a75778si20738612pjb.151.2022.07.19.05.33.52; Tue, 19 Jul 2022 05:34:08 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=r2pzJorI; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240042AbiGSM1B (ORCPT + 99 others); Tue, 19 Jul 2022 08:27:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240339AbiGSMYw (ORCPT ); Tue, 19 Jul 2022 08:24:52 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEF594A837; Tue, 19 Jul 2022 05:09:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 693ACB81A8F; Tue, 19 Jul 2022 12:09:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9B49C341CA; Tue, 19 Jul 2022 12:08:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658232539; bh=SHNxE4xlnv1gGz834bAcXUBgymfEZ4EGdtH925eRxJs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r2pzJorIdxnJbWM90ZDfbvLt09vFYr16Vl3IPxGq07LEDj+JcpensSQTO8/atL/Gu ejBsYBa/Q0adWsjELW3MedRfxR0MtAaMPO/MfagVWk8NIUWGK5Wd8dVF1j5qQcxCa2 HyQQ0EED+DQlbFgq1PgkqPbESaPXTP8ZmuhnZn9g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Charles Keepax , Mark Brown , Sasha Levin Subject: [PATCH 5.10 091/112] ASoC: wm5110: Fix DRE control Date: Tue, 19 Jul 2022 13:54:24 +0200 Message-Id: <20220719114635.532489969@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220719114626.156073229@linuxfoundation.org> References: <20220719114626.156073229@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 From: Charles Keepax [ Upstream commit 0bc0ae9a5938d512fd5d44f11c9c04892dcf4961 ] The DRE controls on wm5110 should return a value of 1 if the DRE state is actually changed, update to fix this. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220621102041.1713504-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/wm5110.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c index 4238929b2375..d0cef982215d 100644 --- a/sound/soc/codecs/wm5110.c +++ b/sound/soc/codecs/wm5110.c @@ -413,6 +413,7 @@ static int wm5110_put_dre(struct snd_kcontrol *kcontrol, unsigned int rnew = (!!ucontrol->value.integer.value[1]) << mc->rshift; unsigned int lold, rold; unsigned int lena, rena; + bool change = false; int ret; snd_soc_dapm_mutex_lock(dapm); @@ -440,8 +441,8 @@ static int wm5110_put_dre(struct snd_kcontrol *kcontrol, goto err; } - ret = regmap_update_bits(arizona->regmap, ARIZONA_DRE_ENABLE, - mask, lnew | rnew); + ret = regmap_update_bits_check(arizona->regmap, ARIZONA_DRE_ENABLE, + mask, lnew | rnew, &change); if (ret) { dev_err(arizona->dev, "Failed to set DRE: %d\n", ret); goto err; @@ -454,6 +455,9 @@ static int wm5110_put_dre(struct snd_kcontrol *kcontrol, if (!rnew && rold) wm5110_clear_pga_volume(arizona, mc->rshift); + if (change) + ret = 1; + err: snd_soc_dapm_mutex_unlock(dapm); -- 2.35.1