Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query FW config to reload library #4680

Merged
merged 3 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
6 changes: 6 additions & 0 deletions include/sound/sof/ipc4/header.h
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,12 @@ enum sof_ipc4_fw_config_params {
SOF_IPC4_FW_CFG_RESERVED,
SOF_IPC4_FW_CFG_POWER_GATING_POLICY,
SOF_IPC4_FW_CFG_ASSERT_MODE,
SOF_IPC4_FW_RESERVED1,
SOF_IPC4_FW_RESERVED2,
SOF_IPC4_FW_RESERVED3,
SOF_IPC4_FW_RESERVED4,
SOF_IPC4_FW_RESERVED5,
SOF_IPC4_FW_CONTEXT_SAVE
};

struct sof_ipc4_fw_version {
Expand Down
2 changes: 2 additions & 0 deletions sound/soc/sof/intel/lnl.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ int sof_lnl_ops_init(struct snd_sof_dev *sdev)

ipc4_data->mtrace_type = SOF_IPC4_MTRACE_INTEL_CAVS_2;

ipc4_data->fw_context_save = true;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need the default value to be true?

Copy link
Author

@RanderWang RanderWang Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is for ref fw which supports it by default. Thanks @ujfalusi mentioned it for several times :)


/* External library loading support */
ipc4_data->load_library = hda_dsp_ipc4_load_library;

Expand Down
2 changes: 2 additions & 0 deletions sound/soc/sof/intel/mtl.c
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,8 @@ int sof_mtl_ops_init(struct snd_sof_dev *sdev)

ipc4_data->mtrace_type = SOF_IPC4_MTRACE_INTEL_CAVS_2;

ipc4_data->fw_context_save = true;

RanderWang marked this conversation as resolved.
Show resolved Hide resolved
/* External library loading support */
ipc4_data->load_library = hda_dsp_ipc4_load_library;

Expand Down
2 changes: 2 additions & 0 deletions sound/soc/sof/intel/tgl.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ int sof_tgl_ops_init(struct snd_sof_dev *sdev)

ipc4_data->mtrace_type = SOF_IPC4_MTRACE_INTEL_CAVS_2;

ipc4_data->fw_context_save = true;

RanderWang marked this conversation as resolved.
Show resolved Hide resolved
/* External library loading support */
ipc4_data->load_library = hda_dsp_ipc4_load_library;

Expand Down
3 changes: 3 additions & 0 deletions sound/soc/sof/ipc4-loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,9 @@ int sof_ipc4_query_fw_configuration(struct snd_sof_dev *sdev)
goto out;
}
break;
case SOF_IPC4_FW_CONTEXT_SAVE:
ipc4_data->fw_context_save = *tuple->value;
RanderWang marked this conversation as resolved.
Show resolved Hide resolved
break;
default:
break;
}
Expand Down
1 change: 1 addition & 0 deletions sound/soc/sof/ipc4-priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ struct sof_ipc4_fw_data {
u32 mtrace_log_bytes;
int max_num_pipelines;
u32 max_libs_count;
bool fw_context_save;

int (*load_library)(struct snd_sof_dev *sdev,
struct sof_ipc4_fw_library *fw_lib, bool reload);
Expand Down