mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
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:
parent
d0c32fdc19
commit
7af6ac41cd
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user