linux/sound/soc/sof/intel
Pierre-Louis Bossart 84e3cfd16a
ASoC: SOF: Intel: hda-dai: improve SSP DAI handling for dynamic pipelines
In order to keep the widget use_count balanced, make sure the DAI
widgets are allocated once in hw_params and released in hw_free. A
'setup' status flag is used to deal with cases where the .hw_params
callback is invoked multiple times, and likewise with cases where
hw_free is invoked without hw_params being called first (which can
happen if the FE hw_params fails).

In addition, this patch frees the widgets in the suspend transition,
and reallocates them in the .prepare callback. The 'setup' flag helps
in this case differentiate between resume (setup needed) and
xruns (setup not needed).

This balanced operation was not needed previously but will be required
when SOF dynamic pipelines are enabled.

Co-developed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20211004171430.103674-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-05 13:08:14 +01:00
..
apl.c ASoC: SOF: Rename sof_arch_ops to dsp_arch_ops 2021-09-17 13:17:47 +01:00
atom.c ASoC: SOF: Intel: move common ATOM stuff to module 2021-05-10 13:03:16 +01:00
atom.h ASoC: SOF: Intel: move common ATOM stuff to module 2021-05-10 13:03:16 +01:00
bdw.c ASoC: SOF: Rename sof_arch_ops to dsp_arch_ops 2021-09-17 13:17:47 +01:00
byt.c ASoC: SOF: Rename sof_arch_ops to dsp_arch_ops 2021-09-17 13:17:47 +01:00
cnl.c ASoC: SOF: Rename sof_arch_ops to dsp_arch_ops 2021-09-17 13:17:47 +01:00
ext_manifest.h ASoC: SOF: ext_manifest: parse cavs extra config data elem 2020-11-27 17:23:05 +00:00
hda-bus.c ASoC: SOF: Intel: hda: release display power at link_power 2021-02-08 15:57:08 +01:00
hda-codec.c ASoC: SOF: Intel: fix page fault at probe if i915 init fails 2021-01-13 16:33:40 +00:00
hda-ctrl.c ASoC: SOF/Intel: clarify SPDX license with GPL-2.0-only 2020-05-01 17:45:24 +01:00
hda-dai.c ASoC: SOF: Intel: hda-dai: improve SSP DAI handling for dynamic pipelines 2021-10-05 13:08:14 +01:00
hda-dsp.c ASoC: SOF: Intel: hda-dsp: Declare locally used functions as static 2021-09-15 13:11:18 +01:00
hda-ipc.c ASoC: SOF: add error handling to snd_sof_ipc_msg_data() 2021-09-28 13:16:26 +01:00
hda-ipc.h ASoC: SOF: Intel: hda: Add sof_tgl_ops for TGL platforms 2020-08-27 14:22:23 +01:00
hda-loader.c ASoC: SOF: Intel: hda: don't print ROM status if cl_dsp_init() fails 2021-06-01 14:05:18 +01:00
hda-pcm.c ASoC: SOF: Intel: make DMI L1 selection more robust 2021-08-13 13:16:16 +01:00
hda-probes.c ASoC: SOF: Intel: Rename hda-compress.c to hda-probes.c 2021-09-16 14:04:14 +01:00
hda-stream.c ASoC: SOF: prefix some terse and cryptic dev_dbg() with __func__ 2021-09-28 13:16:27 +01:00
hda-trace.c ASoC: SOF: fix string format for errors 2021-02-10 17:17:11 +00:00
hda.c ASoC: SOF: Intel: hda: add new flags for DAI_CONFIG 2021-10-05 13:08:12 +01:00
hda.h ASoC: SOF: Intel: hda: make sure DAI widget is set up before IPC 2021-10-01 20:48:29 +01:00
icl.c ASoC: SOF: Rename sof_arch_ops to dsp_arch_ops 2021-09-17 13:17:47 +01:00
intel-ipc.c ASoC: SOF: add error handling to snd_sof_ipc_msg_data() 2021-09-28 13:16:26 +01:00
Kconfig ASoC: SOF: Intel: make DMI L1 selection more robust 2021-08-13 13:16:16 +01:00
Makefile ASoC: SOF: Intel: Rename hda-compress.c to hda-probes.c 2021-09-16 14:04:14 +01:00
pci-apl.c ASoC: SOF: intel: Do no initialize resindex_dma_base 2021-09-15 13:10:12 +01:00
pci-cnl.c ASoC: SOF: intel: Do no initialize resindex_dma_base 2021-09-15 13:10:12 +01:00
pci-icl.c ASoC: SOF: intel: Do no initialize resindex_dma_base 2021-09-15 13:10:12 +01:00
pci-tgl.c ASoC: SOF: intel: Do no initialize resindex_dma_base 2021-09-15 13:10:12 +01:00
pci-tng.c ASoC: SOF: Rename sof_arch_ops to dsp_arch_ops 2021-09-17 13:17:47 +01:00
shim.h ASoC: SOF: intel: add snd_sof_dsp_check_sdw_irq ops 2021-08-02 15:45:40 +01:00
tgl.c ASoC: SOF: Rename sof_arch_ops to dsp_arch_ops 2021-09-17 13:17:47 +01:00