From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796074751; b=5iCHnMe2GWm49/W22RXEZHR90pLmLj6RagUUTFfVoiwpkkO2C3W4K+Z3J4Py9PV2mpUR MarfqmX1m6lu5SLesvsUQCTahYayYmlptpouuuPouNtd0hO5NX9GqEefEZuPO6DSdNyrx T5UnoITMgEkz3bA97xlHOwHjug7Z6lfwGzfMtHbJnAwt97EQJfcGNEk8fprsfYzhcFp1J hi+NyL8Cz2HTf98c2cQ5ImnzklRKRHSwoqJHZQD3EhDf0shDQ2YNgtSFgnM19K5HYYFBg D6km6SwxwCZSfg2Fxu+X19gLeg5rkbouP2iC1G0vJ4GRee09Gxy7xtgxNNg9G7VcAGA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796074751; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=/RwJ1UG0K1/LWY8l/jAw35Vbm33ZvrKIugNcwXTeXro=; b=eeNkJDu8M/qnXFVEDQAliQ1BYKQRP1QJk9/rz5u/CqGv5zspEAiplH2d5BTqRwWfCOHf dLQk6AJlUdDmvS7CMHje/590gRtw+Zgteb2J1gk53bGzgN8mhub1mXx91iOndWy5XcT8V CpIv+iCA4+tUM3XhfWz/4hJ/JsowNSy7D7VRwhQm9yArDLKDP7jfbN3DNpGTdBsADl0Do EjyuPfShNilIA9UjQS43gA/n4/TC+O4WGd+6CDzEEDqEhXr9/zYO8snIITY//a2J8+Yel 8wSCEySrazSijMmOk6120MPb1FLN2ypYn2N6fv2ctb7PhrkHvhKsqLdEJF+1Vy0qo+w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=WkP9bcCG; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0605C606A31A; Mon, 30 Nov 2026 21:39:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=WkP9bcCG Received: by smtp.kernel.org (Postfix) with ESMTPSA id F12C01F00896; Mon, 30 Nov 2026 21:39:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796074750; bh=/RwJ1UG0K1/LWY8l/jAw35Vbm33ZvrKIugNcwXTeXro=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=WkP9bcCGPdWTUDEROu+krUJkbVg0JFs6CzN3iraTAVR5R1RCHywnxsqVcoBeuP45Q i/UkM9ET2/DUylN0lTrZWltjMhTcWxIOvmja/u2fFXjO+ixainBgvKKeC5VurbEVsB cJ/i11A7kewX/5LZgL4AaTV/WNvib9dO1DeKiolQjwtQNOEDqesHd9ltKq79qLg2fL YhKcG8MF8vnv+HaSxFoxo7/3pMHZM+uZrwXoQU0nhKhQrp1QDpjXxtffBbQVDWG8rJ HU11p3bBzmyNQcePId4sGMQJhgFbkET0PezjHxoDGyoBzOyqlf68eAuF/1j5+xsvJF bPje4gMtu9U3g== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v3 18/24] ASoC: qcom: audioreach: add live speaker temperature (T0) readback Reply-To: sashiko-reviews@lists.linux.dev To: "Srinivas Kandagatla" Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org In-Reply-To: <20261130212258.7376-19-srinivas.kandagatla@oss.qualcomm.com> References: <20261130212258.7376-1-srinivas.kandagatla@oss.qualcomm.com> <20261130212258.7376-19-srinivas.kandagatla@oss.qualcomm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Mon, 30 Nov 2026 21:39:09 +0000 X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] ASoC: qcom: audioreach: T0 read in audioreach_vi_calibration_event() with PA on -- commit 1ea299adc65629d4c142c003f2e13f6cd633aa9e Author: Srinivas Kandagatla ASoC: qcom: audioreach: add live speaker temperature (T0) readback This commit allows machine drivers to register speaker thermal zones in VI channel order, exposes a read-only "Speaker Protection T0" mixer control, and records T0 alongside R0 when speaker protection VI calibration completes. > diff --git a/sound/soc/qcom/qdsp6/audioreach.c b/sound/soc/qcom/qdsp6/aud= ioreach.c > index 97d8585a287ba..789f9fc3c9795 100644 > --- a/sound/soc/qcom/qdsp6/audioreach.c > +++ b/sound/soc/qcom/qdsp6/audioreach.c [ ... ] > @@ -1730,12 +1784,20 @@ void audioreach_vi_calibration_event(struct devic= e *dev, > i, r0_int, r0_frac, sp_vi_r0.r0_cali_q24[i]); > } > =20 > - /* Only a run where every speaker succeeded gives a usable R0/T0 set */ > + /* > + * Only a run where every speaker succeeded gives a usable R0/T0 set. > + * The DSP reports only R0, so pair it with the speakers' last T0 > + * reading; a zone that cannot be read gives T0 =3D 0. > + */ > if (success) { > + audioreach_get_sp_vi_t0(t0_live, num_ch); > + > guard(mutex)(&sp_vi_r0t0_cfg_lock); > sp_vi_r0t0_cfg.num_ch =3D num_ch; > - for (i =3D 0; i < num_ch; i++) > + for (i =3D 0; i < num_ch; i++) { > sp_vi_r0t0_cfg.r0_cali_q24[i] =3D cali->cali_param[i].r0_cali_q24; > + sp_vi_r0t0_cfg.t0_cali_q6[i] =3D (s16)t0_live[i]; > + } > } [Severity: Medium] Can reading T0 in audioreach_vi_calibration_event() record 0.000 degC as sp_vi_r0t0_cfg.t0_cali_q6[] on WSA884x speaker amplifiers? Calibration events arrive during active playback while the speaker PA is on. WSA884x cannot measure die temperature while pa_on is true, and its initial thermal zone read during probe happens before SoundWire hardware initialization sets hw_init: sound/soc/codecs/wsa884x.c:wsa884x_get_temp() { ... if (wsa884x->pa_on) { if (!wsa884x->temperature) return -EAGAIN; *temp =3D wsa884x->temperature * 1000; return 0; } ... } Unless userspace has read the thermal zone while the codec was initialized and idle, thermal_zone_get_temp() fails here and audioreach_get_sp_vi_t0() returns 0. Because 0 in Q6 format is 0.000 degC, which is within [SP_VI_T0_MIN_Q6, SP_VI_T0_MAX_Q6], later normal-mode playback sends 0.000 degC to the DSP as the calibrated reference temperature. Sampling the thermal zones when arming calibration in DAI prepare (before DAPM powers up the PA) would ensure wsa884x->temperature is populated while the PA is still off. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261130212258.7376= -1-srinivas.kandagatla@oss.qualcomm.com?part=3D18