Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Kconfig.sof
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,18 @@ config SOF_OS_LINUX_COMPAT_PRIORITY
as the default SOF build targets the Linux SOF driver, it is
disabled by app/internal_ci_overlay.conf.

config SOF_UAOL_ALWAYS_ENABLED
bool "Report UAOL capabilities without host confirmation"
help
The UAOL capabilities are only read and reported in HW_CONFIG
after the host confirmed with an IPC4_UAOL_SUPPORT FW_CONFIG set
that the UAOL registers can be accessed, as accessing them causes
a DSP panic with hosts not enabling UAOL (Linux 7.0 and older).
Select this to report the UAOL capabilities unconditionally, for
hosts which enable UAOL but do not send IPC4_UAOL_SUPPORT. Has no
effect without UAOL_INTEL_ADSP. It is enabled by
app/internal_ci_overlay.conf.

rsource "Kconfig.xtos"

rsource "src/Kconfig"
Expand Down
3 changes: 3 additions & 0 deletions app/boards/intel_adsp/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ config INTEL_ADSP_TIMER
config MM_DRV
default y

config UAOL
default y if ACE


# # Zephyr / power settings
# ----------------------------------------
Expand Down
7 changes: 3 additions & 4 deletions app/internal_ci_overlay.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
# that support them.
CONFIG_SOF_OS_LINUX_COMPAT_PRIORITY=n

# Enable USB Audio Offload Link (UAOL) support. It is disabled by
# default as Linux 7.0 and older do not enable UAOL access and
# reading the UAOL capabilities would cause a DSP panic.
CONFIG_UAOL=y
# Report the UAOL capabilities without waiting for the host to
# confirm the UAOL support with an IPC4_UAOL_SUPPORT FW_CONFIG set.
CONFIG_SOF_UAOL_ALWAYS_ENABLED=y
9 changes: 0 additions & 9 deletions app/uaol_overlay.conf

This file was deleted.

30 changes: 26 additions & 4 deletions src/kernel/audio/base_fw_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ STATIC_ASSERT(sizeof(struct ipc4_modules_info) < SOF_IPC_MSG_MAX_SIZE,

LOG_MODULE_REGISTER(basefw_intel, CONFIG_SOF_LOG_LEVEL);

#if CONFIG_UAOL_INTEL_ADSP
/*
* Set when the host confirms with an IPC4_UAOL_SUPPORT FW_CONFIG set that
* the UAOL registers can be accessed. Older hosts do not enable UAOL and
* accessing the UAOL registers (reading the capabilities) causes a DSP
* panic with them.
*/
static bool uaol_host_enabled;
#endif

__cold int basefw_vendor_fw_config(uint32_t *data_offset, char *data)
{
struct sof_tlv *tuple = (struct sof_tlv *)data;
Expand Down Expand Up @@ -133,12 +143,14 @@ __cold int basefw_vendor_hw_config(uint32_t *data_offset, char *data)

/* Linux 7.0 and older do not enable UAOL for any Intel
* hardware, so below capability check will lead to a DSP
* panic. UAOL is therefore disabled by default and must be
* enabled explicitly with CONFIG_UAOL.
* panic. Only report the capabilities if the host enabled
* the UAOL access or the firmware is built to always report them.
*/
#if CONFIG_UAOL_INTEL_ADSP
tuple = tlv_next(tuple);
tlv_value_set_uaol_caps(tuple, IPC4_UAOL_CAPS_HW_CFG);
if (uaol_host_enabled || IS_ENABLED(CONFIG_SOF_UAOL_ALWAYS_ENABLED)) {
tuple = tlv_next(tuple);
tlv_value_set_uaol_caps(tuple, IPC4_UAOL_CAPS_HW_CFG);
}
#endif

tuple = tlv_next(tuple);
Expand Down Expand Up @@ -429,6 +441,16 @@ __cold static int basefw_set_fw_config(bool first_block, bool last_block,
return IPC4_INVALID_CONFIG_DATA_LEN;
}
return fw_config_set_force_l1_exit(tlv);
#if CONFIG_UAOL_INTEL_ADSP
case IPC4_UAOL_SUPPORT:
if (tlv->length < sizeof(uint32_t)) {
tr_err(&basefw_comp_tr, "UAOL_SUPPORT value too small: %u", tlv->length);
return IPC4_INVALID_CONFIG_DATA_LEN;
}
uaol_host_enabled = !!tlv->value[0];
tr_info(&basefw_comp_tr, "FW config set UAOL host support: %u", uaol_host_enabled);
return 0;
#endif
default:
break;
}
Expand Down
Loading