From nobody Wed Feb 11 17:46:21 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA95CC6FD1F for ; Mon, 13 Mar 2023 15:51:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231203AbjCMPvA (ORCPT ); Mon, 13 Mar 2023 11:51:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229682AbjCMPuo (ORCPT ); Mon, 13 Mar 2023 11:50:44 -0400 Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 278DD763E1 for ; Mon, 13 Mar 2023 08:50:28 -0700 (PDT) Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32DEPFBp004637; Mon, 13 Mar 2023 10:50:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=EKnDAwCfy9GRT/qvjYxeHgVu90MN/3twhG33D7PV3Pw=; b=NS/ntbzH4HCsPxd7bmjNmfoTumqRxtwPd7iHUhGciv8lq1+yqS5AvMZeL1s32zN8BgTo aSRUrUWI/NDt+2EJSKgrbUtVFDnoBOJ7rHgE2DGfkPtbwd7B49XPWwdB8tOvXvJvvV5z hUTWvFI4ZucqoaNY79Oi2HXEQCXIzZZlfRsVrnP9DGL/2pKFBLB6X+Y4c3B9V6cQfx4G JwQJ29rIERy67CvoiGuzA8TJstpPG5/8PhKWw+ACgzDELwAte8AsZ7daAHZj8bcDJGL8 X3W8KU6QuMjnoCLRRL0tQ73JfoxFrf3Uow5rlEF7c0dFsQXZ8Xv92VC4j+/LgDzTiYfA rQ== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3p8qx7b4rb-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 Mar 2023 10:50:09 -0500 Received: from ediex02.ad.cirrus.com (198.61.84.81) by ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.25; Mon, 13 Mar 2023 10:50:06 -0500 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by anon-ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server id 15.2.1118.25 via Frontend Transport; Mon, 13 Mar 2023 10:50:06 -0500 Received: from EDIN4L06LR3.ad.cirrus.com (EDIN4L06LR3.ad.cirrus.com [198.61.64.92]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 9572511DA; Mon, 13 Mar 2023 15:50:06 +0000 (UTC) From: Richard Fitzgerald To: , CC: , , , , , Simon Trimmer , Richard Fitzgerald Subject: [PATCH v2 6/8] ASoC: wm_adsp: Add support for loading bin files without wmfw Date: Mon, 13 Mar 2023 15:49:53 +0000 Message-ID: <20230313154955.4268-7-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230313154955.4268-1-rf@opensource.cirrus.com> References: <20230313154955.4268-1-rf@opensource.cirrus.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: r80ChljotridLvBZ7au1qFnLzP7N3RCN X-Proofpoint-GUID: r80ChljotridLvBZ7au1qFnLzP7N3RCN X-Proofpoint-Spam-Reason: safe Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Simon Trimmer A self-booted DSP may have a file of coefficients to apply to the device even when there is no firmware to download. Signed-off-by: Simon Trimmer Signed-off-by: Richard Fitzgerald --- sound/soc/codecs/wm_adsp.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index d4bffa2f7005..c23c306dc38d 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -850,8 +850,29 @@ static int wm_adsp_request_firmware_files(struct wm_ad= sp *dsp, return 0; } =20 - if (dsp->wmfw_optional) + if (dsp->wmfw_optional) { + if (system_name) { + if (asoc_component_prefix) + wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename, + cirrus_dir, system_name, + asoc_component_prefix, "bin"); + + if (!*coeff_firmware) + wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename, + cirrus_dir, system_name, + NULL, "bin"); + } + + if (!*coeff_firmware) + wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename, + "", NULL, NULL, "bin"); + + if (!*coeff_firmware) + wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename, + cirrus_dir, NULL, NULL, "bin"); + return 0; + } =20 adsp_err(dsp, "Failed to request firmware <%s>%s-%s-%s<-%s<%s>>.wmfw\n", cirrus_dir, dsp->part, dsp->fwf_name, wm_adsp_fw[dsp->fw].file, --=20 2.30.2