From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0F791CCA47B for ; Tue, 14 Jun 2022 02:12:00 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 45B7518AA; Tue, 14 Jun 2022 04:11:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 45B7518AA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1655172718; bh=68NMvNghBcXdGZX4yoLNezSki2KhcCcVBbWjRDWG2tc=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=jIXKMfO/CLonhGq/MElqGLHenF6WuB8r4/r8bZTp1SfCl7ngCWGaKDrdbPus+8blV 1RBcXp9LFUua+X5Ikfq3a/5VEKKajpGmsR/dNWcFiEw/6+g0bHKbnM+hZAGQU11YRR jhJzhrm1rYrlc6AgJKZlYsXFdp8LMpyusGtbjsEc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E13C9F805D5; Tue, 14 Jun 2022 04:06:35 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C24EFF805D6; Tue, 14 Jun 2022 04:06:34 +0200 (CEST) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 37817F8051E for ; Tue, 14 Jun 2022 04:06:32 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 37817F8051E Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dmW/epbr" 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 C2DE2B8169D; Tue, 14 Jun 2022 02:06:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 719C9C3411B; Tue, 14 Jun 2022 02:06:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655172390; bh=68NMvNghBcXdGZX4yoLNezSki2KhcCcVBbWjRDWG2tc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dmW/epbrzV9J7sRJrobSHTkSQ+yZiQPUQpeli9lVpdz9rWk0feOOiEf9E3DSIMPCN zl4dbTxnoERALRXa4cMoP8A342Kjo2CBmUJ7bpx0o2FFQAr6N92zCAKqZDnIcBIZ3p h5cy8th2QVSw5k7Bmlqe7Y2EnVeaeAPLZTvbpix5rHNBbK0ys89+QNsaYVMLCANzUd 1Vc5W2iY/H22dn+uEid1kd+B39npHioGqtGiVJWjZsK4tJojwx4+kH+xdJemE3BVOP XAiXLZ45w/Ec8EIz3SObsS6oQrQeFYE7GOfRZoJavCIvXvKTrIN069GHhrQZym/BXi YIjDpITRf62Lg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH AUTOSEL 5.17 18/43] ASoC: wm_adsp: Fix event generation for wm_adsp_fw_put() Date: Mon, 13 Jun 2022 22:05:37 -0400 Message-Id: <20220614020602.1098943-18-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220614020602.1098943-1-sashal@kernel.org> References: <20220614020602.1098943-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Cc: Sasha Levin , alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com, tiwai@suse.com, lgirdwood@gmail.com, Richard Fitzgerald , Mark Brown X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Mark Brown [ Upstream commit 2abdf9f80019e8244d3806ed0e1c9f725e50b452 ] Currently wm_adsp_fw_put() returns 0 rather than 1 when updating the value of the control, meaning that no event is generated to userspace. Fix this by setting the default return value to 1, the code already exits early with a return value of 0 if the value is unchanged. Signed-off-by: Mark Brown Reviewed-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20220603115003.3865834-1-broonie@kernel.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/wm_adsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index 0582585236a2..93677b9f3a68 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -328,7 +328,7 @@ int wm_adsp_fw_put(struct snd_kcontrol *kcontrol, struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; struct wm_adsp *dsp = snd_soc_component_get_drvdata(component); - int ret = 0; + int ret = 1; if (ucontrol->value.enumerated.item[0] == dsp[e->shift_l].fw) return 0; -- 2.35.1