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>
This commit is contained in:
Vijendar Mukunda 2026-07-01 15:25:13 +05:30 committed by Mark Brown
parent d0c32fdc19
commit 7af6ac41cd
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -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;