Skip to content

Commit 4aeeaad

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 641a85c commit 4aeeaad

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 acpi_device *adev = ACPI_COMPANION(&to_pci_dev(sdev->dev)->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 */
@@ -160,11 +161,18 @@ int sof_acp7x_ops_init(struct snd_sof_dev *sdev)
160161
sof_acp7x_ops.remove = amd_sof_acp7x_remove;
161162

162163
if (adev) {
164+
if (!acpi_dev_get_property(adev, "acp-sof-signed-firmware-image",
165+
ACPI_TYPE_INTEGER, &obj))
166+
acp_sof_signed_firmware_image = obj->integer.value;
167+
163168
if (!acpi_dev_get_property(adev, "acp-sof-post_fw_run_delay",
164169
ACPI_TYPE_INTEGER, &obj))
165170
acp_sof_post_fw_run_delay = obj->integer.value;
166171
}
167172

173+
if (acp_sof_signed_firmware_image)
174+
sof_acp7x_ops.load_firmware = acp_sof_load_signed_firmware;
175+
168176
if (acp_sof_post_fw_run_delay)
169177
sof_acp7x_ops.post_fw_run = sof_acp7x_post_fw_run_delay;
170178

0 commit comments

Comments
 (0)