linux/sound/soc
Charles Keepax 8dd26dff00
ASoC: dapm: Fix handling of custom_stop_condition on DAPM graph walks
DPCM uses snd_soc_dapm_dai_get_connected_widgets to build a
list of the widgets connected to a specific front end DAI so it
can search through this list for available back end DAIs. The
custom_stop_condition was added to is_connected_ep to facilitate this
list not containing more widgets than is necessary. Doing so both
speeds up the DPCM handling as less widgets need to be searched and
avoids issues with CODEC to CODEC links as these would be confused
with back end DAIs if they appeared in the list of available widgets.

custom_stop_condition was implemented by aborting the graph walk
when the condition is triggered, however there is an issue with this
approach. Whilst walking the graph is_connected_ep should update the
endpoints cache on each widget, if the walk is aborted the number
of attached end points is unknown for that sub-graph. When the stop
condition triggered, the original patch ignored the triggering widget
and returned zero connected end points; a later patch updated this
to set the triggering widget's cache to 1 and return that. Both of
these approaches result in inaccurate values being stored in various
end point caches as the values propagate back through the graph,
which can result in later issues with widgets powering/not powering
unexpectedly.

As the original goal was to reduce the size of the widget list passed
to the DPCM code, the simplest solution is to limit the functionality
of the custom_stop_condition to the widget list. This means the rest
of the graph will still be processed resulting in correct end point
caches, but only widgets up to the stop condition will be added to the
returned widget list.

Fixes: 6742064aef ("ASoC: dapm: support user-defined stop condition in dai_get_connected_widgets")
Fixes: 5fdd022c20 ("ASoC: dpcm: play nice with CODEC<->CODEC links")
Fixes: 09464974ea ("ASoC: dapm: Fix to return correct path list in is_connected_ep.")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20190718084333.15598-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-07-22 13:00:12 +01:00
..
adi treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 177 2019-05-30 11:29:19 -07:00
amd Linux 5.2-rc6 2019-06-26 12:39:34 +01:00
atmel ASoC: atmel: tse850-pcm5142: consider CPU-Platform possibility 2019-06-28 15:10:51 +01:00
au1x ASoC: au1x: psc-i2s.c: use devm_snd_soc_register_component() 2019-07-02 13:48:29 +01:00
bcm treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
cirrus ASoC: cirrus: ep93xx-i2s.c: use devm_snd_soc_register_component() 2019-07-02 13:48:39 +01:00
codecs ASoC: rt1011: fix DC calibration offset not applying 2019-07-11 12:15:42 +01:00
dwc treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
fsl ASoC: fsl: imx-audmix: consider CPU-Platform possibility 2019-06-28 15:12:39 +01:00
generic ASoC: audio-graph-card: add missing const at graph_get_dai_id() 2019-07-11 12:27:29 +01:00
hisilicon treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 340 2019-06-05 17:37:07 +02:00
img treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 422 2019-06-05 17:37:15 +02:00
intel ASoC: Intel: bytcht_es8316: Add quirk for Irbis NB41 netbook 2019-07-16 19:17:16 +01:00
jz4740 Linux 5.2-rc6 2019-06-26 12:39:34 +01:00
kirkwood ASoC: kirkwood: armada-370-db: consider CPU-Platform possibility 2019-06-28 15:12:59 +01:00
mediatek Linux 5.2-rc6 2019-06-26 12:39:34 +01:00
meson ASoC: meson: axg-tdm-formatter: add reset 2019-07-03 13:21:34 +01:00
mxs ASoC: mxs: mxs-sgtl5000: consider CPU-Platform possibility 2019-06-28 15:13:19 +01:00
nuc900 Linux 5.2-rc6 2019-06-26 12:39:34 +01:00
pxa ASoC: pxa: pxa2xx-ac97.c: use devm_snd_soc_register_component() 2019-07-02 13:52:08 +01:00
qcom ASoC: qdsp6: q6afe-dai: Add missing Slimbus0 audio route 2019-07-04 00:03:10 +01:00
rockchip ASoC: rockchip: rk3399_gru_sound: consider CPU-Platform possibility 2019-06-28 15:20:44 +01:00
samsung ASoC: samsung: odroid: fix a double-free issue for cpu_dai 2019-07-16 19:17:15 +01:00
sh ASoC: rsnd: add missing pin sharing with SSI9 2019-06-26 12:28:35 +01:00
sirf ASoC: sirf: sirf-audio: consider CPU-Platform possibility 2019-06-28 15:16:43 +01:00
sof ASoC: SOF: Intel: implement runtime idle for CNL/APL 2019-07-06 12:23:47 +01:00
spear treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201 2019-05-30 11:29:52 -07:00
sprd treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
sti treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
stm Linux 5.2-rc6 2019-06-26 12:39:34 +01:00
sunxi ASoC: sunxi: sun50i-codec-analog: Add earpiece 2019-07-05 17:58:31 +01:00
tegra ASoC: tegra: trimslice: consider CPU-Platform possibility 2019-06-28 15:18:45 +01:00
ti ASoC: ti: rx51: consider CPU-Platform possibility 2019-06-28 15:19:45 +01:00
txx9 Linux 5.2-rc6 2019-06-26 12:39:34 +01:00
uniphier ASoC: uniphier: Drop superfluous PCM preallocation error checks 2019-02-06 18:29:39 +01:00
ux500 ASoC: ux500: mop500: consider CPU-Platform possibility 2019-06-28 15:19:55 +01:00
xilinx treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
xtensa treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
zte treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile ASoC: SOF: Add Build support for SOF core and Intel drivers 2019-04-28 02:51:46 +09:00
soc-ac97.c
soc-acpi.c ASoC: soc-acpi: fix implicit header use of module.h/export.h 2019-05-08 18:06:28 +09:00
soc-compress.c ASoC: compress: Fix memory leak from snd_soc_new_compress 2019-06-25 15:33:04 +01:00
soc-core.c ASoC: core: Return -ENOTSUPP from set_channel_map() if no operation provided 2019-07-04 00:02:52 +01:00
soc-dapm.c ASoC: dapm: Fix handling of custom_stop_condition on DAPM graph walks 2019-07-22 13:00:12 +01:00
soc-devres.c
soc-generic-dmaengine-pcm.c ASoC: More changes for v5.1 2019-02-28 13:30:55 +01:00
soc-io.c
soc-jack.c
soc-ops.c
soc-pcm.c ASoC: Fixes for v5.2 2019-06-13 17:33:34 +02:00
soc-topology.c ASoC: topology: fix memory leaks on sm, se and sbe 2019-06-28 15:08:49 +01:00
soc-utils.c ASoC: soc-utils: respawn dummy Platform 2019-06-28 15:21:04 +01:00