Skip to content

Commit 078b1e3

Browse files
RanderWangplbossart
authored andcommitted
fixup! ASoC: SOF: ipc4-topology: add buffer type support
When copier is used as a buffer, base config is always input format for both playback & capture and should be used to match source module. The original code was copied from host copier setting but is not fit for buffer copier. Signed-off-by: Rander Wang <rander.wang@intel.com>
1 parent b98b060 commit 078b1e3

1 file changed

Lines changed: 4 additions & 11 deletions

File tree

‎sound/soc/sof/ipc4-topology.c‎

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,18 +1374,11 @@ sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget,
13741374
available_fmt = &ipc4_copier->available_fmt;
13751375

13761376
/*
1377-
* base_config->audio_fmt and out_audio_fmt represent the input and output audio
1378-
* formats. Use the input format as the reference to match pcm params for playback
1379-
* and the output format as reference for capture.
1377+
* base_config->audio_fmt represent the input audio formats. Use
1378+
* the input format as the reference to match pcm params
13801379
*/
1381-
if (dir == SNDRV_PCM_STREAM_PLAYBACK) {
1382-
available_fmt->ref_audio_fmt = &available_fmt->base_config->audio_fmt;
1383-
ref_audio_fmt_size = sizeof(struct sof_ipc4_base_module_cfg);
1384-
} else {
1385-
available_fmt->ref_audio_fmt = available_fmt->out_audio_fmt;
1386-
ref_audio_fmt_size = sizeof(struct sof_ipc4_audio_format);
1387-
}
1388-
1380+
available_fmt->ref_audio_fmt = &available_fmt->base_config->audio_fmt;
1381+
ref_audio_fmt_size = sizeof(struct sof_ipc4_base_module_cfg);
13891382
ref_params = pipeline_params;
13901383

13911384
break;

0 commit comments

Comments
 (0)