]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
ASoC: soc-pcm: Get all BEs along DAPM path
authorSameer Pujar <spujar@nvidia.com>
Mon, 2 Nov 2020 15:10:09 +0000 (20:40 +0530)
committerMark Brown <broonie@kernel.org>
Tue, 10 Nov 2020 17:28:18 +0000 (17:28 +0000)
dpcm_end_walk_at_be() stops the graph walk when first BE is found for
the given FE component. In a component model we may want to connect
multiple DAIs from different components. A new flag is introduced in
'snd_soc_card', which when set allows DAI/component chaining. Later
PCM operations can be called for all these listed components for a
valid DAPM path.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Link: https://lore.kernel.org/r/1604329814-24779-3-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc.h
sound/soc/soc-pcm.c

index 5ac578c9340cec20dc3a8266af02bc7381612c45..4a9958b9b53245f200bc235e012b881919d932d2 100644 (file)
@@ -1084,6 +1084,7 @@ struct snd_soc_card {
        unsigned int fully_routed:1;
        unsigned int disable_route_checks:1;
        unsigned int probed:1;
+       unsigned int component_chaining:1;
 
        void *drvdata;
 };
index 2a39f355b3a4a2a2a8e051bf0bd2670b050f96d1..aaab5cfe986b5bd7e882f0985c3c7ffb9cd7b23c 100644 (file)
@@ -1259,7 +1259,8 @@ int dpcm_path_get(struct snd_soc_pcm_runtime *fe,
 
        /* get number of valid DAI paths and their widgets */
        paths = snd_soc_dapm_dai_get_connected_widgets(cpu_dai, stream, list,
-                       dpcm_end_walk_at_be);
+                       fe->card->component_chaining ?
+                               NULL : dpcm_end_walk_at_be);
 
        dev_dbg(fe->dev, "ASoC: found %d audio %s paths\n", paths,
                        stream ? "capture" : "playback");