armbian-build/patch/kernel/archive/sm8250-6.18/0007-Asoc-wm_adsp-Add-prefix-support.patch
Jiali Chen e46899dff3 patch: sm8250: current: add some patches
From https://gitlab.postmarketos.org/soc/qualcomm-sm8250/linux/-/commits/6.17.0?ref_type=HEADS

Made some modifications to be compatible with the latest kernel.

Signed-off-by: CodeChenL <2540735020@qq.com>
2026-01-25 13:27:26 +01:00

46 lines
1.6 KiB
Diff

From eee00c8ad09457cbecb32563d00f4bcaa31a3e55 Mon Sep 17 00:00:00 2001
From: Jianhua Lu <lujianhua000@gmail.com>
Date: Wed, 29 Mar 2023 19:38:33 +0800
Subject: [PATCH 07/62] Asoc: wm_adsp: Add prefix support
Signed-off-by: Jiali Chen <chenjiali@radxa.com>
---
sound/soc/codecs/wm_adsp.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 8a1d5cc75d6c..80785f0eee59 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -741,6 +741,10 @@ static int wm_adsp_request_firmware_file(struct wm_adsp *dsp,
*filename = kasprintf(GFP_KERNEL, "%s%s-%s-%s-%s.%s", dir, dsp->part,
fwf, wm_adsp_fw[dsp->fw].file, system_name,
filetype);
+ else if (asoc_component_prefix)
+ *filename = kasprintf(GFP_KERNEL, "%s%s-%s-%s-%s.%s", dir, dsp->part,
+ fwf, wm_adsp_fw[dsp->fw].file, asoc_component_prefix,
+ filetype);
else
*filename = kasprintf(GFP_KERNEL, "%s%s-%s-%s.%s", dir, dsp->part, fwf,
wm_adsp_fw[dsp->fw].file, filetype);
@@ -815,6 +819,16 @@ static int wm_adsp_request_firmware_files(struct wm_adsp *dsp,
NULL, "bin");
return 0;
}
+ } else if (suffix) {
+ if (!wm_adsp_request_firmware_file(dsp, wmfw_firmware, wmfw_filename,
+ cirrus_dir, NULL,
+ NULL, "wmfw")) {
+ adsp_dbg(dsp, "Found '%s'\n", *wmfw_filename);
+ wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename,
+ cirrus_dir, NULL,
+ suffix, "bin");
+ return 0;
+ }
}
/* Check system-specific bin without wmfw before falling back to generic */
--
2.47.3