mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-12-04 21:00:56 -06:00
ASoC: codecs: rt5514: Propagate bias restore errors
rt5514_set_bias_level() restores normal recording settings when leaving the DSP-enabled state, but ignores both the patch write and regcache_sync() failures. The bias transition can therefore report success even when the restore did not complete. Propagate the write and sync errors from the bias-level restore path. Only clear dsp_enabled after both restore operations succeed, so a failed restore keeps the internal state retryable. Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn> Link: https://patch.msgid.link/20260704074550.57755-1-pengpeng@iscas.ac.cn Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
@@ -1073,12 +1073,18 @@ static int rt5514_set_bias_level(struct snd_soc_component *component,
|
||||
* settings to make sure recording properly.
|
||||
*/
|
||||
if (rt5514->dsp_enabled) {
|
||||
rt5514->dsp_enabled = 0;
|
||||
regmap_multi_reg_write(rt5514->i2c_regmap,
|
||||
rt5514_i2c_patch,
|
||||
ARRAY_SIZE(rt5514_i2c_patch));
|
||||
ret = regmap_multi_reg_write(rt5514->i2c_regmap,
|
||||
rt5514_i2c_patch,
|
||||
ARRAY_SIZE(rt5514_i2c_patch));
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
regcache_mark_dirty(rt5514->regmap);
|
||||
regcache_sync(rt5514->regmap);
|
||||
ret = regcache_sync(rt5514->regmap);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
rt5514->dsp_enabled = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user