From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.168.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796073825; b=1PZOUmBNhnCJ0NjUgJnyg/iCn40+HPsJhNWy9oWNnCc/2Z4e7tqlBDe4OkLYi1RVWNpe dqagyQwXS64nGqLZQNPAt0tNcH2MzDyeQ5YG9rn3tkC8haGvyCysG86M7FgoGxS06ca+F jD1RIZUdX1s6Of7Xujrxm4sL1whirbHzjaS7ocREBkTe/4wIRs1f+extWZzJmcYtsrCs5 4RrCCjPDEA/SkqplfmyWdF78L6GVzsTyNqkxidAP9/g9CgRDbWccyLu95D2Di6m+neRt9 lRc6hSLccCcYsGo1wS9OHQ+tRMgIRKjkccghWFtH9AKGWl7sINiX29X/H3OLpPPPyVw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796073825; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:X-Received:Received:From:To:Cc: Subject:Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-Proofpoint-Spam-Info:X-Authority-Analysis: X-Proofpoint-Spam-Details-Enc:X-Proofpoint-GUID: X-Proofpoint-ORIG-GUID:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=FP8EUaJ239uyuZKmC3kddc3HANbFrANSKmUxGoQRDZI=; b=j6BA03sDPr8fGdp7H8DDH0SIn3fOd1MN4L9M2aBvDoaM4pPQxt1b16OGZPRQozBTyB+W T7ZKkQIvpncebqmGB8MI+BdoBU+u7mSHnBXlAUQybtb9LcaPmz0bUwfd2kSgnEY7b+vFq L7eFjQ7OnRYssUdjw5GAYroAb/3OGaanBeEG3PkDDitfPQAYUdXxpgzQFP14kBLfKwhbg yD+Y9e9LNK8quxZ38ek30KA7F94f5sSF6l/MJs3qVZtwB9ZVeVc0fA0dm8EtOalG5XiQv fyN3g4V3gUFQJSNj/V2Cle0qsarRoYeCJG9cCu1kO1FEMTNDKBahOCf9mpJkRpGefgg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=kQwc7ujO; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=hbhw+4xh; arc=none smtp.remote-ip=205.220.168.131 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 57542606A689 for ; Mon, 30 Nov 2026 21:23:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 57542606A689 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=kQwc7ujO; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=hbhw+4xh Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6AUKQAhY4082901 for ; Mon, 30 Nov 2026 21:23:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=FP8EUaJ239u yuZKmC3kddc3HANbFrANSKmUxGoQRDZI=; b=kQwc7ujOwdGpBW4k6rLoGd5aSM+ G6OvyouPgFgNzaS6L6t5pET/RYfYfncMqe0BL3H5upVDS0+HB/iXA3CmByVxEexU ulRO4YpGs99VNLd8GgjL4QBlpG9bDfMKxQCeurCasM59ES+sN4KixcSWlVM57CfS 1+k9i2TzwtgJdsWErryS9KJv6K4fIFss23FGvmz6vYa9GxxuVNdD+Nb4IOTKVR51 B9CQcPhNRgDLbtZo9coT5lShF+san8XDihyc+n2nI3qAzkDxB4MpwNPjWYfQyJW3 6557nC8eGSWoMr0V9rKyTodUADNBNjXc52j6wuWamKO2pr2VENu1uz4EXeA== Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4j98uda8mm-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 30 Nov 2026 21:23:44 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-949dc497896so1047750485a.0 for ; Mon, 30 Nov 2026 13:23:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796073824; x=1796678624; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=FP8EUaJ239uyuZKmC3kddc3HANbFrANSKmUxGoQRDZI=; b=hbhw+4xhVHTgfax32UfMhXsqq9ZunIImLgi8RrNvy+biv5OTEa6FnD7ueNl/DqodSt UXXNs+FeBA7bXv/RmDZ7m6E+5ijOtBMfEANK9BXsS/yIWzBXbGinm+aB1R9vUrTdfPmd BaUM4UN2Ch736LxJLWUn2FkkxbSxJ3jGJUXPeKMtvB1DZMt6jlVNqHI6LJRaptBCB9Kt Jx1nwloBugCdfu1E0UIX2UHHUCp0jktHONzU6B54gUYH1xyemIGmfH7A3eg30adLg7wK Fy6XOpet5HQEsO7N3hNzuZIt5OBdjdOfHK/NMdh0yfMo3DwARjT5KekHZw5NS//TnisC n21g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796073824; x=1796678624; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=FP8EUaJ239uyuZKmC3kddc3HANbFrANSKmUxGoQRDZI=; b=a138ahxBeMmJZQF2ssDFOU62s5R+7h78XD+rIy9HZs7l0LO17cq97+33oDBqUDh5Sd mN11LIGtA+wW2VgPxdU5hjuXnQoGZrIBuPJKywdNQUaQ4I7D2XcwoGWC3KSlbMTRUEme lEs8zhOkjeHsJdif2Nl138SfPvyFAMO3PHeUX0Wz92sJOg7hMW/uUtuzALly+4w2a44o 1Tra7Tf5ZNtYqNYU5HtEFfJ/ykDgBsnnGSzufUWbgejvVTl4J/yzpFmATOBM30Qemlg5 Hh81rsCyuAVQN09/pOIL7+oZylveyY5PHGrfL1dT/LRXGeHYeDcvSTuHXdWCzTQm31fC mM3g== X-Forwarded-Encrypted: i=1; AL+hErG9S8TS1THhXN3TMj+w2E2gMAVhWwqAAJ2f9ByUBBLgksAcjsYUBXZbS5C7j3vpG5PUATQsQdlymDEayIg=@vger.kernel.org X-Gm-Message-State: APuU4Z85n41z9bddgg24ebwamYWOMQ5SRx8CQCnGS1BKdxkmny67Zijh QysJrDpHtFI7CPstDyDaYJmfOMGvMkOIWNSLMSHo/CHphU0RbVCiQXAb6KC5lYKSqHlBumXXKPO liVD0hX87Nk1/s3hqoD/HtmmVKqsTbJKQ2COQ+twTqyA1rgOTIExYkOOtjSQA9f4rl/k= X-Gm-Gg: AZFdTZeN4eyNNXi7vFSQPQYlh2UCUnuuYWGoCX9WnnKvWX/mvMSq7sWDwUOj5Y94zwT UEeMDyHp1Xy2rkCo2lT+RWbXSPmTr5FIhSZzwlGGF365urHsSZFmxb4Pcil2REVy5uBWQH+3u6U PRElBRZcQaIpiDTgiAzF3TXVRTM734AtYX7rSeCvmCkcM8g+oLa/xq82B4gkoKiwF+JhBTdaoQy P/yWw2IAvw6g5AhLNnuHptU/6DzbR1oDfjhgYV9OWKD1PBR/DZ3d5pbUuHCnhvNvbAoyFU7FwrG eaWJvLOiq3yDcguwsTUTQG8p+wD6KU6lEy0Zp7qiWZBQ72kS5+cIDVU8Hdxtve9Gp96l50v5WP3 fym6QMZ+a1Fg/dVHFGeys+EG2dFNZRD0Aysq06B3HV+To+E/otxuJ58JcbKjx/Vc2 X-Received: by 2002:a05:620a:454c:b0:93e:c12c:fbcd with SMTP id af79cd13be357-949bac7665amr5789569085a.73.1796073823587; Mon, 30 Nov 2026 13:23:43 -0800 (PST) X-Received: by 2002:a05:620a:454c:b0:93e:c12c:fbcd with SMTP id af79cd13be357-949bac7665amr5789564085a.73.1796073823064; Mon, 30 Nov 2026 13:23:43 -0800 (PST) Received: from debian ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb88402ce9sm792580515e9.0.2026.11.30.13.23.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 13:23:42 -0800 (PST) From: Srinivas Kandagatla To: Mark Brown Cc: Srinivas Kandagatla , Ravi Hothi , Jaroslav Kysela , Liam Girdwood , Takashi Iwai , Pierre-Louis Bossart , Kuninori Morimoto , Bjorn Andersson , Konrad Dybcio , Abel Vesa , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, kernel test robot Subject: [PATCH v3 18/24] ASoC: qcom: audioreach: add live speaker temperature (T0) readback Date: Mon, 30 Nov 2026 21:22:52 +0000 Message-ID: <20261130212258.7376-19-srinivas.kandagatla@oss.qualcomm.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261130212258.7376-1-srinivas.kandagatla@oss.qualcomm.com> References: <20261130212258.7376-1-srinivas.kandagatla@oss.qualcomm.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Info: AW1haW4tMjYxMTMwMDA4NiBTYWx0ZWRfXxORPyx+NgWTB cRjXw5GvakelnHFRLxx/i7FhYx18RDhY29zzUOUbI4b4m0HA2BgPgNRJqXq24m9hI4Kr6s253+c d1XzNzg4wW9H/oA3evlzwKuvKe54y4A= X-Authority-Analysis: v=2.4 cv=edqo7LEH c=1 sm=1 tr=0 ts=6b0de960 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=ZsC4DHZuhs/kKio7QBcDoQ==:17 a=zJRp6_cAMcgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=VwQbUJbxAAAA:8 a=QyXUC8HyAAAA:8 a=EUspDBNiAAAA:8 a=jt9GbcDmORiCJNAdx5sA:9 a=IoWCM6iH3mJn3m4BftBB:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTMwMDA4NiBTYWx0ZWRfX9II9K1qlpH34 8sKCmjYeBvtLZ7P/Pkd3OolhZfwbDG8TysTt9XZmE+Ibo/v41rkLJuOXoelXhGozgtkIy2Jg5e9 OwA/9cosDeTXznPMBaj9Njre4JHvZ8uLR1DComjWCeRGNJYYVvR6u7chO0ynavKzjQjS1dlrSne DhBKZ3yFyo1QSIUao2V7IfDI5liSuUyFhznNKzvYmUsV+aIQXzRFXQM6ZmqVa+qi46c1l6UPiPr osxp1a7pnumjjd3O9SHp8I1GTpep41svhyuUi3ZIdVPkplNw2A+bk1qF/9vg8dFsC85YlIUFmO6 yX+pOzce46fnoUn/kbszdCw26nSfXLGPzLQcTSBlMS0gRwTa9CKWJpUZb9ElDY0YrvN6eWCDnqJ K7Ogl06oZsSyIGKrRPuBJt39hpun9DAJC2c82ro8AjSEGzUx89rHz07R/qToFR5QhTxpmoQDeFb hq6IAp3qGrNXVlmE0Ug== X-Proofpoint-GUID: xmbERN7vUIaWuaMiMZAIPLm0z9XW9ULD X-Proofpoint-ORIG-GUID: xmbERN7vUIaWuaMiMZAIPLm0z9XW9ULD X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-11-30_05,2026-11-30_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 bulkscore=0 lowpriorityscore=0 malwarescore=0 phishscore=0 spamscore=0 adultscore=0 suspectscore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2611300086 A calibration needs each speaker's die temperature when R0 is measured, so that the R0/T0 pair given back to the DSP is consistent. Let the machine driver register the speakers' thermal zones in VI channel order with audioreach_sp_register_speaker_map(), and expose their temperatures in Q6 format as a read-only "Speaker Protection T0" control. Record T0 with R0 when a calibration completes. A slot that cannot be read reports 0. Signed-off-by: Srinivas Kandagatla Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202611231947.lq10qE2P-lkp@intel.com/ --- sound/soc/qcom/qdsp6/audioreach.c | 66 ++++++++++++++++++++++++++++++- sound/soc/qcom/qdsp6/audioreach.h | 5 +++ sound/soc/qcom/qdsp6/q6apm-dai.c | 7 ++++ sound/soc/qcom/qdsp6/topology.c | 41 +++++++++++++++++++ 4 files changed, 117 insertions(+), 2 deletions(-) diff --git a/sound/soc/qcom/qdsp6/audioreach.c b/sound/soc/qcom/qdsp6/audioreach.c index 97d8585a287b..789f9fc3c979 100644 --- a/sound/soc/qcom/qdsp6/audioreach.c +++ b/sound/soc/qcom/qdsp6/audioreach.c @@ -2,9 +2,11 @@ // Copyright (c) 2020, Linaro Limited #include +#include #include #include #include +#include #include #include #include @@ -44,6 +46,13 @@ struct sp_vi_r0t0_cfg { static struct sp_vi_r0t0_cfg sp_vi_r0t0_cfg; static DEFINE_MUTEX(sp_vi_r0t0_cfg_lock); +/* Speakers' thermal zones in VI channel order, set by the machine driver */ +static struct { + struct thermal_zone_device *tz[MAX_SP_VI_SPEAKERS]; + unsigned int num; +} sp_speaker_map; +static DEFINE_MUTEX(sp_speaker_map_lock); + /* SubGraph Config */ struct apm_sub_graph_data { struct apm_sub_graph_cfg sub_graph_cfg; @@ -1605,6 +1614,50 @@ void audioreach_get_sp_vi_r0t0(long *vals, unsigned int count) } } +int audioreach_sp_register_speaker_map(struct thermal_zone_device * const *tzs, + unsigned int num) +{ + unsigned int i; + + if (num > MAX_SP_VI_SPEAKERS) + return -EINVAL; + + guard(mutex)(&sp_speaker_map_lock); + + for (i = 0; i < num; i++) + sp_speaker_map.tz[i] = tzs[i]; + for (; i < MAX_SP_VI_SPEAKERS; i++) + sp_speaker_map.tz[i] = NULL; + sp_speaker_map.num = num; + + return 0; +} +EXPORT_SYMBOL_GPL(audioreach_sp_register_speaker_map); + +/* Read each speaker's T0 in Q6 (degC * 64), 0 if its zone cannot be read */ +int audioreach_get_sp_vi_t0(long *vals, unsigned int count) +{ + unsigned int i, n; + + guard(mutex)(&sp_speaker_map_lock); + + n = min(count, sp_speaker_map.num); + for (i = 0; i < n; i++) { + int mdeg; + + if (sp_speaker_map.tz[i] && + !thermal_zone_get_temp(sp_speaker_map.tz[i], &mdeg)) + vals[i] = div_s64((s64)mdeg * 64, 1000); + else + vals[i] = 0; + } + for (; i < count; i++) + vals[i] = 0; + + return n; +} +EXPORT_SYMBOL_GPL(audioreach_get_sp_vi_t0); + int audioreach_set_sp_vi_r0t0(struct device *dev, const long *vals, unsigned int count) { struct sp_vi_r0t0_cfg new = {}; @@ -1670,6 +1723,7 @@ void audioreach_vi_calibration_event(struct device *dev, const struct event_id_vi_per_spkr_calibration *cali, u32 num_ch) { + long t0_live[MAX_SP_VI_SPEAKERS]; bool decisive = true; bool success = true; unsigned int i; @@ -1730,12 +1784,20 @@ void audioreach_vi_calibration_event(struct device *dev, i, r0_int, r0_frac, sp_vi_r0.r0_cali_q24[i]); } - /* 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 = 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 = num_ch; - for (i = 0; i < num_ch; i++) + for (i = 0; i < num_ch; i++) { sp_vi_r0t0_cfg.r0_cali_q24[i] = cali->cali_param[i].r0_cali_q24; + sp_vi_r0t0_cfg.t0_cali_q6[i] = (s16)t0_live[i]; + } } dev_info(dev, "VI calibration complete: %s\n", success ? "success" : "failed"); diff --git a/sound/soc/qcom/qdsp6/audioreach.h b/sound/soc/qcom/qdsp6/audioreach.h index 713bf3ba5b6f..fb3f2f61e2b1 100644 --- a/sound/soc/qcom/qdsp6/audioreach.h +++ b/sound/soc/qcom/qdsp6/audioreach.h @@ -8,6 +8,7 @@ #include struct q6apm; struct q6apm_graph; +struct thermal_zone_device; /* Module IDs */ #define MODULE_ID_WR_SHARED_MEM_EP 0x07001000 @@ -1137,6 +1138,10 @@ u32 audioreach_get_sp_operation_mode(void); int audioreach_trigger_sp_calibration(void); void audioreach_get_sp_vi_r0t0(long *vals, unsigned int count); int audioreach_set_sp_vi_r0t0(struct device *dev, const long *vals, unsigned int count); +int audioreach_sp_register_speaker_map(struct thermal_zone_device * const *tzs, + unsigned int num); +int audioreach_get_sp_vi_t0(long *vals, unsigned int count); +int audioreach_add_sp_telemetry_controls(struct snd_soc_component *component); void audioreach_vi_calibration_event(struct device *dev, const struct event_id_vi_per_spkr_calibration *cali, u32 num_ch); diff --git a/sound/soc/qcom/qdsp6/q6apm-dai.c b/sound/soc/qcom/qdsp6/q6apm-dai.c index 09d10b005e64..731828fa7d95 100644 --- a/sound/soc/qcom/qdsp6/q6apm-dai.c +++ b/sound/soc/qcom/qdsp6/q6apm-dai.c @@ -20,6 +20,7 @@ #include #include #include +#include "audioreach.h" #include "q6apm.h" #define DRV_NAME "q6apm-dai" @@ -1322,8 +1323,14 @@ static const struct snd_compress_ops q6apm_dai_compress_ops = { .copy = q6apm_compr_copy, }; +static int q6apm_dai_component_probe(struct snd_soc_component *component) +{ + return audioreach_add_sp_telemetry_controls(component); +} + static const struct snd_soc_component_driver q6apm_fe_dai_component = { .name = DRV_NAME, + .probe = q6apm_dai_component_probe, .open = q6apm_dai_open, .close = q6apm_dai_close, .prepare = q6apm_dai_prepare, diff --git a/sound/soc/qcom/qdsp6/topology.c b/sound/soc/qcom/qdsp6/topology.c index c07a27bdd3a2..0e28c68c735d 100644 --- a/sound/soc/qcom/qdsp6/topology.c +++ b/sound/soc/qcom/qdsp6/topology.c @@ -1527,6 +1527,47 @@ static int audioreach_put_sp_r0t0(struct snd_kcontrol *kcontrol, return 1; } +/* Live T0 per speaker in Q6 (degC * 64), 0 if it cannot be read */ +static int audioreach_info_sp_t0(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_info *uinfo) +{ + uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; + uinfo->count = MAX_SP_VI_SPEAKERS; + uinfo->value.integer.min = S32_MIN; + uinfo->value.integer.max = S32_MAX; + + return 0; +} + +static int audioreach_get_sp_t0(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + audioreach_get_sp_vi_t0(ucontrol->value.integer.value, + MAX_SP_VI_SPEAKERS); + + return 0; +} + +static const struct snd_kcontrol_new audioreach_sp_telemetry_controls[] = { + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Speaker Protection T0", + .access = SNDRV_CTL_ELEM_ACCESS_READ | + SNDRV_CTL_ELEM_ACCESS_VOLATILE, + .info = audioreach_info_sp_t0, + .get = audioreach_get_sp_t0, + }, +}; + +/* Kept apart from the topology SP controls, so FEs have them without it */ +int audioreach_add_sp_telemetry_controls(struct snd_soc_component *component) +{ + return snd_soc_add_component_controls(component, + audioreach_sp_telemetry_controls, + ARRAY_SIZE(audioreach_sp_telemetry_controls)); +} +EXPORT_SYMBOL_GPL(audioreach_add_sp_telemetry_controls); + static int audioreach_control_load_mix(struct snd_soc_component *scomp, struct snd_ar_control *scontrol, struct snd_kcontrol_new *kc, -- 2.53.0