[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1631551342-25469-2-git-send-email-spujar@nvidia.com>
Date: Mon, 13 Sep 2021 22:12:09 +0530
From: Sameer Pujar <spujar@...dia.com>
To: <broonie@...nel.org>, <lgirdwood@...il.com>, <robh+dt@...nel.org>,
<thierry.reding@...il.com>, <jonathanh@...dia.com>,
<catalin.marinas@....com>, <will@...nel.org>, <perex@...ex.cz>,
<tiwai@...e.com>, <kuninori.morimoto.gx@...esas.com>
CC: <sharadg@...dia.com>, <alsa-devel@...a-project.org>,
<devicetree@...r.kernel.org>, <linux-tegra@...r.kernel.org>,
<linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
Sameer Pujar <spujar@...dia.com>
Subject: [PATCH v2 01/13] ASoC: soc-pcm: Don't reconnect an already active BE
In some cases, multiple FE components have the same BE component in their
respective DPCM paths. One such example would be a mixer component, which
can receive two or more inputs and sends a mixed output. In such cases,
to avoid reconfiguration of already active DAI (mixer output DAI in this
case), check the BE stream state to filter out the redundancy.
In summary, allow connection of BE if the respective current stream state
is either NEW or CLOSED.
Signed-off-by: Sameer Pujar <spujar@...dia.com>
---
sound/soc/soc-pcm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 48f71bb..e30cb5a 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -1395,6 +1395,10 @@ static int dpcm_add_paths(struct snd_soc_pcm_runtime *fe, int stream,
if (!fe->dpcm[stream].runtime && !fe->fe_compr)
continue;
+ if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_NEW) &&
+ (be->dpcm[stream].state != SND_SOC_DPCM_STATE_CLOSE))
+ continue;
+
/* newly connected FE and BE */
err = dpcm_be_connect(fe, be, stream);
if (err < 0) {
--
2.7.4
Powered by blists - more mailing lists