Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4449107imw; Tue, 19 Jul 2022 06:52:08 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uRBZGE3ppkKYHzsQR9ZdFCRemJNyzoEVMekU5snenul+U+CjcyP/ZooYKphOwej7duGfV6 X-Received: by 2002:a17:907:168f:b0:72b:5571:2228 with SMTP id hc15-20020a170907168f00b0072b55712228mr30810227ejc.397.1658238727933; Tue, 19 Jul 2022 06:52:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658238727; cv=none; d=google.com; s=arc-20160816; b=OC0x1TkJ+pYdlrlIDZqwmZxZuBoRCpOyL8oO47mKUcgTvjfYo0v41iK5tkrFqoxffd omZqdm3D5crdEER6CwAKpgwWmuvy4C5VVenAZHkFJ4bLIzRtXBIzh79nEuWV5ijuN+6X STseEA9XZmmAKYNaJ7ZcV7Z5p5Qb97SFjO9EhPgle3NRMyz7Fb/y70H1eaJaoM3Xw5EW m+4mIwG3Lujmtno5Wsbevv7HWWX9AgevDajw7PTV5ReVCaB/yql5jPwer9mP9ENuANg4 K7FXsjzuA7SRg7zfbyaYHJ6RjYTrGtfGQiC1SaObTs7gAmpQY898ZTBEu0JUEZcg2qse 7xgQ== 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=sHD6qhKcLaME56TDNlB+XN+UZuP2RxpQ8c/NMU7Y7Po=; b=mHJwTLwrS8VDKYkR6IrXR/P6kn6I754xmBmfwZ/tichCyY7Ub0+q2nnK5loSg/EXrs CiyoLIDB9HPr7LvrTvinMacwfictmFTwwFB0pAvPQCslWeLa9vKR3Y2cnsKuGOK2WvM9 yJwkQwRU6kO1/Dw8ujUdcSnateNSQKwEEJpqVwmwbFH7ga9C4zfnJW2nLJACyGKh8er7 LgyBn8mtmKdmz3F9YPP8YRb5BTsBuoVMLNRlPGDiUY20tM0DAq/HlXQUAHckxWon8j2K A2o1ec2nmpcUSiY739nMeNE0Z6sFMUHq+vABmDPo0bUjFtiUdL0q4+6hAUrvw6+1fiac YUqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="nl/sOQr4"; 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 f14-20020a056402328e00b0043a3a5d641fsi1055942eda.525.2022.07.19.06.51.43; Tue, 19 Jul 2022 06:52:07 -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="nl/sOQr4"; 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 S238676AbiGSMrs (ORCPT + 99 others); Tue, 19 Jul 2022 08:47:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241707AbiGSMqo (ORCPT ); Tue, 19 Jul 2022 08:46:44 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C2BC8BA9F; Tue, 19 Jul 2022 05:18:30 -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 AE19961839; Tue, 19 Jul 2022 12:18:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 77F73C341C6; Tue, 19 Jul 2022 12:18:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658233090; bh=gb/czhMg4fVob1ttITgWIuTsBA07eCazqwFw3vqBK4Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nl/sOQr4UMfllrwmWkTpvpKOBjYTxPK4DYw/iaj8BNuM49KqhkshwtxtU5HLPuPtj Tnlr0ULgIKo5bBwNcY3p8W/2u8nclTZwWYEP+jCLe0doV9o9D08MaaBl1waIAmo9qh hFvQYz/ZPQjSLrAo8UAPXT5jjoB5t0DxamPvcxg8= 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.15 145/167] ASoC: cs47l15: Fix event generation for low power mux control Date: Tue, 19 Jul 2022 13:54:37 +0200 Message-Id: <20220719114710.508413989@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220719114656.750574879@linuxfoundation.org> References: <20220719114656.750574879@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 7f103af4a10f375b9b346b4d0b730f6a66b8c451 ] cs47l15_in1_adc_put always returns zero regardless of if the control value was updated. This results in missing notifications to user-space of the control change. Update the handling to return 1 when the value is changed. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20220623105120.1981154-3-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/cs47l15.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/cs47l15.c b/sound/soc/codecs/cs47l15.c index 1ee83160b83f..ac9ccdea15b5 100644 --- a/sound/soc/codecs/cs47l15.c +++ b/sound/soc/codecs/cs47l15.c @@ -122,6 +122,9 @@ static int cs47l15_in1_adc_put(struct snd_kcontrol *kcontrol, snd_soc_kcontrol_component(kcontrol); struct cs47l15 *cs47l15 = snd_soc_component_get_drvdata(component); + if (!!ucontrol->value.integer.value[0] == cs47l15->in1_lp_mode) + return 0; + switch (ucontrol->value.integer.value[0]) { case 0: /* Set IN1 to normal mode */ @@ -150,7 +153,7 @@ static int cs47l15_in1_adc_put(struct snd_kcontrol *kcontrol, break; } - return 0; + return 1; } static const struct snd_kcontrol_new cs47l15_snd_controls[] = { -- 2.35.1