Skip to content

Commit 84a9672

Browse files
committed
Merge series "ASoC: SOF: topology: minor updates" from Pierre-Louis Bossart <[email protected]>:
Two patches to visualize settings and override dynamic pipelines + one correction for errors on connections. Pierre-Louis Bossart (2): ASoC: SOF: topology: show clks_control value in dynamic debug ASoC: SOF: topology: allow for dynamic pipelines override for debug Ranjani Sridharan (1): ASoC: SOF: topology: return error if sof_connect_dai_widget() fails sound/soc/sof/sof-priv.h | 6 ++++++ sound/soc/sof/topology.c | 24 +++++++++++++++--------- 2 files changed, 21 insertions(+), 9 deletions(-) -- 2.25.1
2 parents 7b84fd2 + 4a23076 commit 84a9672

File tree

2 files changed

+21
-9
lines changed

2 files changed

+21
-9
lines changed

sound/soc/sof/sof-priv.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424
#define SOF_DBG_ENABLE_TRACE BIT(0)
2525
#define SOF_DBG_RETAIN_CTX BIT(1) /* prevent DSP D3 on FW exception */
2626
#define SOF_DBG_VERIFY_TPLG BIT(2) /* verify topology during load */
27+
#define SOF_DBG_DYNAMIC_PIPELINES_OVERRIDE BIT(3) /* 0: use topology token
28+
* 1: override topology
29+
*/
30+
#define SOF_DBG_DYNAMIC_PIPELINES_ENABLE BIT(4) /* 0: use static pipelines
31+
* 1: use dynamic pipelines
32+
*/
2733

2834
#define SOF_DBG_DUMP_REGS BIT(0)
2935
#define SOF_DBG_DUMP_MBOX BIT(1)

sound/soc/sof/topology.c

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1759,9 +1759,14 @@ static int sof_widget_load_pipeline(struct snd_soc_component *scomp, int index,
17591759
goto err;
17601760
}
17611761

1762-
dev_dbg(scomp->dev, "pipeline %s: period %d pri %d mips %d core %d frames %d\n",
1762+
if (sof_core_debug & SOF_DBG_DYNAMIC_PIPELINES_OVERRIDE)
1763+
swidget->dynamic_pipeline_widget = sof_core_debug &
1764+
SOF_DBG_DYNAMIC_PIPELINES_ENABLE;
1765+
1766+
dev_dbg(scomp->dev, "pipeline %s: period %d pri %d mips %d core %d frames %d dynamic %d\n",
17631767
swidget->widget->name, pipeline->period, pipeline->priority,
1764-
pipeline->period_mips, pipeline->core, pipeline->frames_per_sched);
1768+
pipeline->period_mips, pipeline->core, pipeline->frames_per_sched,
1769+
swidget->dynamic_pipeline_widget);
17651770

17661771
swidget->private = pipeline;
17671772

@@ -2374,13 +2379,14 @@ static int sof_widget_ready(struct snd_soc_component *scomp, int index,
23742379
}
23752380

23762381
ret = sof_widget_load_dai(scomp, index, swidget, tw, dai);
2377-
if (ret == 0) {
2378-
sof_connect_dai_widget(scomp, w, tw, dai);
2379-
list_add(&dai->list, &sdev->dai_list);
2380-
swidget->private = dai;
2381-
} else {
2382+
if (!ret)
2383+
ret = sof_connect_dai_widget(scomp, w, tw, dai);
2384+
if (ret < 0) {
23822385
kfree(dai);
2386+
break;
23832387
}
2388+
list_add(&dai->list, &sdev->dai_list);
2389+
swidget->private = dai;
23842390
break;
23852391
case snd_soc_dapm_mixer:
23862392
ret = sof_widget_load_mixer(scomp, index, swidget, tw);
@@ -2825,12 +2831,12 @@ static int sof_link_ssp_load(struct snd_soc_component *scomp, int index,
28252831
config[i].ssp.rx_slots = le32_to_cpu(hw_config[i].rx_slots);
28262832
config[i].ssp.tx_slots = le32_to_cpu(hw_config[i].tx_slots);
28272833

2828-
dev_dbg(scomp->dev, "tplg: config SSP%d fmt 0x%x mclk %d bclk %d fclk %d width (%d)%d slots %d mclk id %d quirks %d\n",
2834+
dev_dbg(scomp->dev, "tplg: config SSP%d fmt %#x mclk %d bclk %d fclk %d width (%d)%d slots %d mclk id %d quirks %d clks_control %#x\n",
28292835
config[i].dai_index, config[i].format,
28302836
config[i].ssp.mclk_rate, config[i].ssp.bclk_rate,
28312837
config[i].ssp.fsync_rate, config[i].ssp.sample_valid_bits,
28322838
config[i].ssp.tdm_slot_width, config[i].ssp.tdm_slots,
2833-
config[i].ssp.mclk_id, config[i].ssp.quirks);
2839+
config[i].ssp.mclk_id, config[i].ssp.quirks, config[i].ssp.clks_control);
28342840

28352841
/* validate SSP fsync rate and channel count */
28362842
if (config[i].ssp.fsync_rate < 8000 || config[i].ssp.fsync_rate > 192000) {

0 commit comments

Comments
 (0)