mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 08:31:55 +00:00
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@nvidia.com> Link: https://lore.kernel.org/r/1631551342-25469-2-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
2266721938
commit
0c25db3f76
@ -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)
|
if (!fe->dpcm[stream].runtime && !fe->fe_compr)
|
||||||
continue;
|
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 */
|
/* newly connected FE and BE */
|
||||||
err = dpcm_be_connect(fe, be, stream);
|
err = dpcm_be_connect(fe, be, stream);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user