Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4452270imw; Tue, 19 Jul 2022 06:56:05 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sAgFEc9Fv8vziGOT9zh8TX9P8+nlxUhlQnqxKvkinhczfuLD/rwZuNQadM9PJoxYegzTfQ X-Received: by 2002:a05:6808:1b20:b0:33a:6c7a:d729 with SMTP id bx32-20020a0568081b2000b0033a6c7ad729mr6942404oib.299.1658238964935; Tue, 19 Jul 2022 06:56:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658238964; cv=none; d=google.com; s=arc-20160816; b=zVlxDbknj+oap+oQ2lv5lz6iQZWkhjUxwaCkba8LFH9YajTAOeP7PXncGSavSSlhSs Xgch7DYOA0R88WNisWksibvUoQAMW6xqCOYd5nCMst3gyhVFc/UnBcHVklboZBK0ekex pM/3la2azlUDU2ssfWIwuXwcMOEqLUVhFId2+I94j/qCPs28gsxXoKqMYxYAqYDOs1K3 GwggS19xCgYP92XQlieF/2KDLbnAmoaaAcFdKrfhwXazgazi8nHahm4Yex69+gbn8wd6 eYCf1QdvPQ/AbSou/oZe2yiG1CroRRmvqAbYlmClGFWF34Ql1zPTRb9CpCZvCnGLWZSS zUgQ== 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=jT4AwKwMSs6HWvNiR9q4i4ubZsSMOUT03IoPvwmptWI=; b=XW5f9crJxirR8YIW47//Zi3n4C1Sp5/wNz85CueIcn5eN21c4be3oO5BOpwtbOdDBK cd0GDjWosWEPvbBqgatarQxyORrgQdQ3bJo/ID5fTW6e0mQ+diNvXtKa6y9TTsXj99jL p8CRC0RICsSqGqY/ZF7nXZubCYPeXF0+FuQS0KD6cEW8tfPSwLpmGmenivF5Q+XO/M5o 2kkjfkMo0+zjxaZQ1llHWef6Z+aZIAcZK3rY4sONxQF4rkYS/PGa/O8MX6PaLYO1nbmr uAdyowqvuPv8yrTpe7wqk78dC2r48j7biDsQB01RCYBeFOa4Z/VU2nBlQAf/CV0eM0Rf alzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SYdPlMl3; 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 bj21-20020a056808199500b00339f16b29d6si7958019oib.146.2022.07.19.06.55.50; Tue, 19 Jul 2022 06:56:04 -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=SYdPlMl3; 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 S240173AbiGSNIv (ORCPT + 99 others); Tue, 19 Jul 2022 09:08:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243160AbiGSNId (ORCPT ); Tue, 19 Jul 2022 09:08:33 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AF1ABB8D8; Tue, 19 Jul 2022 05:28:01 -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 846F46090A; Tue, 19 Jul 2022 12:27:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F05DC341C6; Tue, 19 Jul 2022 12:27:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658233650; bh=dt8pDqk8iKTyANiXWzkfAhvww3xMsxUF+gbazu59Dis=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SYdPlMl3NM4aPqqM+nXWqZZzgnq1O9/ytPJzFt45I573QufAP0dVFZHOqLNufAkk9 z06gbpFzpLnA7bVTAoKIlhovlpvd5Sn5JCazKR3Zc6wwdfFNEqrbJZ5sTuTkk6ZA9p s9x8WYfXQcVgUXxl/Np22pKh9HJzZJ9rXms9iKww= 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 195/231] ASoC: wcd9335: Fix spurious event generation Date: Tue, 19 Jul 2022 13:54:40 +0200 Message-Id: <20220719114730.508351043@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: Mark Brown [ Upstream commit a7786cbae4b2732815da98efa39df96746b5bd0d ] The slimbus mux put operation unconditionally reports a change in value which means that spurious events are generated. Fix this by exiting early in that case. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20220603124609.4024666-1-broonie@kernel.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/wcd9335.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c index 12be043ee9a3..aa685980a97b 100644 --- a/sound/soc/codecs/wcd9335.c +++ b/sound/soc/codecs/wcd9335.c @@ -1287,6 +1287,9 @@ static int slim_rx_mux_put(struct snd_kcontrol *kc, struct snd_soc_dapm_update *update = NULL; u32 port_id = w->shift; + if (wcd->rx_port_value[port_id] == ucontrol->value.enumerated.item[0]) + return 0; + wcd->rx_port_value[port_id] = ucontrol->value.enumerated.item[0]; /* Remove channel from any list it's in before adding it to a new one */ -- 2.35.1