diff options
author | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> | 2021-11-09 17:23:05 +0000 |
---|---|---|
committer | Srinivas Kandagatla <srinivas.kandagatla@linaro.org> | 2021-11-11 15:54:56 +0000 |
commit | 4644173d8a5494580678e9a9b64793479206b93f (patch) | |
tree | 1a4ee74b7e260139068872133dd629a3fb17c6b3 | |
parent | 788a63effb2726ac7c00fb0fe8d1cd2ea8cfdc5f (diff) |
ASoC: qdsp6: q6routing: Conditionally reset FrontEnd Mixer
Streams are resused across multiple BackEnd mixers, do not reset the
stream mixers if they are not already set for that particular FrontEnd.
Ex:
amixer cset iface=MIXER,name='SLIMBUS_0_RX Audio Mixer MultiMedia1' 1
woudld set the MultiMedia1 steam for SLIMBUS_0_RX, however doing below
amixer command will reset previously setup MultiMedia1 stream.
amixer cset iface=MIXER,name='SLIMBUS_2_RX Audio Mixer MultiMedia1' 0
So reset the FrontEnd Mixers conditionally.
Fixes: e3a33673e845 ("ASoC: qdsp6: q6routing: Add q6routing driver")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
-rw-r--r-- | sound/soc/qcom/qdsp6/q6routing.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/soc/qcom/qdsp6/q6routing.c b/sound/soc/qcom/qdsp6/q6routing.c index 3390ebef9549d..243b8179e59df 100644 --- a/sound/soc/qcom/qdsp6/q6routing.c +++ b/sound/soc/qcom/qdsp6/q6routing.c @@ -495,7 +495,11 @@ static int msm_routing_put_audio_mixer(struct snd_kcontrol *kcontrol, session->port_id = be_id; snd_soc_dapm_mixer_update_power(dapm, kcontrol, 1, update); } else { - session->port_id = -1; + if (session->port_id == be_id) { + session->port_id = -1; + return 0; + } + snd_soc_dapm_mixer_update_power(dapm, kcontrol, 0, update); } |