Commit 7667230f authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Luis Henriques

ASoC: Intel: Atom: flip logic for gain Switch

BugLink: http://bugs.launchpad.net/bugs/1657674

The upstreamed code modified the control names from Mute to
Switch without changing the logic. To get audio working the Switch
needs to be off which isn't aligned with normal ALSA conventions.

Inverting the logic now so that Switch Off means mute and Switch On
means active audio using the specific volume setting.
Signed-off-by: default avatarSebastien Guiriec <sebastien.guiriec@intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
(cherry picked from commit 940a5a01)
Signed-off-by: default avatarShrirang Bagul <shrirang.bagul@canonical.com>
Acked-by: default avatarTim Gardner <tim.gardner@canonical.com>
Acked-by: default avatarBrad Figg <brad.figg@canonical.com>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 3f252970
...@@ -443,7 +443,7 @@ static int sst_gain_get(struct snd_kcontrol *kcontrol, ...@@ -443,7 +443,7 @@ static int sst_gain_get(struct snd_kcontrol *kcontrol,
break; break;
case SST_GAIN_MUTE: case SST_GAIN_MUTE:
ucontrol->value.integer.value[0] = gv->mute ? 1 : 0; ucontrol->value.integer.value[0] = gv->mute ? 0 : 1;
break; break;
case SST_GAIN_RAMP_DURATION: case SST_GAIN_RAMP_DURATION:
...@@ -479,7 +479,7 @@ static int sst_gain_put(struct snd_kcontrol *kcontrol, ...@@ -479,7 +479,7 @@ static int sst_gain_put(struct snd_kcontrol *kcontrol,
break; break;
case SST_GAIN_MUTE: case SST_GAIN_MUTE:
gv->mute = !!ucontrol->value.integer.value[0]; gv->mute = !ucontrol->value.integer.value[0];
dev_dbg(cmpnt->dev, "%s: Mute %d\n", mc->pname, gv->mute); dev_dbg(cmpnt->dev, "%s: Mute %d\n", mc->pname, gv->mute);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment