Skip to content

Commit 29c1d6a

Browse files
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>
1 parent 4779570 commit 29c1d6a

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

sound/soc/sof/amd/acp7x.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ int sof_acp7x_ops_init(struct snd_sof_dev *sdev)
149149
{
150150
struct pci_dev *pci = to_pci_dev(sdev->dev);
151151
const union acpi_object *obj;
152+
int acp_sof_signed_firmware_image = 0;
152153
int acp_sof_post_fw_run_delay = 0;
153154

154155
/* common defaults */
@@ -159,6 +160,13 @@ int sof_acp7x_ops_init(struct snd_sof_dev *sdev)
159160
sof_acp7x_ops.probe = amd_sof_acp7x_probe;
160161
sof_acp7x_ops.remove = amd_sof_acp7x_remove;
161162

163+
if (!acpi_dev_get_property(ACPI_COMPANION(&pci->dev), "acp-sof-signed-firmware-image",
164+
ACPI_TYPE_INTEGER, &obj))
165+
acp_sof_signed_firmware_image = obj->integer.value;
166+
167+
if (acp_sof_signed_firmware_image)
168+
sof_acp7x_ops.load_firmware = acp_sof_load_signed_firmware;
169+
162170
if (!acpi_dev_get_property(ACPI_COMPANION(&pci->dev), "acp-sof-post_fw_run_delay",
163171
ACPI_TYPE_INTEGER, &obj))
164172
acp_sof_post_fw_run_delay = obj->integer.value;

0 commit comments

Comments
 (0)