mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
ASoC: SOF: topology: Add support for decoder and encoder widgets
Decoder and encoder modules fall under process modules in SOF. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Co-developed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Link: https://patch.msgid.link/20261007084955.1256-29-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
2c7b19f782
commit
85b9b3b311
|
|
@ -3589,6 +3589,8 @@ static int sof_ipc4_widget_setup(struct snd_sof_dev *sdev, struct snd_sof_widget
|
|||
msg = &asrc->msg;
|
||||
break;
|
||||
}
|
||||
case snd_soc_dapm_decoder:
|
||||
case snd_soc_dapm_encoder:
|
||||
case snd_soc_dapm_effect:
|
||||
{
|
||||
struct sof_ipc4_process *process = swidget->private;
|
||||
|
|
@ -4361,6 +4363,15 @@ static const struct sof_ipc_tplg_widget_ops tplg_ipc4_widget_ops[SND_SOC_DAPM_TY
|
|||
process_token_list, ARRAY_SIZE(process_token_list),
|
||||
NULL, sof_ipc4_prepare_process_module,
|
||||
NULL},
|
||||
/* for all practical purposes a decoder is like an effect type widget */
|
||||
[snd_soc_dapm_decoder] = {sof_ipc4_widget_setup_comp_process,
|
||||
sof_ipc4_widget_free_comp_process,
|
||||
process_token_list, ARRAY_SIZE(process_token_list),
|
||||
NULL, sof_ipc4_prepare_process_module, NULL},
|
||||
[snd_soc_dapm_encoder] = {sof_ipc4_widget_setup_comp_process,
|
||||
sof_ipc4_widget_free_comp_process,
|
||||
process_token_list, ARRAY_SIZE(process_token_list),
|
||||
NULL, sof_ipc4_prepare_process_module, NULL},
|
||||
};
|
||||
|
||||
const struct sof_ipc_tplg_ops ipc4_tplg_ops = {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,9 @@
|
|||
#define WIDGET_IS_AIF(id) ((id) == snd_soc_dapm_aif_in || (id) == snd_soc_dapm_aif_out)
|
||||
#define WIDGET_IS_AIF_OR_DAI(id) (WIDGET_IS_DAI(id) || WIDGET_IS_AIF(id))
|
||||
#define WIDGET_IS_COPIER(id) (WIDGET_IS_AIF_OR_DAI(id) || (id) == snd_soc_dapm_buffer)
|
||||
#define WIDGET_IS_PROCESS(id) ((id) == snd_soc_dapm_effect)
|
||||
#define WIDGET_IS_PROCESS(id) ((id) == snd_soc_dapm_effect || \
|
||||
(id) == snd_soc_dapm_decoder || \
|
||||
(id) == snd_soc_dapm_encoder)
|
||||
|
||||
#define SOF_DAI_PARAM_INTEL_SSP_MCLK 0
|
||||
#define SOF_DAI_PARAM_INTEL_SSP_BCLK 1
|
||||
|
|
|
|||
|
|
@ -1530,6 +1530,8 @@ static int sof_widget_ready(struct snd_soc_component *scomp, int index,
|
|||
list_add(&dai->list, &sdev->dai_list);
|
||||
swidget->private = dai;
|
||||
break;
|
||||
case snd_soc_dapm_decoder:
|
||||
case snd_soc_dapm_encoder:
|
||||
case snd_soc_dapm_effect:
|
||||
/* check we have some tokens - we need at least process type */
|
||||
if (le32_to_cpu(tw->priv.size) == 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user