aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/qcom
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2021-12-31 13:21:39 +0000
committerMark Brown <broonie@kernel.org>2021-12-31 13:23:28 +0000
commit8b974c122bc649895bc07191ec34633d8087323e (patch)
treea33d32de99f1dd2756ad82f22d72a775a8fa9a86 /sound/soc/qcom
parentcc5c9788106fb1b9e03c8c57d8d7166073a54416 (diff)
parent30e693ee82d20361f2caacca3b68c79e1a7cb16c (diff)
ASoC: Merge fixes
So we can send to Linus.
Diffstat (limited to 'sound/soc/qcom')
-rw-r--r--sound/soc/qcom/qdsp6/q6routing.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/soc/qcom/qdsp6/q6routing.c b/sound/soc/qcom/qdsp6/q6routing.c
index cd74681e811e..928fd23e2c27 100644
--- a/sound/soc/qcom/qdsp6/q6routing.c
+++ b/sound/soc/qcom/qdsp6/q6routing.c
@@ -498,14 +498,16 @@ static int msm_routing_put_audio_mixer(struct snd_kcontrol *kcontrol,
struct session_data *session = &data->sessions[session_id];
if (ucontrol->value.integer.value[0]) {
+ if (session->port_id == be_id)
+ return 0;
+
session->port_id = be_id;
snd_soc_dapm_mixer_update_power(dapm, kcontrol, 1, update);
} else {
- if (session->port_id == be_id) {
- session->port_id = -1;
+ if (session->port_id == -1 || session->port_id != be_id)
return 0;
- }
+ session->port_id = -1;
snd_soc_dapm_mixer_update_power(dapm, kcontrol, 0, update);
}