diff options
author | Mark Brown <broonie@kernel.org> | 2023-02-28 18:59:09 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-02-28 18:59:09 +0100 |
commit | b201929904a5907fa2d533b80fecd5666a239570 (patch) | |
tree | 3f3c800a061242c90f8b749263c182be3021b830 /sound | |
parent | ASoC: mt8192: Fixes from initial glance at kselftest (diff) | |
parent | ASoC: mt6358: Remove undefined HPx Mux enumeration values (diff) | |
download | linux-b201929904a5907fa2d533b80fecd5666a239570.tar.xz linux-b201929904a5907fa2d533b80fecd5666a239570.zip |
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')
-rw-r--r-- | sound/soc/codecs/mt6358.c | 11 |
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, |