Print out the information line for the found input format once to avoid
duplicated prints in case when multiple formats are available.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@xxxxxxxxxxxxxxx>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>
Reviewed-by: Bard Liao <yung-chuan.liao@xxxxxxxxxxxxxxx>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@xxxxxxxxxxxxxxx>
---
sound/soc/sof/ipc4-topology.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/sound/soc/sof/ipc4-topology.c b/sound/soc/sof/ipc4-topology.c
index 1f10926921d5..31cbb7f620fd 100644
--- a/sound/soc/sof/ipc4-topology.c
+++ b/sound/soc/sof/ipc4-topology.c
@@ -1305,11 +1305,8 @@ static int sof_ipc4_init_input_audio_fmt(struct snd_sof_dev *sdev,
channels = SOF_IPC4_AUDIO_FORMAT_CFG_CHANNELS_COUNT(fmt->fmt_cfg);
valid_bits = SOF_IPC4_AUDIO_FORMAT_CFG_V_BIT_DEPTH(fmt->fmt_cfg);
if (params_rate(params) == rate && params_channels(params) == channels &&
- sample_valid_bits == valid_bits) {
- dev_dbg(sdev->dev, "matched audio format index for %uHz, %ubit, %u channels: %d\n",
- rate, valid_bits, channels, i);
+ sample_valid_bits == valid_bits)
break;
- }
}
if (i == pin_fmts_size) {
@@ -1326,7 +1323,14 @@ static int sof_ipc4_init_input_audio_fmt(struct snd_sof_dev *sdev,
/* set base_cfg ibs/obs */
base_config->ibs = pin_fmts[i].buffer_size;
- dev_dbg(sdev->dev, "Init input audio formats for %s\n", swidget->widget->name);
+ if (single_format)
+ dev_dbg(sdev->dev, "Input audio format for %s:\n",
+ swidget->widget->name);
+ else
+ dev_dbg(sdev->dev,
+ "Input audio format (format index: %d) for %s:\n", i,
+ swidget->widget->name);
+
sof_ipc4_dbg_audio_format(sdev->dev, &pin_fmts[i], 1);
return i;
--
2.47.0
[Index of Archives]
[Pulseaudio]
[Linux Audio Users]
[ALSA Devel]
[Fedora Desktop]
[Fedora SELinux]
[Big List of Linux Books]
[Yosemite News]
[KDE Users]