Skip to content

Commit a93830a

Browse files
committed
ASoC: SOF: misc fixes
Merge series from Pierre-Louis Bossart <[email protected]>: 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.
2 parents 140e076 + 17f4041 commit a93830a

File tree

5 files changed

+30
-7
lines changed

5 files changed

+30
-7
lines changed

sound/soc/sof/debug.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,14 +330,32 @@ EXPORT_SYMBOL_GPL(snd_sof_dbg_memory_info_init);
330330

331331
int snd_sof_dbg_init(struct snd_sof_dev *sdev)
332332
{
333+
struct snd_sof_pdata *plat_data = sdev->pdata;
333334
struct snd_sof_dsp_ops *ops = sof_ops(sdev);
334335
const struct snd_sof_debugfs_map *map;
336+
struct dentry *fw_profile;
335337
int i;
336338
int err;
337339

338340
/* use "sof" as top level debugFS dir */
339341
sdev->debugfs_root = debugfs_create_dir("sof", NULL);
340342

343+
/* expose firmware/topology prefix/names for test purposes */
344+
fw_profile = debugfs_create_dir("fw_profile", sdev->debugfs_root);
345+
346+
debugfs_create_str("fw_path", 0444, fw_profile,
347+
(char **)&plat_data->fw_filename_prefix);
348+
debugfs_create_str("fw_lib_path", 0444, fw_profile,
349+
(char **)&plat_data->fw_lib_prefix);
350+
debugfs_create_str("tplg_path", 0444, fw_profile,
351+
(char **)&plat_data->tplg_filename_prefix);
352+
debugfs_create_str("fw_name", 0444, fw_profile,
353+
(char **)&plat_data->fw_filename);
354+
debugfs_create_str("tplg_name", 0444, fw_profile,
355+
(char **)&plat_data->tplg_filename);
356+
debugfs_create_u32("ipc_type", 0444, fw_profile,
357+
(u32 *)&plat_data->ipc_type);
358+
341359
/* init dfsentry list */
342360
INIT_LIST_HEAD(&sdev->dfsentry_list);
343361

sound/soc/sof/intel/pci-lnl.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ static const struct sof_dev_desc lnl_desc = {
3535
.default_fw_path = {
3636
[SOF_IPC_TYPE_4] = "intel/sof-ipc4/lnl",
3737
},
38+
.default_lib_path = {
39+
[SOF_IPC_TYPE_4] = "intel/sof-ipc4-lib/lnl",
40+
},
3841
.default_tplg_path = {
3942
[SOF_IPC_TYPE_4] = "intel/sof-ipc4-tplg",
4043
},

sound/soc/sof/ipc3-pcm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,4 +434,5 @@ const struct sof_ipc_pcm_ops ipc3_pcm_ops = {
434434
.trigger = sof_ipc3_pcm_trigger,
435435
.dai_link_fixup = sof_ipc3_pcm_dai_link_fixup,
436436
.reset_hw_params_during_stop = true,
437+
.d0i3_supported_in_s0ix = true,
437438
};

sound/soc/sof/pcm.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -325,14 +325,13 @@ static int sof_pcm_trigger(struct snd_soc_component *component,
325325
ipc_first = true;
326326
break;
327327
case SNDRV_PCM_TRIGGER_SUSPEND:
328-
if (sdev->system_suspend_target == SOF_SUSPEND_S0IX &&
328+
/*
329+
* If DSP D0I3 is allowed during S0iX, set the suspend_ignored flag for
330+
* D0I3-compatible streams to keep the firmware pipeline running
331+
*/
332+
if (pcm_ops && pcm_ops->d0i3_supported_in_s0ix &&
333+
sdev->system_suspend_target == SOF_SUSPEND_S0IX &&
329334
spcm->stream[substream->stream].d0i3_compatible) {
330-
/*
331-
* trap the event, not sending trigger stop to
332-
* prevent the FW pipelines from being stopped,
333-
* and mark the flag to ignore the upcoming DAPM
334-
* PM events.
335-
*/
336335
spcm->stream[substream->stream].suspend_ignored = true;
337336
return 0;
338337
}

sound/soc/sof/sof-audio.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ struct snd_sof_dai_config_data {
116116
* triggers. The FW keeps the host DMA running in this case and
117117
* therefore the host must do the same and should stop the DMA during
118118
* hw_free.
119+
* @d0i3_supported_in_s0ix: Allow DSP D0I3 during S0iX
119120
*/
120121
struct sof_ipc_pcm_ops {
121122
int (*hw_params)(struct snd_soc_component *component, struct snd_pcm_substream *substream,
@@ -135,6 +136,7 @@ struct sof_ipc_pcm_ops {
135136
bool reset_hw_params_during_stop;
136137
bool ipc_first_on_start;
137138
bool platform_stop_during_hw_free;
139+
bool d0i3_supported_in_s0ix;
138140
};
139141

140142
/**

0 commit comments

Comments
 (0)