summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2023-02-28 20:59:09 +0300
committerMark Brown <broonie@kernel.org>2023-02-28 20:59:09 +0300
commitb201929904a5907fa2d533b80fecd5666a239570 (patch)
tree3f3c800a061242c90f8b749263c182be3021b830 /sound/soc
parente3e32993163056f1c4715fee2dad77c632a2394e (diff)
parent8cbd7273a724d4e9615b26d696bb1221a8a48e4c (diff)
downloadlinux-b201929904a5907fa2d533b80fecd5666a239570.tar.xz
ASoC: mt6358: Fixes from an initial glance at a
Merge series from Mark Brown <broonie@kernel.org>: This is a collection of fixes I came up after glancing through an initial test run with the snappily named Kukui Jacuzzi SKU16 Chromebook on KernelCI. There are more issues flagged, this is just what I fixed thus far.
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/mt6358.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sound/soc/codecs/mt6358.c b/sound/soc/codecs/mt6358.c
index 93f35e8d26fc..b54610b27906 100644
--- a/sound/soc/codecs/mt6358.c
+++ b/sound/soc/codecs/mt6358.c
@@ -560,6 +560,9 @@ static int mt6358_put_wov(struct snd_kcontrol *kcontrol,
struct mt6358_priv *priv = snd_soc_component_get_drvdata(c);
int enabled = ucontrol->value.integer.value[0];
+ if (enabled < 0 || enabled > 1)
+ return -EINVAL;
+
if (priv->wov_enabled != enabled) {
if (enabled)
mt6358_enable_wov_phase2(priv);
@@ -567,6 +570,8 @@ static int mt6358_put_wov(struct snd_kcontrol *kcontrol,
mt6358_disable_wov_phase2(priv);
priv->wov_enabled = enabled;
+
+ return 1;
}
return 0;
@@ -632,9 +637,6 @@ static const char * const hp_in_mux_map[] = {
"Audio Playback",
"Test Mode",
"HP Impedance",
- "undefined1",
- "undefined2",
- "undefined3",
};
static int hp_in_mux_map_value[] = {
@@ -643,9 +645,6 @@ static int hp_in_mux_map_value[] = {
HP_MUX_HP,
HP_MUX_TEST_MODE,
HP_MUX_HP_IMPEDANCE,
- HP_MUX_OPEN,
- HP_MUX_OPEN,
- HP_MUX_OPEN,
};
static SOC_VALUE_ENUM_SINGLE_DECL(hpl_in_mux_map_enum,