summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVijendar Mukunda <Vijendar.Mukunda@amd.com>2026-07-01 15:25:13 +0530
committerMark Brown <broonie@kernel.org>2026-07-03 17:31:08 +0100
commit7af6ac41cd470b04ebd1d2ee972159f2dd5be7cd (patch)
treefe540c421e362d84db33a6c66d02c0f1007670a7
parentd0c32fdc1907b95e57b26467052f5f4bea9f4273 (diff)
ASoC: SOF: amd: wire signed firmware load callback for ACP7x via ACPI
Read ACPI property acp-sof-signed-firmware-image in sof_acp7x_ops_init() and register acp_sof_load_signed_firmware as the load_firmware callback only when the property is set. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20260701095759.1012929-13-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/sof/amd/acp7x.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/sof/amd/acp7x.c b/sound/soc/sof/amd/acp7x.c
index c1b9c623bc39..94b7ea08b309 100644
--- a/sound/soc/sof/amd/acp7x.c
+++ b/sound/soc/sof/amd/acp7x.c
@@ -149,6 +149,7 @@ int sof_acp7x_ops_init(struct snd_sof_dev *sdev)
{
struct acpi_device *adev = ACPI_COMPANION(&to_pci_dev(sdev->dev)->dev);
const union acpi_object *obj;
+ int acp_sof_signed_firmware_image = 0;
int acp_sof_post_fw_run_delay = 0;
/* common defaults */
@@ -160,11 +161,18 @@ int sof_acp7x_ops_init(struct snd_sof_dev *sdev)
sof_acp7x_ops.remove = amd_sof_acp7x_remove;
if (adev) {
+ if (!acpi_dev_get_property(adev, "acp-sof-signed-firmware-image",
+ ACPI_TYPE_INTEGER, &obj))
+ acp_sof_signed_firmware_image = obj->integer.value;
+
if (!acpi_dev_get_property(adev, "acp-sof-post_fw_run_delay",
ACPI_TYPE_INTEGER, &obj))
acp_sof_post_fw_run_delay = obj->integer.value;
}
+ if (acp_sof_signed_firmware_image)
+ sof_acp7x_ops.load_firmware = acp_sof_load_signed_firmware;
+
if (acp_sof_post_fw_run_delay)
sof_acp7x_ops.post_fw_run = sof_acp7x_post_fw_run_delay;