From nobody Tue Feb 10 01:34:33 2026 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 51219334C1F for ; Fri, 19 Dec 2025 11:46:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766144766; cv=none; b=jr+MbN/UH70M7h1Qm30mbSA5YeO2xGLDHakWlEp8KfeCoGvS5kXkxUCthFNZaptz2N82DyoyQrkmrJc0I7HmcN4FtUdPaR9Hp/LbA2c5GWtJQazFKfPjeQYxJGc7ZlgQqJ36se17BFg1YU9TffCiu+eA7XRItT+KDcPdGWGUsUU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766144766; c=relaxed/simple; bh=51m58wrUvNztZ8MT0/cSt6uzg7b+F+0zxCibYMTfOi0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bCyHg7VRfaoBZRzsnZ2/ysA2Gp+dbkxqjK65KQa1UsgZvtA+dK+8xwB+2wID1petwYNucXmQ8qjFiXotC9WS0fq8MVtf31ZwX2/in9GQ0Cn/4dy3oXcIHw8E+VK5dh3+cX4qLpf1BfJjzjdPmFCi4176QNqfAjSPfv3F1vjjcPU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=EdfaNgmm; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=C1LNA7re; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject 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.b="EdfaNgmm"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="C1LNA7re" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5BJBSBUS091968 for ; Fri, 19 Dec 2025 11:46:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= giYCXInr3PCxoTXokn2gBk5kNRjDWGpv297jdyI161g=; b=EdfaNgmm84N69zv0 5qkhCNsOWZYB6JEb0uSlzqzcOqkQ7rDijP74I3M9PzImGM95ZM3izUWy9HSpLSgP UfkkGkHC9UEt+S94SJrrWSX8GL4L7eKacyptBn8lhC1ixf155y6I8C/z2A6n4XdZ OdT6PGLfQMDIdxSdbj58h4zk3u/T7ZGw+rq0CIyaGHeSEyz3DrBMRHV3v7YIZf2/ Y3gWKdD5wR7bFCaeeKIZ1Bc7mYV/0R+tPSkUeqcJxjc107JZokj+4uK1ncthpKQd 0uAxCtm5jWFqqGgWB0Xyon5L2t1bKM2ugWMkyHYrq1zZy0oKyP5ROXpCwhwr231l cVV8mQ== Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4b4r2eagun-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 19 Dec 2025 11:46:03 +0000 (GMT) Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-4ee09211413so37787901cf.2 for ; Fri, 19 Dec 2025 03:46:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1766144762; x=1766749562; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=giYCXInr3PCxoTXokn2gBk5kNRjDWGpv297jdyI161g=; b=C1LNA7rebobLEmgBh3LrxNARg8SdUhjbH3Js1jenXcjOoEeD2OKPkMXOfC9gHhp5OK Pf/A6YnkrRhfuLGzBcX2LCsw+JtF1y74kAh5W0D+OGMTawSAQhukAnKFpjkS1KSF2TGK Oi8W2+rT6+G+ai8mTXYJG+5lKsUbU6QMiw9TNjAY/Yl819/tYEOWeMiZGeeK2/aIkcpr jnVSFNcAbyJ8/+hQCm9MogGSjD6sKcyHjx7ZXsmEtIABinxYGgnggYhveEtRgPfV1I8R NzT639t3aJfQYwtoWq9fSI/NYZ46sEADO9BbA4hoDEht6t0yPdFsW2PpwkI5tZau76eY Lwpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766144762; x=1766749562; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=giYCXInr3PCxoTXokn2gBk5kNRjDWGpv297jdyI161g=; b=nT5I+J4+ikYZKQkYlIEn2j1TxULVxJXgzUHsTfbROliPcnOwG6D8Jh6J81/unpjrlH eyWWPxrBj+F8wDTqoYexbXkS4QOskBgK1iyMmMgd9wHz/fna8n73McpgCOkP4cM9lsU8 pJhTP8SlPR1sh6qhLBlo3fbWlc4FxOmio58Nd9B3qooR3F/2msbtikkedtBOJJE94HxS lx9G0Q628YdH5al6taKThEbnqW5VloyQguqn+wqVgYCcL5/fU0+pqMTz6RqOASYMD9YN tNwV7CdBItIxO7+jI6JNBZ0TWflYAV/MabXx/EYZdtgjjtmS36ncIkfukvrClwcQ3lQL 5wwA== X-Forwarded-Encrypted: i=1; AJvYcCV+LSXijFXWnmtS7q/1wPjoB2dmfc05e+Iaca5wcPcg8Xq3S5iczQIUhCeRcHQP+QQ8Z7XTFaji6JJb7BY=@vger.kernel.org X-Gm-Message-State: AOJu0YxNHlTs0noBjlw19D/gdUESduPzub5CbbAd6Fh8+I8DeH3QRCGf O63qWo7+m0tUvgS6yo2BOL+d1pn8smXc2o04NnERRcmNfuBC5aIDAYXyb/6S3j4dnmUbau/1vBW /mbfSu2IG+o4HevUNmJa2NLYIPbiWv2PW7HQ21bf/FsOcDR0gFx6YO07/WKEGpZOZ40s= X-Gm-Gg: AY/fxX4Bi3+lsYD8UE9yTC/5e82qZal+R1AABn7PzlpjgV7NCR6XkMFau087e7aZ2sI xwnsRDJgIUvEtNSPK4UcDEFzQYeZfPoGnq6RdWTxX3Wghj0bhnChbpplrv8TJOXXAqDo6TDTPdF XWn95/h78Xx/wx3cI+KedJWZVdCMk1zU5zpWa6wH/KSqHTYT0PPb76p30Pjd5PB0enWWXGuSo7A uIKSBy7Q8JOTKWnw6AFrnRliIKlnJeoZwuHauyqTzli9Q38+RyC9UKi7IsciPe33ebfNsHOq4Pl th6vjW7Qol51LdbOd8MM+jVj2tSo+jbdq9837ErX7pIKLJvZ2p2+QajpSauLDwdIEAKYxhsJ4il eu3VnjWXkOzB94bIsAOSlQJIF+MW5Qo3DaPeF5D+IfmCP1UmKhR+cZpyDZz50CVEvD3PT X-Received: by 2002:a05:622a:5e11:b0:4ee:4a3a:bd00 with SMTP id d75a77b69052e-4f4abdc3b6cmr32569431cf.71.1766144762574; Fri, 19 Dec 2025 03:46:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IHbh2GZ/6GRk+auDD2Q/R/Vd9bYqskXY/6+cE24kTZoZrCZOpa/TZKsOpMSMs/b+/9zZN0wNw== X-Received: by 2002:a05:622a:5e11:b0:4ee:4a3a:bd00 with SMTP id d75a77b69052e-4f4abdc3b6cmr32569081cf.71.1766144762100; Fri, 19 Dec 2025 03:46:02 -0800 (PST) Received: from [127.0.1.1] (83.31.98.88.ipv4.supernova.orange.pl. [83.31.98.88]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-64b91599844sm1974465a12.25.2025.12.19.03.46.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Dec 2025 03:46:01 -0800 (PST) From: Krzysztof Kozlowski Date: Fri, 19 Dec 2025 12:45:48 +0100 Subject: [PATCH v2 5/5] ASoC: qcom: audioreach: Constify function arguments Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251219-b4-container-of-const-asoc-qcom-v2-5-05fd2ecc06fe@oss.qualcomm.com> References: <20251219-b4-container-of-const-asoc-qcom-v2-0-05fd2ecc06fe@oss.qualcomm.com> In-Reply-To: <20251219-b4-container-of-const-asoc-qcom-v2-0-05fd2ecc06fe@oss.qualcomm.com> To: Srinivas Kandagatla , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Cc: linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=14150; i=krzysztof.kozlowski@oss.qualcomm.com; h=from:subject:message-id; bh=51m58wrUvNztZ8MT0/cSt6uzg7b+F+0zxCibYMTfOi0=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBpRTruMTzgiyGeDPofJoqPBy18Sf/2CwpjKnwYg mJyUpTYEdaJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCaUU67gAKCRDBN2bmhouD 13XzD/0T7v+Inrhk5oIiXcafOI4AptIrxeR8gdl7VcbXFTAY5WiML6UOGwfJ7j2JaI8r4ru7liI RQQXWKqTQVRQaNvnKlxfBqAr6rVZRbEB4Fu//WTarGiF9fvWbswuYbYzNyiULxgtRO/JLEzWVGM P398ErOgn4+rIowEfzkfztMdLmq+FOZsyLPLoTfS2iDIYm+pUsh6khteitZ4H3gKHNnYiHfCyRD 8XnLfAVk4KiZeo08uNS+vsb0HBgXNXAkIB3wSckSUZvBRgRsJcWlkgJv2d6xdR6WbPHYnQSZwts 6XsS/u5+ORFfpwd14Q00JfiDAN0cCghDt4LGq8xqOtDvqLZn2mb02/IVzUue3kn7iyk+iCFHRa1 jLqQNPTJqFGavF5/0sWDRTiDSaT1wvl9dPbM+yjXkMMBtof+D999xiM+9OxsE/ydpJKvuOXYZP4 Wk6t4+d/Ek7CbksgF1BDT1rKB0tWnc476f4Ga5mUP/So+EvfdGuhUW/D3WO7Zo9wWQdnHmKXkrN zYQTJFJgKvHppAVqc7UCZCb6LG10kkFso6A4AqqTjVTFniCxrOpb3QJWBJrfqnIGm+8bP1ZpPuI 73873XtdruGulNMSzH2eXfUMFIvYCwIaLyVtW7BQXWjOvXwx7UCP4IsS3u+BoyjxEAwaBXumFRJ OA2mAw8Wl3l+ByA== X-Developer-Key: i=krzysztof.kozlowski@oss.qualcomm.com; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMjE5MDA5NyBTYWx0ZWRfX49D4CWDBT2fh QTGzM/XSKqrBK2kJagbbQktQ9s41vuQeVHzZN+SW6lq7i2evrwR1xjybDbWysgJmSGE/lW1bAYS i3YHDIzEOsMCXRhntduClLsrdmXXLhRsG7I+oWQnbtBVpaKVwSpbeky0sIyf2tudlUbJ+gzSdLK YYcSeO7SiELMRebKtnqkCjwo6MaJVFoaO35Ww45jWCAXWgR9dvka5BV0V+oIWxys3LUHlIoxiWE DXbjhnbiOZcWjZ/QVHKgXI8USln7i6l/5n8YREbChFQP+gVyzE4q0votAqPpq1fHz+EI5UQDzek hrqseoxqVtg4OoEF21RQ3BZDrQLNL+GxvB47Bx7YoXbCEv2Tnp1nztoszl+yKolTu3A0WAXN/k+ VYcuC2lHS9SUXtSOcL76POiVMfwl+ftyDoRKyWeOg5LkDAm0I6qiAa2Xxv3YiSRgNa3Eyd2t2yP dImrAu+j5yqJ+gJI1KQ== X-Authority-Analysis: v=2.4 cv=W+c1lBWk c=1 sm=1 tr=0 ts=69453afb cx=c_pps a=JbAStetqSzwMeJznSMzCyw==:117 a=qe4J/qXhiWkb1JZGYKbLYA==:17 a=IkcTkHD0fZMA:10 a=wP3pNCr1ah4A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=VJuunSxf47HV0C6rKqEA:9 a=QEXdDO2ut3YA:10 a=uxP6HrT_eTzRwkO_Te1X:22 X-Proofpoint-ORIG-GUID: o_i4b-dV3ZPbECIYl0tnYMAqF8qGS7We X-Proofpoint-GUID: o_i4b-dV3ZPbECIYl0tnYMAqF8qGS7We X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-12-19_03,2025-12-17_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 lowpriorityscore=0 suspectscore=0 clxscore=1015 bulkscore=0 impostorscore=0 spamscore=0 adultscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2512120000 definitions=main-2512190097 Several functions receive pointers to parsed Audioreach topology (e.g. 'struct audioreach_container', 'struct audioreach_module') and they do not modify their contents, but copy their data to send to the ADSP. Constify the pointers for self-explanatory code (pointed memory is not modified by the function) and a bit safer code. Signed-off-by: Krzysztof Kozlowski --- sound/soc/qcom/qdsp6/audioreach.c | 87 +++++++++++++++++++++--------------= ---- sound/soc/qcom/qdsp6/audioreach.h | 16 +++---- 2 files changed, 57 insertions(+), 46 deletions(-) diff --git a/sound/soc/qcom/qdsp6/audioreach.c b/sound/soc/qcom/qdsp6/audio= reach.c index b28451558974..241c3b4479c6 100644 --- a/sound/soc/qcom/qdsp6/audioreach.c +++ b/sound/soc/qcom/qdsp6/audioreach.c @@ -309,7 +309,7 @@ void audioreach_set_default_channel_mapping(u8 *ch_map,= int num_channels) EXPORT_SYMBOL_GPL(audioreach_set_default_channel_mapping); =20 static void apm_populate_container_config(struct apm_container_obj *cfg, - struct audioreach_container *cont) + const struct audioreach_container *cont) { =20 /* Container Config */ @@ -339,7 +339,7 @@ static void apm_populate_container_config(struct apm_co= ntainer_obj *cfg, } =20 static void apm_populate_sub_graph_config(struct apm_sub_graph_data *cfg, - struct audioreach_sub_graph *sg) + const struct audioreach_sub_graph *sg) { cfg->sub_graph_cfg.sub_graph_id =3D sg->sub_graph_id; cfg->sub_graph_cfg.num_sub_graph_prop =3D APM_SUB_GRAPH_CFG_NPROP; @@ -361,7 +361,7 @@ static void apm_populate_sub_graph_config(struct apm_su= b_graph_data *cfg, } =20 static void apm_populate_module_prop_obj(struct apm_mod_prop_obj *obj, - struct audioreach_module *module) + const struct audioreach_module *module) { =20 obj->instance_id =3D module->instance_id; @@ -373,7 +373,7 @@ static void apm_populate_module_prop_obj(struct apm_mod= _prop_obj *obj, } =20 static void apm_populate_module_list_obj(struct apm_mod_list_obj *obj, - struct audioreach_container *container, + const struct audioreach_container *container, int sub_graph_id) { struct audioreach_module *module; @@ -390,9 +390,10 @@ static void apm_populate_module_list_obj(struct apm_mo= d_list_obj *obj, } } =20 -static void audioreach_populate_graph(struct q6apm *apm, struct audioreach= _graph_info *info, +static void audioreach_populate_graph(struct q6apm *apm, + const struct audioreach_graph_info *info, struct apm_graph_open_params *open, - struct list_head *sg_list, + const struct list_head *sg_list, int num_sub_graphs) { struct apm_mod_conn_list_params *mc_data =3D open->mod_conn_list_data; @@ -464,7 +465,8 @@ static void audioreach_populate_graph(struct q6apm *apm= , struct audioreach_graph } } =20 -void *audioreach_alloc_graph_pkt(struct q6apm *apm, struct audioreach_grap= h_info *info) +void *audioreach_alloc_graph_pkt(struct q6apm *apm, + const struct audioreach_graph_info *info) { int payload_size, sg_sz, cont_sz, ml_sz, mp_sz, mc_sz; struct apm_module_param_data *param_data; @@ -477,7 +479,7 @@ void *audioreach_alloc_graph_pkt(struct q6apm *apm, str= uct audioreach_graph_info struct audioreach_module *module; struct audioreach_sub_graph *sgs; struct apm_mod_list_obj *mlobj; - struct list_head *sg_list; + const struct list_head *sg_list; int num_connections =3D 0; int num_containers =3D 0; int num_sub_graphs =3D 0; @@ -630,8 +632,8 @@ int audioreach_graph_send_cmd_sync(struct q6apm_graph *= graph, struct gpr_pkt *pk EXPORT_SYMBOL_GPL(audioreach_graph_send_cmd_sync); =20 static int audioreach_display_port_set_media_format(struct q6apm_graph *gr= aph, - struct audioreach_module *module, - struct audioreach_module_config *cfg) + const struct audioreach_module *module, + const struct audioreach_module_config *cfg) { struct apm_display_port_module_intf_cfg *intf_cfg; struct apm_module_frame_size_factor_cfg *fs_cfg; @@ -687,8 +689,8 @@ static int audioreach_display_port_set_media_format(str= uct q6apm_graph *graph, =20 /* LPASS Codec DMA port Module Media Format Setup */ static int audioreach_codec_dma_set_media_format(struct q6apm_graph *graph, - struct audioreach_module *module, - struct audioreach_module_config *cfg) + const struct audioreach_module *module, + const struct audioreach_module_config *cfg) { struct apm_codec_dma_module_intf_cfg *intf_cfg; struct apm_module_frame_size_factor_cfg *fs_cfg; @@ -753,7 +755,8 @@ static int audioreach_codec_dma_set_media_format(struct= q6apm_graph *graph, return q6apm_send_cmd_sync(graph->apm, pkt, 0); } =20 -int audioreach_send_u32_param(struct q6apm_graph *graph, struct audioreach= _module *module, +int audioreach_send_u32_param(struct q6apm_graph *graph, + const struct audioreach_module *module, uint32_t param_id, uint32_t param_val) { struct apm_module_param_data *param_data; @@ -782,36 +785,37 @@ int audioreach_send_u32_param(struct q6apm_graph *gra= ph, struct audioreach_modul EXPORT_SYMBOL_GPL(audioreach_send_u32_param); =20 static int audioreach_sal_limiter_enable(struct q6apm_graph *graph, - struct audioreach_module *module, bool enable) + const struct audioreach_module *module, + bool enable) { return audioreach_send_u32_param(graph, module, PARAM_ID_SAL_LIMITER_ENAB= LE, enable); } =20 static int audioreach_sal_set_media_format(struct q6apm_graph *graph, - struct audioreach_module *module, - struct audioreach_module_config *cfg) + const struct audioreach_module *module, + const struct audioreach_module_config *cfg) { return audioreach_send_u32_param(graph, module, PARAM_ID_SAL_OUTPUT_CFG, = cfg->bit_width); } =20 static int audioreach_module_enable(struct q6apm_graph *graph, - struct audioreach_module *module, + const struct audioreach_module *module, bool enable) { return audioreach_send_u32_param(graph, module, PARAM_ID_MODULE_ENABLE, e= nable); } =20 static int audioreach_gapless_set_media_format(struct q6apm_graph *graph, - struct audioreach_module *module, - struct audioreach_module_config *cfg) + const struct audioreach_module *module, + const struct audioreach_module_config *cfg) { return audioreach_send_u32_param(graph, module, PARAM_ID_EARLY_EOS_DELAY, EARLY_EOS_DELAY_MS); } =20 static int audioreach_set_module_config(struct q6apm_graph *graph, - struct audioreach_module *module, - struct audioreach_module_config *cfg) + const struct audioreach_module *module, + const struct audioreach_module_config *cfg) { int size =3D le32_to_cpu(module->data->size); void *p; @@ -828,8 +832,8 @@ static int audioreach_set_module_config(struct q6apm_gr= aph *graph, } =20 static int audioreach_mfc_set_media_format(struct q6apm_graph *graph, - struct audioreach_module *module, - struct audioreach_module_config *cfg) + const struct audioreach_module *module, + const struct audioreach_module_config *cfg) { struct apm_module_param_data *param_data; struct param_id_mfc_media_format *media_format; @@ -863,7 +867,8 @@ static int audioreach_mfc_set_media_format(struct q6apm= _graph *graph, } =20 static int audioreach_set_compr_media_format(struct media_format *media_fm= t_hdr, - void *p, struct audioreach_module_config *mcfg) + void *p, + const struct audioreach_module_config *mcfg) { struct payload_media_fmt_aac_t *aac_cfg; struct payload_media_fmt_pcm *mp3_cfg; @@ -944,7 +949,8 @@ static int audioreach_set_compr_media_format(struct med= ia_format *media_fmt_hdr, return 0; } =20 -int audioreach_compr_set_param(struct q6apm_graph *graph, struct audioreac= h_module_config *mcfg) +int audioreach_compr_set_param(struct q6apm_graph *graph, + const struct audioreach_module_config *mcfg) { struct media_format *header; int rc; @@ -969,8 +975,8 @@ int audioreach_compr_set_param(struct q6apm_graph *grap= h, struct audioreach_modu EXPORT_SYMBOL_GPL(audioreach_compr_set_param); =20 static int audioreach_i2s_set_media_format(struct q6apm_graph *graph, - struct audioreach_module *module, - struct audioreach_module_config *cfg) + const struct audioreach_module *module, + const struct audioreach_module_config *cfg) { struct apm_module_frame_size_factor_cfg *fs_cfg; struct apm_module_param_data *param_data; @@ -1037,7 +1043,7 @@ static int audioreach_i2s_set_media_format(struct q6a= pm_graph *graph, } =20 static int audioreach_logging_set_media_format(struct q6apm_graph *graph, - struct audioreach_module *module) + const struct audioreach_module *module) { struct apm_module_param_data *param_data; struct data_logging_config *cfg; @@ -1066,8 +1072,8 @@ static int audioreach_logging_set_media_format(struct= q6apm_graph *graph, } =20 static int audioreach_pcm_set_media_format(struct q6apm_graph *graph, - struct audioreach_module *module, - struct audioreach_module_config *mcfg) + const struct audioreach_module *module, + const struct audioreach_module_config *mcfg) { struct payload_pcm_output_format_cfg *media_cfg; uint32_t num_channels =3D mcfg->num_channels; @@ -1113,8 +1119,8 @@ static int audioreach_pcm_set_media_format(struct q6a= pm_graph *graph, } =20 static int audioreach_shmem_set_media_format(struct q6apm_graph *graph, - struct audioreach_module *module, - struct audioreach_module_config *mcfg) + const struct audioreach_module *module, + const struct audioreach_module_config *mcfg) { uint32_t num_channels =3D mcfg->num_channels; struct apm_module_param_data *param_data; @@ -1170,7 +1176,8 @@ static int audioreach_shmem_set_media_format(struct q= 6apm_graph *graph, return audioreach_graph_send_cmd_sync(graph, pkt, 0); } =20 -int audioreach_gain_set_vol_ctrl(struct q6apm *apm, struct audioreach_modu= le *module, int vol) +int audioreach_gain_set_vol_ctrl(struct q6apm *apm, + const struct audioreach_module *module, int vol) { struct param_id_vol_ctrl_master_gain *cfg; struct apm_module_param_data *param_data; @@ -1195,7 +1202,8 @@ int audioreach_gain_set_vol_ctrl(struct q6apm *apm, s= truct audioreach_module *mo } EXPORT_SYMBOL_GPL(audioreach_gain_set_vol_ctrl); =20 -static int audioreach_gain_set(struct q6apm_graph *graph, struct audioreac= h_module *module) +static int audioreach_gain_set(struct q6apm_graph *graph, + const struct audioreach_module *module) { struct apm_module_param_data *param_data; struct apm_gain_module_cfg *cfg; @@ -1218,7 +1226,7 @@ static int audioreach_gain_set(struct q6apm_graph *gr= aph, struct audioreach_modu } =20 static int audioreach_speaker_protection(struct q6apm_graph *graph, - struct audioreach_module *module, + const struct audioreach_module *module, uint32_t operation_mode) { return audioreach_send_u32_param(graph, module, PARAM_ID_SP_OP_MODE, @@ -1226,8 +1234,8 @@ static int audioreach_speaker_protection(struct q6apm= _graph *graph, } =20 static int audioreach_speaker_protection_vi(struct q6apm_graph *graph, - struct audioreach_module *module, - struct audioreach_module_config *mcfg) + const struct audioreach_module *module, + const struct audioreach_module_config *mcfg) { u32 num_channels =3D mcfg->num_channels; struct apm_module_sp_vi_op_mode_cfg *op_cfg; @@ -1304,8 +1312,9 @@ static int audioreach_speaker_protection_vi(struct q6= apm_graph *graph, return rc; } =20 -int audioreach_set_media_format(struct q6apm_graph *graph, struct audiorea= ch_module *module, - struct audioreach_module_config *cfg) +int audioreach_set_media_format(struct q6apm_graph *graph, + const struct audioreach_module *module, + const struct audioreach_module_config *cfg) { int rc; =20 diff --git a/sound/soc/qcom/qdsp6/audioreach.h b/sound/soc/qcom/qdsp6/audio= reach.h index 03cfd32f1d0c..89f172aab8c0 100644 --- a/sound/soc/qcom/qdsp6/audioreach.h +++ b/sound/soc/qcom/qdsp6/audioreach.h @@ -831,8 +831,8 @@ void *audioreach_alloc_apm_pkt(int pkt_size, uint32_t o= pcode, uint32_t token, void *audioreach_alloc_pkt(int payload_size, uint32_t opcode, uint32_t token, uint32_t src_port, uint32_t dest_port); -void *audioreach_alloc_graph_pkt(struct q6apm *apm, struct audioreach_grap= h_info - *info); +void *audioreach_alloc_graph_pkt(struct q6apm *apm, + const struct audioreach_graph_info *info); /* Topology specific */ int audioreach_tplg_init(struct snd_soc_component *component); =20 @@ -848,13 +848,15 @@ int audioreach_send_cmd_sync(struct device *dev, gpr_= device_t *gdev, struct gpr_ int audioreach_graph_send_cmd_sync(struct q6apm_graph *graph, struct gpr_p= kt *pkt, uint32_t rsp_opcode); int audioreach_set_media_format(struct q6apm_graph *graph, - struct audioreach_module *module, - struct audioreach_module_config *cfg); + const struct audioreach_module *module, + const struct audioreach_module_config *cfg); int audioreach_shared_memory_send_eos(struct q6apm_graph *graph); int audioreach_gain_set_vol_ctrl(struct q6apm *apm, - struct audioreach_module *module, int vol); -int audioreach_send_u32_param(struct q6apm_graph *graph, struct audioreach= _module *module, + const struct audioreach_module *module, int vol); +int audioreach_send_u32_param(struct q6apm_graph *graph, + const struct audioreach_module *module, uint32_t param_id, uint32_t param_val); -int audioreach_compr_set_param(struct q6apm_graph *graph, struct audioreac= h_module_config *mcfg); +int audioreach_compr_set_param(struct q6apm_graph *graph, + const struct audioreach_module_config *mcfg); =20 #endif /* __AUDIOREACH_H__ */ --=20 2.51.0