From patchwork Fri Feb 24 14:03:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13151297 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 3DF63C678DB for ; Fri, 24 Feb 2023 14:09:36 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 469E283A; Fri, 24 Feb 2023 15:08:41 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 469E283A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1677247771; bh=Oq2cgGTNFolGMp2hlVeWgvvLAmgRBdfsEVQSk6MsZsY=; h=From:Date:Subject:References:In-Reply-To:To:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=HNHMDQdsGTDbCoqSAIEWPe0yfuUmSAB45jPc+ChqWeslvFwVuuNFEq5BlFjzN7srw 3aG2HtN22bQiRhfUR+jz6VqqYTXfcWlaxqBxg/UMXiUBEssRLBriFoV9qoLGCzsX2A DIwDLdyb9XcJ42QYezhkGEA0xk4YTc/4ctpiIyL0= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 41F1FF80542; Fri, 24 Feb 2023 15:07:56 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 08756F80527; Fri, 24 Feb 2023 15:07:51 +0100 (CET) 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 8AB6CF80125 for ; Fri, 24 Feb 2023 15:07:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8AB6CF80125 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=uKKPbBrV 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 B42F2B81BEE; Fri, 24 Feb 2023 14:07:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4736AC433D2; Fri, 24 Feb 2023 14:07:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1677247662; bh=Oq2cgGTNFolGMp2hlVeWgvvLAmgRBdfsEVQSk6MsZsY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=uKKPbBrVYPXVtVtVuluQ0hZNDzeo41eFFiaJBZlmJc0FJjaH5Mrk83kF1sYILsIbw 1n03r2XCb1ES0nFnDrMH7Lv0rlDun+8sy9T3o+oJnFzJXNl36xzzZwjp1NWWV42+Gn TTxeMwvLe23VtiqM2ydtEazfr3UbzOB4qYLxYUxo5S9nDBEUHtEiY259LNGL4Pixnf BRJ9aUj4dKoGSGZzt5s1qHoavhf15xRRGNKbH1Np+Jo45pMHXFNsEqiSUQs/HQ9GZG bwyCevc5py6Ezl7afx4i97+D6NZ4nZAkouQM5rvGSFNFQv9lcoFw5rTfnr7WWJIb8J AoEF5mr50w6hA== From: Mark Brown Date: Fri, 24 Feb 2023 14:03:57 +0000 Subject: [PATCH 3/4] ASoC: mt8192: Report an error if when an invalid sidetone gain is written MIME-Version: 1.0 Message-Id: <20230223-asoc-mt8192-quick-fixes-v1-3-9a85f90368e1@kernel.org> References: <20230223-asoc-mt8192-quick-fixes-v1-0-9a85f90368e1@kernel.org> In-Reply-To: <20230223-asoc-mt8192-quick-fixes-v1-0-9a85f90368e1@kernel.org> To: Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Matthias Brugger , AngeloGioacchino Del Regno X-Mailer: b4 0.12.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=729; i=broonie@kernel.org; h=from:subject:message-id; bh=Oq2cgGTNFolGMp2hlVeWgvvLAmgRBdfsEVQSk6MsZsY=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBj+MSiKI/9K+DYjuaCW6GBP9SMdFxb8sNVK2hWQSGR k0Ewe1eJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCY/jEogAKCRAk1otyXVSH0KVdB/ sHYybcK4VnCEic3yC/2mq3YLv2JzZZtTdDOrDDzw1GALc/ous7F1BMbn4ZjyfaFgQrkmagi+4gmNmA burLXblBiKahWsvJsLmUjtZx7SMrkZgvon5LWoX7U4aFw6NewfZdKnyaGE8dn/0yO5wmoV16UmlI7Y jWlfvomJnD5oombhkBTGCqZmH3Gbgf2ILKZ918qUxPlzYnj/EWMaoqoEryj4usxbo7nHRxacdcjpDh 3fWFVmC7mUQ/RI4hVKSRaYmIaA1Gyah+ink0ob8Yosc4fIKT9YV6WJxGghrYft6TeGK55u/1PKvbYa SgOkeN91Mr5CQ1HwDbxsR3G32zJLGq X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Message-ID-Hash: IKNJ2BUGFZUOBHYGLFF5UDXCGMBGPMPD X-Message-ID-Hash: IKNJ2BUGFZUOBHYGLFF5UDXCGMBGPMPD X-MailFrom: broonie@kernel.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Mark Brown X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Reporting an error on invalid values is optional but helpful to userspace so do so. Signed-off-by: Mark Brown Reviewed-by: NĂ­colas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno --- sound/soc/mediatek/mt8192/mt8192-dai-adda.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/mediatek/mt8192/mt8192-dai-adda.c b/sound/soc/mediatek/mt8192/mt8192-dai-adda.c index a33d1ce33349..a02a297c0450 100644 --- a/sound/soc/mediatek/mt8192/mt8192-dai-adda.c +++ b/sound/soc/mediatek/mt8192/mt8192-dai-adda.c @@ -601,6 +601,8 @@ static int stf_positive_gain_set(struct snd_kcontrol *kcontrol, POSITIVE_GAIN_MASK_SFT, (gain_db / 6) << POSITIVE_GAIN_SFT, &change); + } else { + return -EINVAL; } return change;