diff options
author | Mark Brown | 2022-07-11 15:51:01 +0100 |
---|---|---|
committer | Mark Brown | 2022-07-11 15:51:01 +0100 |
commit | 39c5c44fc451c083908e77c3b2762fae2bf8acca (patch) | |
tree | 6e3c05c56e48fa9d29ad1f89614e9f0ef48459d4 /sound/soc/codecs/wm8998.c | |
parent | eaa27e7fe43f16fe587c3e93fd5c25ce86be3c43 (diff) | |
parent | 26b9f2fa7b1c6aba6fa9b83274a3e54868f69562 (diff) |
ASoC: Merge up fixes
Needed for the Rockchip driver.
Diffstat (limited to 'sound/soc/codecs/wm8998.c')
-rw-r--r-- | sound/soc/codecs/wm8998.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/sound/soc/codecs/wm8998.c b/sound/soc/codecs/wm8998.c index 328f1946f584..79fc6bbaa3aa 100644 --- a/sound/soc/codecs/wm8998.c +++ b/sound/soc/codecs/wm8998.c @@ -108,6 +108,7 @@ static int wm8998_inmux_put(struct snd_kcontrol *kcontrol, struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; unsigned int mode_reg, mode_index; unsigned int mux, inmode, src_val, mode_val; + int change, ret; mux = ucontrol->value.enumerated.item[0]; if (mux > 1) @@ -137,14 +138,20 @@ static int wm8998_inmux_put(struct snd_kcontrol *kcontrol, snd_soc_component_update_bits(component, mode_reg, ARIZONA_IN1_MODE_MASK, mode_val); - snd_soc_component_update_bits(component, e->reg, - ARIZONA_IN1L_SRC_MASK | - ARIZONA_IN1L_SRC_SE_MASK, - src_val); + change = snd_soc_component_update_bits(component, e->reg, + ARIZONA_IN1L_SRC_MASK | + ARIZONA_IN1L_SRC_SE_MASK, + src_val); - return snd_soc_dapm_mux_update_power(dapm, kcontrol, - ucontrol->value.enumerated.item[0], - e, NULL); + ret = snd_soc_dapm_mux_update_power(dapm, kcontrol, + ucontrol->value.enumerated.item[0], + e, NULL); + if (ret < 0) { + dev_err(arizona->dev, "Failed to update demux power state: %d\n", ret); + return ret; + } + + return change; } static const char * const wm8998_inmux_texts[] = { |