ASoC: SOF: misc fixes
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>: We somehow missed the default path for DSP libraries for LNL, and need to restrict support for D0i3 w/ IPC4. Also add debugfs support for firmware profile information so that sof-test scripts can show what is being tested.
This commit is contained in:
commit
a93830a9e0
|
@ -330,14 +330,32 @@ EXPORT_SYMBOL_GPL(snd_sof_dbg_memory_info_init);
|
||||||
|
|
||||||
int snd_sof_dbg_init(struct snd_sof_dev *sdev)
|
int snd_sof_dbg_init(struct snd_sof_dev *sdev)
|
||||||
{
|
{
|
||||||
|
struct snd_sof_pdata *plat_data = sdev->pdata;
|
||||||
struct snd_sof_dsp_ops *ops = sof_ops(sdev);
|
struct snd_sof_dsp_ops *ops = sof_ops(sdev);
|
||||||
const struct snd_sof_debugfs_map *map;
|
const struct snd_sof_debugfs_map *map;
|
||||||
|
struct dentry *fw_profile;
|
||||||
int i;
|
int i;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
/* use "sof" as top level debugFS dir */
|
/* use "sof" as top level debugFS dir */
|
||||||
sdev->debugfs_root = debugfs_create_dir("sof", NULL);
|
sdev->debugfs_root = debugfs_create_dir("sof", NULL);
|
||||||
|
|
||||||
|
/* expose firmware/topology prefix/names for test purposes */
|
||||||
|
fw_profile = debugfs_create_dir("fw_profile", sdev->debugfs_root);
|
||||||
|
|
||||||
|
debugfs_create_str("fw_path", 0444, fw_profile,
|
||||||
|
(char **)&plat_data->fw_filename_prefix);
|
||||||
|
debugfs_create_str("fw_lib_path", 0444, fw_profile,
|
||||||
|
(char **)&plat_data->fw_lib_prefix);
|
||||||
|
debugfs_create_str("tplg_path", 0444, fw_profile,
|
||||||
|
(char **)&plat_data->tplg_filename_prefix);
|
||||||
|
debugfs_create_str("fw_name", 0444, fw_profile,
|
||||||
|
(char **)&plat_data->fw_filename);
|
||||||
|
debugfs_create_str("tplg_name", 0444, fw_profile,
|
||||||
|
(char **)&plat_data->tplg_filename);
|
||||||
|
debugfs_create_u32("ipc_type", 0444, fw_profile,
|
||||||
|
(u32 *)&plat_data->ipc_type);
|
||||||
|
|
||||||
/* init dfsentry list */
|
/* init dfsentry list */
|
||||||
INIT_LIST_HEAD(&sdev->dfsentry_list);
|
INIT_LIST_HEAD(&sdev->dfsentry_list);
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,9 @@ static const struct sof_dev_desc lnl_desc = {
|
||||||
.default_fw_path = {
|
.default_fw_path = {
|
||||||
[SOF_IPC_TYPE_4] = "intel/sof-ipc4/lnl",
|
[SOF_IPC_TYPE_4] = "intel/sof-ipc4/lnl",
|
||||||
},
|
},
|
||||||
|
.default_lib_path = {
|
||||||
|
[SOF_IPC_TYPE_4] = "intel/sof-ipc4-lib/lnl",
|
||||||
|
},
|
||||||
.default_tplg_path = {
|
.default_tplg_path = {
|
||||||
[SOF_IPC_TYPE_4] = "intel/sof-ipc4-tplg",
|
[SOF_IPC_TYPE_4] = "intel/sof-ipc4-tplg",
|
||||||
},
|
},
|
||||||
|
|
|
@ -434,4 +434,5 @@ const struct sof_ipc_pcm_ops ipc3_pcm_ops = {
|
||||||
.trigger = sof_ipc3_pcm_trigger,
|
.trigger = sof_ipc3_pcm_trigger,
|
||||||
.dai_link_fixup = sof_ipc3_pcm_dai_link_fixup,
|
.dai_link_fixup = sof_ipc3_pcm_dai_link_fixup,
|
||||||
.reset_hw_params_during_stop = true,
|
.reset_hw_params_during_stop = true,
|
||||||
|
.d0i3_supported_in_s0ix = true,
|
||||||
};
|
};
|
||||||
|
|
|
@ -325,14 +325,13 @@ static int sof_pcm_trigger(struct snd_soc_component *component,
|
||||||
ipc_first = true;
|
ipc_first = true;
|
||||||
break;
|
break;
|
||||||
case SNDRV_PCM_TRIGGER_SUSPEND:
|
case SNDRV_PCM_TRIGGER_SUSPEND:
|
||||||
if (sdev->system_suspend_target == SOF_SUSPEND_S0IX &&
|
/*
|
||||||
|
* If DSP D0I3 is allowed during S0iX, set the suspend_ignored flag for
|
||||||
|
* D0I3-compatible streams to keep the firmware pipeline running
|
||||||
|
*/
|
||||||
|
if (pcm_ops && pcm_ops->d0i3_supported_in_s0ix &&
|
||||||
|
sdev->system_suspend_target == SOF_SUSPEND_S0IX &&
|
||||||
spcm->stream[substream->stream].d0i3_compatible) {
|
spcm->stream[substream->stream].d0i3_compatible) {
|
||||||
/*
|
|
||||||
* trap the event, not sending trigger stop to
|
|
||||||
* prevent the FW pipelines from being stopped,
|
|
||||||
* and mark the flag to ignore the upcoming DAPM
|
|
||||||
* PM events.
|
|
||||||
*/
|
|
||||||
spcm->stream[substream->stream].suspend_ignored = true;
|
spcm->stream[substream->stream].suspend_ignored = true;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,6 +116,7 @@ struct snd_sof_dai_config_data {
|
||||||
* triggers. The FW keeps the host DMA running in this case and
|
* triggers. The FW keeps the host DMA running in this case and
|
||||||
* therefore the host must do the same and should stop the DMA during
|
* therefore the host must do the same and should stop the DMA during
|
||||||
* hw_free.
|
* hw_free.
|
||||||
|
* @d0i3_supported_in_s0ix: Allow DSP D0I3 during S0iX
|
||||||
*/
|
*/
|
||||||
struct sof_ipc_pcm_ops {
|
struct sof_ipc_pcm_ops {
|
||||||
int (*hw_params)(struct snd_soc_component *component, struct snd_pcm_substream *substream,
|
int (*hw_params)(struct snd_soc_component *component, struct snd_pcm_substream *substream,
|
||||||
|
@ -135,6 +136,7 @@ struct sof_ipc_pcm_ops {
|
||||||
bool reset_hw_params_during_stop;
|
bool reset_hw_params_during_stop;
|
||||||
bool ipc_first_on_start;
|
bool ipc_first_on_start;
|
||||||
bool platform_stop_during_hw_free;
|
bool platform_stop_during_hw_free;
|
||||||
|
bool d0i3_supported_in_s0ix;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue