Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2944170iog; Mon, 20 Jun 2022 08:01:02 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t1AF9Lg5D/l8+Df0aBrjkl6fB0sfABD2UQpRAaPLdjK11a24Hib1DT05ETNn5xZLqkYjaW X-Received: by 2002:a17:90b:1a86:b0:1e8:2b80:5e07 with SMTP id ng6-20020a17090b1a8600b001e82b805e07mr27446982pjb.31.1655737262558; Mon, 20 Jun 2022 08:01:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655737262; cv=none; d=google.com; s=arc-20160816; b=E3EZGHyvaZ9L8hujRSkjGQA77JCBEVYAcY7tYrwp+Q8mZTdL0BFqEHxDljoJG938lW xgF2c2Uy6GfeI5Z2gUJw/S56JUosOP2OfWeg8w5yYKaspNd2E9wyFeZ422liRGcqzH7t 2amJPgzS+fIVPKHfa/k+06NsCZVfIYs+m9zew6Edw3RPVmd5NanFAbb8rB9emdh7xMFr hhCc+GUfapavCR6SCu+DMwP4bPxzQtbT19KmKd42cGwPworRaojhoMYyAf0Dw/MqPkx/ wnXQnr4ACtcJBplFZwuNgiRe6njHbed38Hkwlk8z/Z9sNd2jbyMTuaSQj+N7w04Ra755 ciEg== 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=7CbJNOBRg4WMPY2MW0Tbq1ObEP0w2hPbKOAJAYsxE6k=; b=cbxBTZwLFF9fmXmVqURTgXqz7gYYWzYahNZt1aope2tdlIqnKX7bJ5aeK9Yjj8mlM2 ugi8LAmV20b6kY1no70zADuh4A/nKSDvc7GY6a7n4D7h5w8zuQj3vHmkE6pcST8atIyG XGdIRYrR3MStomJ2bBHfNa8vtqzTehM0E2jV+YH9DINhzFsalL3kET8ZhiCxe+P3TlMa Ugyc+LpiIwA63TNe4t3LpyR8pBK0u1MVNG7sxE21C2S4qdX0Cd0Q/o+D5vUscaPitndQ ohBQkOYXQLX3LyZsh9TYpLAxmYMMUPQeak1I7G0Ap0VQL9x3YxHnAwnvfM7das1LXwvf Qz7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Q6nXQ5ny; 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 c63-20020a621c42000000b0051bb1890459si6027777pfc.28.2022.06.20.08.00.49; Mon, 20 Jun 2022 08:01:02 -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=Q6nXQ5ny; 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 S243109AbiFTMyV (ORCPT + 99 others); Mon, 20 Jun 2022 08:54:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242983AbiFTMx7 (ORCPT ); Mon, 20 Jun 2022 08:53:59 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9893317053; Mon, 20 Jun 2022 05:53:50 -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 512EBB811AB; Mon, 20 Jun 2022 12:53:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 73CE5C3411B; Mon, 20 Jun 2022 12:53:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655729627; bh=tzW7zB6n+0Qkd9R+/zK1+fs/LETpXudDWxsaCRdi3+k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q6nXQ5nyOitwmIj62GsCRxwWHFT395+gHGvjUnhjhehS941cGTAM2m54idma0hN1j ochIxNyoqaMGJUiMeEIlUMhO1lfUbeeb0dF67cx1/+4XR39fGFcKlYSvdXnTEdH8Fj hsKGRcjaWanjDr4GfLTGyLCXeB2Kk9zWg8JQmbf8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mark Brown , Sasha Levin Subject: [PATCH 5.18 023/141] ASoC: es8328: Fix event generation for deemphasis control Date: Mon, 20 Jun 2022 14:49:21 +0200 Message-Id: <20220620124730.210344113@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220620124729.509745706@linuxfoundation.org> References: <20220620124729.509745706@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.7 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,T_SCC_BODY_TEXT_LINE 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: Mark Brown [ Upstream commit 8259610c2ec01c5cbfb61882ae176aabacac9c19 ] Currently the put() method for the deemphasis control returns 0 when a new value is written to the control even if the value changed, meaning events are not generated. Fix this, skip the work of updating the value when it is unchanged and then return 1 after having done so. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220603123937.4013603-1-broonie@kernel.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/es8328.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/es8328.c b/sound/soc/codecs/es8328.c index 3f00ead97006..dd53dfd87b04 100644 --- a/sound/soc/codecs/es8328.c +++ b/sound/soc/codecs/es8328.c @@ -161,13 +161,16 @@ static int es8328_put_deemph(struct snd_kcontrol *kcontrol, if (deemph > 1) return -EINVAL; + if (es8328->deemph == deemph) + return 0; + ret = es8328_set_deemph(component); if (ret < 0) return ret; es8328->deemph = deemph; - return 0; + return 1; } -- 2.35.1