ASoC: SOF: Intel: hda: Handle prepare without close for non-HDA DAI's
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Wed, 16 Oct 2024 03:29:08 +0000 (11:29 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 17 Oct 2024 11:11:18 +0000 (12:11 +0100)
commit6e38a7e098d32d128b00b42a536151de9ea1340b
tree2e864494bcd621efc11f2297c12c60a2691c81de
parent9822b4c90d77e3c6555fb21c459c4a61c6a8619f
ASoC: SOF: Intel: hda: Handle prepare without close for non-HDA DAI's

When a PCM is restarted after a snd_pcm_drain/snd_pcm_drop(), the prepare
callback will be invoked and the hw_params will be set again. For the
HDA DAI's, the hw_params function handles this case already but not for
the non-HDA DAI's. So, add the check for link_prepared to verify if the
hw_params should be done again or not. Additionally, for SDW DAI's reset
the PCMSyCM registers as would be done in the case of a start after a
hw_free.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
All: stable@vger.kernel.org # 6.10.x 6.11.x
Link: https://patch.msgid.link/20241016032910.14601-3-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/hda-dai.c