From: Kai Chieh Chuang Date: Mon, 28 May 2018 02:18:19 +0000 (+0800) Subject: ASoC: dpcm: symmetry constraint on FE substream X-Git-Tag: v4.19~773^2~15^2~28 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=99bcedbdebc57fe5d02fb470b7265f2208c2cf96;p=platform%2Fkernel%2Flinux-rpi.git ASoC: dpcm: symmetry constraint on FE substream We should set BE symmetric constraint on FE substream. in case one BE is used by two FE1/FE2, the first BE runtime will use FE1's substream->runtime. hence the FE1's will be constrained by BE symmetry property. Though, second FE2 call dpcm_apply_symmetry, the be_substream->runtime == FE1's substream->runtime. The FE2's substream->runtime will not be constrained by BE's symmetry property. Signed-off-by: KaiChieh Chuang Signed-off-by: Mark Brown --- diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 2d846b3..0e2b2c6 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -1779,14 +1779,15 @@ static int dpcm_apply_symmetry(struct snd_pcm_substream *fe_substream, /* Symmetry only applies if we've got an active stream. */ if (rtd->cpu_dai->active) { - err = soc_pcm_apply_symmetry(be_substream, rtd->cpu_dai); + err = soc_pcm_apply_symmetry(fe_substream, + rtd->cpu_dai); if (err < 0) return err; } for (i = 0; i < rtd->num_codecs; i++) { if (rtd->codec_dais[i]->active) { - err = soc_pcm_apply_symmetry(be_substream, + err = soc_pcm_apply_symmetry(fe_substream, rtd->codec_dais[i]); if (err < 0) return err;