summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCurtis Malainey <cujomalainey@chromium.org>2019-11-05 17:13:33 -0800
committerMark Brown <broonie@kernel.org>2019-11-11 13:02:05 +0000
commit395f02ef210e6f7dad2ca0efc16ffaea4a9ed030 (patch)
treeec5e7dcb40002018c346a1bbd9b607088ad95710
parentee0be4a99d4923a9b9c681b008df561648731793 (diff)
downloadlinux-395f02ef210e6f7dad2ca0efc16ffaea4a9ed030.tar.bz2
ASoC: rt5677: Allow VAD to be shut on/off at all times
Due to limitations of the clocking configuration, we have no way of scheduling our hibernation before the bdw dsp hibernates. This causes issues when the system suspends with an open stream. We need userspace to toggle the kcontrol before we are suspended so that any writes on suspend are not lost and we don't corrupt the regmap. Signed-off-by: Curtis Malainey <cujomalainey@chromium.org> Link: https://lore.kernel.org/r/20191106011335.223061-9-cujomalainey@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/rt5677.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c
index 14f04db8e5e7..a65d1554366d 100644
--- a/sound/soc/codecs/rt5677.c
+++ b/sound/soc/codecs/rt5677.c
@@ -979,13 +979,8 @@ static int rt5677_dsp_vad_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
- struct rt5677_priv *rt5677 = snd_soc_component_get_drvdata(component);
-
- rt5677->dsp_vad_en = !!ucontrol->value.integer.value[0];
- if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF)
- rt5677_set_dsp_vad(component,
- !!ucontrol->value.integer.value[0]);
+ rt5677_set_dsp_vad(component, !!ucontrol->value.integer.value[0]);
return 0;
}