NACK/Cmnt: [SRU][R][PATCH v2] ASoC: qcom: x1e80100: limit speaker volumes

Manuel Diewald manuel.diewald at canonical.com
Wed Apr 22 11:06:23 UTC 2026


On Wed, Apr 22, 2026 at 02:17:17AM +0200, Tobias Heider wrote:
> Limit the digital gain and PA volumes to a combined -3 dB in the machine
> driver to reduce the risk of speaker damage until we have active speaker
> protection in place (or higher safe levels have been established).
> 
> Based on commit c481016bb4f8 ("ASoC: qcom: sc8280xp: limit speaker
> volumes") which addressed the same issue on the sc8280x SoC with some
> minor changes as explained below.
> 
> The Digital Volume behaves identical to sc8280x, both use the same
> lpass-wsa-macro.
> For PA x1e80100 machines use wsa884x amplifiers which expose a linear
> scale from -9 dB to 9 dB with a 1.5 dB step size giving us
> 0 dB = -9 dB + 6 * 1.5 dB.
> 
> On x1e80100 there are two different speaker topologies we need to handle:
>   2-Speakers: SpkrLeft, Spkr Right
>   4-Speakers: WooferLeft, WooferRight, TweeterLeft, TweeterRight
> 
> Signed-off-by: Tobias Heider <tobias.heider at canonical.com>
> ---
> 
> - Changed in v2:
>   Fixed names of Digital Volume Channels. On X1 they are prefixed with
>   WSA and WSA2 (for 4 speaker configurations). Based on LKML feedback.
> 
>  sound/soc/qcom/x1e80100.c | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/sound/soc/qcom/x1e80100.c b/sound/soc/qcom/x1e80100.c
> index a3f4785c4bbe..c81df41ace88 100644
> --- a/sound/soc/qcom/x1e80100.c
> +++ b/sound/soc/qcom/x1e80100.c
> @@ -27,10 +27,29 @@ static int x1e80100_snd_init(struct snd_soc_pcm_runtime *rtd)
>  {
>  	struct x1e80100_snd_data *data = snd_soc_card_get_drvdata(rtd->card);
>  	struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
> +	struct snd_soc_card *card = rtd->card;
>  	struct snd_soc_jack *dp_jack = NULL;
>  	int dp_pcm_id = 0;
>  
>  	switch (cpu_dai->id) {
> +	case WSA_CODEC_DMA_RX_0:
> +	case WSA_CODEC_DMA_RX_1:
> +		/*
> +		 * Set limit of -3 dB on Digital Volume and 0 dB on PA Volume
> +		 * to reduce the risk of speaker damage until we have active
> +		 * speaker protection in place.
> +		 */
> +		snd_soc_limit_volume(card, "WSA WSA_RX0 Digital Volume", 81);
> +		snd_soc_limit_volume(card, "WSA WSA_RX1 Digital Volume", 81);
> +		snd_soc_limit_volume(card, "WSA2 WSA_RX0 Digital Volume", 81);
> +		snd_soc_limit_volume(card, "WSA2 WSA_RX1 Digital Volume", 81);
> +		snd_soc_limit_volume(card, "SpkrLeft PA Volume", 6);
> +		snd_soc_limit_volume(card, "SpkrRight PA Volume", 6);
> +		snd_soc_limit_volume(card, "WooferLeft PA Volume", 6);
> +		snd_soc_limit_volume(card, "TweeterLeft PA Volume", 6);
> +		snd_soc_limit_volume(card, "WooferRight PA Volume", 6);
> +		snd_soc_limit_volume(card, "TweeterRight PA Volume", 6);
> +		break;
>  	case DISPLAY_PORT_RX_0:
>  		dp_pcm_id = 0;
>  		dp_jack = &data->dp_jack[dp_pcm_id];
> -- 
> 2.51.0
> 
> 
> -- 
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

The patch is missing the BugLink that v1 had and I think it should be
prefixed with `UBUNTU: SAUCE:` since it's not upstream yet.

-- 
 Manuel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20260422/491bef85/attachment-0001.sig>


More information about the kernel-team mailing list