Skip to content

Commit 50e829c

Browse files
ujfalusibardliao
authored andcommitted
ASoC: SOF: ipc4-topology: Improve the information in prepare_copier prints
It is useful to know the explicit type and if the copier (host/dai) is configured to use ChainDMA or not and also the stream_tag for the host copier. Change the prints to carry more information for debugging purposes. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
1 parent 51c11a0 commit 50e829c

1 file changed

Lines changed: 15 additions & 7 deletions

File tree

sound/soc/sof/ipc4-topology.c

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1821,15 +1821,19 @@ sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget,
18211821
bool single_output_bitdepth;
18221822
int i;
18231823

1824-
dev_dbg(sdev->dev, "copier %s, type %d", swidget->widget->name, swidget->id);
1825-
18261824
switch (swidget->id) {
18271825
case snd_soc_dapm_aif_in:
18281826
case snd_soc_dapm_aif_out:
18291827
{
1828+
struct snd_sof_widget *pipe_widget = swidget->spipe->pipe_widget;
1829+
struct sof_ipc4_pipeline *pipeline = pipe_widget->private;
18301830
struct sof_ipc4_gtw_attributes *gtw_attr;
1831-
struct snd_sof_widget *pipe_widget;
1832-
struct sof_ipc4_pipeline *pipeline;
1831+
1832+
dev_dbg(sdev->dev,
1833+
"Host copier %s, type %d, ChainDMA: %s, stream_tag: %d\n",
1834+
swidget->widget->name, swidget->id,
1835+
str_yes_no(pipeline->use_chain_dma),
1836+
platform_params->stream_tag);
18331837

18341838
/* parse the deep buffer dma size */
18351839
ret = sof_update_ipc_object(scomp, &deep_buffer_dma_ms,
@@ -1846,9 +1850,6 @@ sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget,
18461850
copier_data = &ipc4_copier->data;
18471851
available_fmt = &ipc4_copier->available_fmt;
18481852

1849-
pipe_widget = swidget->spipe->pipe_widget;
1850-
pipeline = pipe_widget->private;
1851-
18521853
if (pipeline->use_chain_dma) {
18531854
u32 host_dma_id;
18541855
u32 fifo_size;
@@ -1902,6 +1903,10 @@ sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget,
19021903
struct snd_sof_widget *pipe_widget = swidget->spipe->pipe_widget;
19031904
struct sof_ipc4_pipeline *pipeline = pipe_widget->private;
19041905

1906+
dev_dbg(sdev->dev, "Dai copier %s, type %d, ChainDMA: %s\n",
1907+
swidget->widget->name, swidget->id,
1908+
str_yes_no(pipeline->use_chain_dma));
1909+
19051910
if (pipeline->use_chain_dma)
19061911
return 0;
19071912

@@ -1935,6 +1940,9 @@ sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget,
19351940
}
19361941
case snd_soc_dapm_buffer:
19371942
{
1943+
dev_dbg(sdev->dev, "Module copier %s, type %d\n",
1944+
swidget->widget->name, swidget->id);
1945+
19381946
ipc4_copier = (struct sof_ipc4_copier *)swidget->private;
19391947
copier_data = &ipc4_copier->data;
19401948
available_fmt = &ipc4_copier->available_fmt;

0 commit comments

Comments
 (0)