linux/sound/soc/sof
Ranjani Sridharan 8b00141692
ASoC: SOF: Introduce widget use_count
Add a new field, use_count to struct snd_sof_widget to keep track
of the usage count for each widget. Since widgets can belong to
multiple pipelines, this field will ensure that the widget
is setup only when the first pipeline that needs it is started
and freed when the last pipeline that needs it is stopped. There is
no need to protect the widget use_count access as the core already
handles mutual exclusion at the PCM level.
Add a new helper sof_widget_free() to handle freeing the SOF
widgets and export the sof_widget_setup/free() functions.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20210927120517.20505-10-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-10-01 20:48:28 +01:00
..
imx ASoC: SOF: add error handling to snd_sof_ipc_msg_data() 2021-09-28 13:16:26 +01:00
intel ASoC: SOF: prefix some terse and cryptic dev_dbg() with __func__ 2021-09-28 13:16:27 +01:00
xtensa ASoC: SOF: Rename sof_arch_ops to dsp_arch_ops 2021-09-17 13:17:47 +01:00
control.c ASoC: SOF: Handle control change notification from firmware 2021-09-13 01:59:18 +01:00
core.c Merge series "ASoC: SOF: Clean up the probe support" from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>: 2021-09-16 16:06:45 +01:00
debug.c ASoC: SOF: probe: Merge and clean up the probe and compress files 2021-09-16 14:04:13 +01:00
ipc.c ASoC: SOF: Introduce widget use_count 2021-10-01 20:48:28 +01:00
Kconfig ASoC: SOF: Change SND_SOC_SOF_TOPLEVEL from config to menuconfig 2021-09-30 13:26:03 +01:00
loader.c ASoC: SOF: loader: Use the generic ops for region debugfs handling 2021-09-15 16:25:08 +01:00
Makefile ASoC: SOF: probe: Merge and clean up the probe and compress files 2021-09-16 14:04:13 +01:00
nocodec.c ASOC: SOF: simplify nocodec mode 2021-04-12 17:05:55 +01:00
ops.c ASoC: SOF: modify the SOF_DBG flags 2020-12-11 13:22:57 +00:00
ops.h ASoC: SOF: add error handling to snd_sof_ipc_msg_data() 2021-09-28 13:16:26 +01:00
pcm.c ASoC: SOF: probe: Merge and clean up the probe and compress files 2021-09-16 14:04:13 +01:00
pm.c ASoC: SOF: Don't set up widgets during topology parsing 2021-10-01 20:48:27 +01:00
sof-acpi-dev.c ASoC: SOF: Check desc->ops directly in acpi/pci/of probe functions 2021-05-21 13:13:35 +01:00
sof-acpi-dev.h ASoC: SOF: ACPI: avoid reverse module dependency 2021-03-02 15:31:40 +01:00
sof-audio.c ASoC: SOF: Introduce widget use_count 2021-10-01 20:48:28 +01:00
sof-audio.h ASoC: SOF: Introduce widget use_count 2021-10-01 20:48:28 +01:00
sof-of-dev.c ASoC: SOF: imx: add header file for ops 2021-09-28 13:16:24 +01:00
sof-pci-dev.c ASoC: SOF: Intel: Use DMI string to search for adl_mx98373_rt5682 variant 2021-08-03 18:26:10 +01:00
sof-pci-dev.h ASoC: SOF: pci: split PCI into different drivers 2021-03-02 15:32:00 +01:00
sof-priv.h ASoC: SOF: add error handling to snd_sof_ipc_msg_data() 2021-09-28 13:16:26 +01:00
sof-probes.c ASoC: SOF: sof-probes: Correct the function names used for snd_soc_cdai_ops 2021-09-16 14:04:15 +01:00
sof-probes.h ASoC: SOF: probe: Merge and clean up the probe and compress files 2021-09-16 14:04:13 +01:00
topology.c ASoC: SOF: Don't set up widgets during topology parsing 2021-10-01 20:48:27 +01:00
trace.c ASoC: SOF: prefix some terse and cryptic dev_dbg() with __func__ 2021-09-28 13:16:27 +01:00
utils.c ASoC: SOF: core: Do not use 'bar' as parameter for block_read/write 2021-09-15 16:25:04 +01:00