Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4373640imw; Tue, 19 Jul 2022 05:34:28 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sM/SyDVpty/tvbUDXYt/kY03kwv/IBkjsdHHCHwFAtYIV0WmSvMoJuH4pcMjS2BU8tUNwu X-Received: by 2002:a05:6402:6c2:b0:43b:b89:3c31 with SMTP id n2-20020a05640206c200b0043b0b893c31mr43539524edy.239.1658234068475; Tue, 19 Jul 2022 05:34:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658234068; cv=none; d=google.com; s=arc-20160816; b=gs1aABPWxK/m+y1BwZ9rdQZipfwXqvhFVMvB906KVtV0v2h/PAMR2jdbT+NL5wtZ4v GBTLipO3Pxt5Kvq3JDLcYYEAvnVzPTurJXyCc+6+CrwAvHgxYWMuOpv/Pa0KHpLpAcCj VgECykhogMeXG+0BlhCQu28DX3eHVSCGdDhqr2xU5IiNkuz3Rv5yxh6EmiwWyQITre24 ZhbG925JinvR4J26dmYHrCnn84sFhpaTBQpMWCYXxAhxm+RPVh05FHp2AXrh1nzuF9bV 3c739sZU875ohgRDgXIbezNClsPd84GujnvjHlyrBqBWLt/oFOFiXzhWwAypWVlz2LLB N4+g== 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=zBG03MAdtLzV9fs2lKjY3C1MR7Ic50w6UhG8GgJrzhI=; b=Lx/lp2bAdZdHnCxZVFo3+M9QUlnTqBlmCt3iw+iMMF0NRI7xjmyLt2e4Uk8sWdDbw2 Yc57jftTJkqQKevAJ4Mt6bCOmfldh4m2fs45N+1VNmv5EdziL1rLNitqNO74PT+oNTzp 8zn38qpP74TI9q6tR57ByXMmXS57g2zLU6nVFhxne3RolMGr5Q6o0U2Xm2rVOlTRDBEl +E0HIrWsCcd+sRhd+fylSfuPnm78yQHfN7GckJdCMe710AOwWVmwrcUxfiAXiisi/xBI lHXae0sCSqN8sGrcsRTpL6leluovGWuvKbINlmcmod7lFtYnzxU12r016cxef8elhUQk TKkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SrlZBo0h; 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 w18-20020aa7cb52000000b0043669e9f43csi18626179edt.526.2022.07.19.05.34.02; Tue, 19 Jul 2022 05:34:28 -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=SrlZBo0h; 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 S239568AbiGSM0a (ORCPT + 99 others); Tue, 19 Jul 2022 08:26:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240240AbiGSMYr (ORCPT ); Tue, 19 Jul 2022 08:24:47 -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 07FE34A819; Tue, 19 Jul 2022 05:09:34 -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 60CBD61632; Tue, 19 Jul 2022 12:09:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2274C385A9; Tue, 19 Jul 2022 12:09:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658232563; bh=LTiHrq0h5LtFHCuEgsogHVuSPBYt7hnhL+zVi3RRRX4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SrlZBo0hZjVYlfxGL3bT08ShzjDP4U9QaDLwpI40gTqNVtAX7/imoipvINeoZicdV IBL00XHPgT/CDTuwvE8AOf5gclA1A7T6SS9FG4kXctuClUgG3GuCLc/psGMjcPju7i +4hwyfjfuujbzMTv5wZ+/000Wy3F9iRQx5HIghYU= 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 093/112] ASoC: cs47l15: Fix event generation for low power mux control Date: Tue, 19 Jul 2022 13:54:26 +0200 Message-Id: <20220719114635.767846276@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 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 254f9d96e766..7c20642f160a 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