Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2679028rdb; Mon, 4 Dec 2023 04:47:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IFxjm9r/2N9vLoSnS/m516ag/XYp0ouKZaaoWjlPS1PxscORx5AT0be/4IDGaP/aR7jtPWY X-Received: by 2002:a05:6358:2606:b0:16b:c43f:3da4 with SMTP id l6-20020a056358260600b0016bc43f3da4mr4445507rwc.3.1701694068815; Mon, 04 Dec 2023 04:47:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701694068; cv=none; d=google.com; s=arc-20160816; b=c/e7on19g8Qrk5zgS2oCa4gGmRmX+x45PuanodkAIQZFNozAxXbZC6b34HPNysgB4g G5ieuCcAdL5cLkLpig8hiG6LSOKD4cqc3DGKhW+hj7hTjTaKg5fGMe3GL8OxL1lsZN2u 2bK7Di6QsBQhfo6fNxJYqiUZUHt2AlTwnwoda5x6UiMezTaTYxk5jMKEowSgns5NkDCv MWycI1dBFmGfnJ1lpVgBjroYjZVuL9KMaN41DYUHR+0qfKpPwSCbsocfGr8a/3is1Pmv yNkdV3rX0748me8xBr4I9ZYhKCWKnWOrkAVDkupuDsT0asj1p0743dACqPbiJWpADgbF pMQg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=/S3g4FV/iGDfW3ps7M4rheJELxKDhQrVaKwMBGZuxiY=; fh=tKMKhgl5y3qWFLA4WbTOKHpRmq3iK42KyhZj04F1xWA=; b=Sm2gAzqn1Opi5dPmnv9qEgMpXT61aub09nrW9pBm9Ussp8ArK0HZ6PXN/rQ6V9doyn BkZH9eTDMtikAHCJLUSefRo+dS+O32mQtXFbnT4Jj3NrlsXTOb5VQMIL99t3axrhtTiA IPSAcHxHrSO6fy55YM3h4reB0sX5e5ApSpKkrxDzk4Ucw8RaPW/aVnn76roX31gDCP8y KsjiucLZNV3zE+Zm8+JUbyaCaKc35w8PHfoJSE0TDqRRehuN2elRoicKbA3COtOdjFX5 MraDg83s2gYGP6jILGGC3qXK/z1u4SZvIPpcu3GkYL37IunI19w/voQeZ9VjZRY2RfZW cuKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iho0R8V4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id z9-20020aa78889000000b00690cc6f7598si127382pfe.247.2023.12.04.04.47.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 04:47:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iho0R8V4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id C606980A22FB; Mon, 4 Dec 2023 04:47:47 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231952AbjLDMrh (ORCPT + 99 others); Mon, 4 Dec 2023 07:47:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229944AbjLDMrg (ORCPT ); Mon, 4 Dec 2023 07:47:36 -0500 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A7A2A8 for ; Mon, 4 Dec 2023 04:47:42 -0800 (PST) Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-54cde11d0f4so856931a12.2 for ; Mon, 04 Dec 2023 04:47:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701694061; x=1702298861; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=/S3g4FV/iGDfW3ps7M4rheJELxKDhQrVaKwMBGZuxiY=; b=iho0R8V4dHCjwJmpDKGNd5AnLXsuvWNnn7+xJ3iFTKtPHQA0wSzH3ruu6r3tza5vA0 wRhZEx9cRYqWrkECLQP4JOpCBe4z4YaqaJUs+Z+/w7AQ6nOk5JcR6xBAKuR9F8Zsbw9B MU7M1fyjqrvTjMSoaXz34oxsIlLo7nMapygMfAN4C95khaSvjAjBDxlwm8ylfWSF6tZJ oW/GQ3Qmj2MixJKgBXGweRL5Bmqtj7+T3aWIoehcfzF0OU2rK0Ow51cfCl9+SAiz7P5K SAopvEq//xEOhNg/o6QxQDxqwhb99N+TIUcg1SzXACP0Q8Rzz6XaC/Ok/0Ye/lhSmcOu 8A9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701694061; x=1702298861; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/S3g4FV/iGDfW3ps7M4rheJELxKDhQrVaKwMBGZuxiY=; b=AQzoKUo2ySRa95PPkvL0rTdyS5t1JQnPiPYBLT1Dy5AO/u+kGCBWujXmZuzY+/qgiR 8A/0/KWe9p0J62Cw9KQBWmbpuXnFTHohfNRPlwuPJG8sTgKHMel6YVIipTw90ABDkAf8 DEwCcUxjqGSzbOPV+XPb45Fk+0seZyxgj6vEsAI5BiHlanfDv0RoejRmRNT2TPeSjuGL DsuDJOkt2/qJxKsZTu0kbR2OUDfTUG31ZkHbilRGgWwjlGvISqyZsP1Ue2Wihu9/66GM 0d2mY9o7ohf2S8SZvJzFeg4b4O64b1LNOfLGqggOMk4dp2Wn6EJm2iQbtdbGlSWIcHEM IYVg== X-Gm-Message-State: AOJu0Yzbe3jtK5JbWW5hZXlVufplIgdHJS7srfeJTMCK0XXQE4IzyUjm bknARELP7CZyqVXzfrEjX82jbQ== X-Received: by 2002:a50:d799:0:b0:54c:4837:a665 with SMTP id w25-20020a50d799000000b0054c4837a665mr2965090edi.82.1701694060814; Mon, 04 Dec 2023 04:47:40 -0800 (PST) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id dc15-20020a056402310f00b0054ced65bd26sm457017edb.41.2023.12.04.04.47.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 04:47:40 -0800 (PST) From: srinivas.kandagatla@linaro.org To: broonie@kernel.org, alsa-devel@alsa-project.org Cc: perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, johan+linaro@kernel.org, Srinivas Kandagatla Subject: [PATCH 0/2] ASoC: qcom: Limit Digital gains on speaker Date: Mon, 4 Dec 2023 12:47:34 +0000 Message-Id: <20231204124736.132185-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 04 Dec 2023 04:47:48 -0800 (PST) From: Srinivas Kandagatla Limit the speaker digital gains to 0dB so that the users will not damage them. Currently there is a limit in UCM, but this does not stop the user form changing the digital gains from command line. So limit this in driver which makes the speakers more safer without active speaker protection in place. Apart from this there is also a range check fix in snd_soc_limit_volume to allow setting this limit correctly. Tested on Lenovo X13s. Srinivas Kandagatla (2): ASoC: ops: add correct range check for limiting volume ASoC: qcom: sc8280xp: Limit speaker digital volumes sound/soc/qcom/sc8280xp.c | 17 +++++++++++++++++ sound/soc/soc-ops.c | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) -- 2.25.1