Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp271313rdb; Wed, 17 Jan 2024 01:04:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IGu/I/sC+h6ZNIB6lr9Rhf9jxXtbJjztmhTxv9LffFsUuhGfHtIe//li7UKS6nplsmvkJsE X-Received: by 2002:ae9:f449:0:b0:783:53a7:205e with SMTP id z9-20020ae9f449000000b0078353a7205emr6595185qkl.145.1705482258054; Wed, 17 Jan 2024 01:04:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705482258; cv=pass; d=google.com; s=arc-20160816; b=ESGr4yv/Qibk2oJKqt4K/K1ZJS9R481pgzrbNXViLublokSXazmFxePrHCuWOAKOio rg7TI89DPSm7RPgWz4/DgzV6BIFG+lMTCU8tnYTvvH2N+L1RklerTiQo+X1E9xp/ndIK mfLOl2fxp3rtoWyLoiCCPzFBIijVjV7ZOJiLttcVdLuaFrCnsDazsfB9oPepSq26vqih ipTpMIuwYLMJQVhr15Zx/UhGQ63otAg603XVz9QI0nH/neHs0O2gQHqQgRLEOl/Vhd23 BbVtA6ITXaSLdrln7JhCMtYWntiUlYH3vQIniuDFEm6OR9KirFWOKXC6xIXGNUQN2Tmw 46og== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=1MN6EMiKX3SvBjc4qxJbhn4S/mMfJt7ap52CFWz4K8Y=; fh=KKP8zTcQJ3oaRk5kFpZOVuVwNJRF3rULozot/hU/FVs=; b=NB4xJyv1TbpdOh6ourO2zUuEU5TPWebvsR9d789GSWeBX5UZuyIbI+bYNvXI246MM/ 1yiyPIslKDEXhd4aUasNq1th2tRoSO9A4TdYlrMjX0hSqGLzokfuHj8TKGvhfoN+GHSD X35KML1bZAjCfC9DEdt5JXd2ehcUle60w2fXRxRE2eV1cPPjfZK1SiPBTuTDWMbQhOe9 7gBg2cjRbvz3d5c4GMZegNZdrJkIfGd42pWISPvsksh7i+gcawvVnAL/v301v8uLnv8o w/+F3nQmXDxgFJb2BmPJYZnNjCVsOY76/JX6/Yk7EvH2f7XyTIywANv3/ayctmQE+ABD cUEQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QrhpPRAY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-28685-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28685-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id n22-20020ae9c316000000b007834a7b552fsi9234620qkg.289.2024.01.17.01.04.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 01:04:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28685-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QrhpPRAY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-28685-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28685-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B99401C24B68 for ; Wed, 17 Jan 2024 09:04:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B288D1427F; Wed, 17 Jan 2024 09:03:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QrhpPRAY" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D38B413FFF; Wed, 17 Jan 2024 09:03:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705482224; cv=none; b=auiSn3WmbR3x2k3Wdpn2gKb5SrWSM+OFCCsDFoNn9Xn3xfIUIgmvXohHQEJFHedqUJIiRgEVHJBd1IhuPtMP+MRG9NTIX9w5CISFJZQ306dIcoe/MKe018rKbNfITd4k9hG6+0nWDxFh/OsQD0IntNa/6grCQvIp/Jb0XNBRksw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705482224; c=relaxed/simple; bh=i17ld0NFQa97QFBuw7o/jqfRb7C6LLoCeBGe1hJFLPM=; h=Received:DKIM-Signature:Received:From:To:Cc:Subject:Date: Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding; b=B4AfLHK/N19MFm5qdtF3IBXeOVY7H+L1Pxru3JtgZQUpQaGyXvYB6zxMAOwt4tXa9PNv7+y1cpQ0nmD0/CM4AfR7U6iSieg8Jp5McmYCN0/HnaTzl6LDGkEGRb+j6JNRiTcLagaM2uAjvFhvCaNS1DTZJA3seTFD7kiZ8ENufT8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QrhpPRAY; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D9E2C433C7; Wed, 17 Jan 2024 09:03:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705482224; bh=i17ld0NFQa97QFBuw7o/jqfRb7C6LLoCeBGe1hJFLPM=; h=From:To:Cc:Subject:Date:From; b=QrhpPRAYqKWIICjhvW+fdF36XLDjkM4tFHkyUpHf8lWZXG54jx90HhGsHVzbXbYwF G+LEa/vv4cI9poRBs8Lj4IpZfOSW6etkZA7ZHuqOFY7DOuX7T9OcxiLeEA3v6fC76B JhBsjOCR8ruvuUREs3USjx4j9DqymyXj+QW5iwzQDQ2wI4GLAt9fmzWYGAaMu8zJoq YjQDNL33u2o0usRIxt/T+E31cE0wJkOH8XeHJJH39pXdzlFn44dikF8g5VQRBKjjVB rQg0L2esBMDKlgP6P9Aguzn89nnxHqpwiJJsEHFsE/Z8rRw1yemyil11YmYc1gZPNT 6z41o7oyF9N6w== Received: from johan by xi.lan with local (Exim 4.96.2) (envelope-from ) id 1rQ1ps-00086S-2s; Wed, 17 Jan 2024 10:03:48 +0100 From: Johan Hovold To: Mark Brown Cc: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH v2 0/3] ASoC: qcom: volume fixes and codec cleanups Date: Wed, 17 Jan 2024 10:03:28 +0100 Message-ID: <20240117090331.31111-1-johan+linaro@kernel.org> X-Mailer: git-send-email 2.41.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To reduce the risk of speaker damage the PA gain needs to be limited on machines like the Lenovo Thinkpad X13s until we have active speaker protection in place. Limit the gain to the current default setting provided by the UCM configuration which most user have so far been using (due to a bug in the configuration files which prevented hardware volume control [1]). Included is also a related fix for the LPASS WSA macro driver, which was changing the digital gain setting behind the back of user space and which can result in excessive (or too low) digital gain. There are further Qualcomm codec drivers that similarly appear to manipulate various gain settings, but on closer inspection it turns out that they only write back the current settings. Tests reveal that these writes are indeed needed for any prior updates to take effect (at least for the WSA and RX macros). Johan [1] https://github.com/alsa-project/alsa-ucm-conf/pull/382 Changes in v2 - keep the volume register write on power-on in lpass-wsa-macro - drop the other patches removing volume register writes on DAPM events - only drop the constant-zero gain offsets in wcd9335 Johan Hovold (3): ASoC: qcom: sc8280xp: limit speaker volumes ASoC: codecs: lpass-wsa-macro: fix compander volume hack ASoC: codecs: wcd9335: drop unused gain hack remnant sound/soc/codecs/lpass-wsa-macro.c | 7 ------- sound/soc/codecs/wcd9335.c | 4 ---- sound/soc/qcom/sc8280xp.c | 8 +++++--- 3 files changed, 5 insertions(+), 14 deletions(-) -- 2.41.0