ASoC: SOF: sof-audio: Fix broken early bclk feature for SSP
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Tue, 7 Mar 2023 11:46:39 +0000 (13:46 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 7 Mar 2023 13:58:00 +0000 (13:58 +0000)
commitb66bfc3a9810caed5d55dd8907110bdc8028b06b
tree343c12dad1f4db9965435cca8ff62e5a38042e84
parentca09e2a351fbc7836ba9418304ff0c3e72addfe0
ASoC: SOF: sof-audio: Fix broken early bclk feature for SSP

With the removal of widget setup during BE hw_params, the DAI config IPC
is never sent with the SOF_DAI_CONFIG_FLAGS_HW_PARAMS. This means that
the early bit clock feature required for certain codecs will be broken.

Fix this by saving the config flags sent during BE DAI hw_params and
reusing it when the DAI_CONFIG IPC is sent after the DAI widget is set
up. Also, free the DAI config before the widget is freed.

The DAI_CONFIG IPC sent during the sof_widget_free() does not have the
DAI index information. So, save the dai_index in the config during
hw_params and reuse it during hw_free.

For IPC4, do not clear the node ID during hw_free. It will be needed for
freeing the group_ida during unprepare.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230307114639.4553-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/ipc3-topology.c
sound/soc/sof/ipc4-topology.c
sound/soc/sof/sof-audio.c