Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4480509imw; Tue, 19 Jul 2022 07:24:06 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sc8RS3TPYg+HYknpdRU+a4IG0HWwdFP+qf+ST6yuduqFoHdtTmVNfbnE9ZkzZiwz8EGMCT X-Received: by 2002:a05:6402:28c4:b0:43a:cdde:e047 with SMTP id ef4-20020a05640228c400b0043acddee047mr32078847edb.368.1658240646113; Tue, 19 Jul 2022 07:24:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658240646; cv=none; d=google.com; s=arc-20160816; b=YGlpsFizzjfQAdhOmOEwhSeRyhGGvBi7VKDfHaTYyg0BbbuttbaQQVsOIJZKuK+l8X 7SVF8hK0Cj3cJA2zmpUxRNYbDb2m/Yr5lTk0JNFkddkGvWiabmhaEfxsWYhDDWTe4iY5 3Zy/ziwdElK2HyxGbmR55N2sLU/DtDs2enldVkPlmGh6F/y9jdT3mGS1j73G7eo6ISRL aP6zotFvTYt3rglt3zlnZ+LIeGOfUSy/K8cBcFwcxY003Ij69bhOGaewOASryqzQpawq 2mJBfPm3Cfe+sjm5PWClgmjzBVCFTSWSwYJ/Pwls1tpZee7VD3Bx+JCk3CiuLLF3LRU/ B1Vg== 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=0nzo/gpa9MdDC2xXfYUXqhYRr3N0CjjpHrF8c26Xr8U=; b=Zew62skSbw3pr7qr/FIvAs8VntcilrYVe9KA7sRhDgnFoNYI+PwiyymP0v5CFGeZU9 b22h5pEcGXZ8VShWo5Y+hO61OdEMySpHVduH2eQ39/1Tq4Y2UCziMyba1ZPgg1cFkMx5 t8N0OB5jdX0M0g4DrePUtxQmIfUWDiE+JIDSb1VDuCrLuMw4TPc1HN0f6Pqm7FENMf9D Rw8lnRqkXBO1mOV3iGvuX/l4vXBfL65LYC325NL5oQxYfwQuJAt60AXlucg6IFpH+Y1p imcFSeIfKdzpm3Vx4dfBArFkRs4kR+GEHHfT4PYRMCK4ztEmlCNGMKP3JGhgunmW/zxj n67w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gUSgJkGT; 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 v1-20020a056402348100b0043a7b702586si21002550edc.418.2022.07.19.07.23.41; Tue, 19 Jul 2022 07:24:06 -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=gUSgJkGT; 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 S243165AbiGSNIe (ORCPT + 99 others); Tue, 19 Jul 2022 09:08:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243026AbiGSNII (ORCPT ); Tue, 19 Jul 2022 09:08:08 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B287021E19; Tue, 19 Jul 2022 05:27:47 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 234D8609FB; Tue, 19 Jul 2022 12:27:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 021BEC341C6; Tue, 19 Jul 2022 12:27:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658233665; bh=URhcXxTWUNtIzStOAzJURnj/9iuxRya7GBYaj5eiSz0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gUSgJkGTPuJGtAhRlF79frdMl37EObYn9U9TVh8lai4SG0VM3v8ewhnYzVCkmtX3+ mT7/35jtlOFo3jtfUb3aWcwhjzixYTOrSE7sGiNkHKweS/qqK64mphGz2qIvINFVMn gwoHUxkz6Dm3IVXRRS7KigJDVK0SSGd01oVc31/Q= 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.18 199/231] ASoC: wm5110: Fix DRE control Date: Tue, 19 Jul 2022 13:54:44 +0200 Message-Id: <20220719114730.787286403@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220719114714.247441733@linuxfoundation.org> References: <20220719114714.247441733@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 4973ba1ed779..4ab7a672f8de 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