ASoC: rt711: add snd_soc_component remove callback
Subsystems (3)
PATCH 1/1 ASoC: rt711: add snd_soc_component remove callback
We do some IO operations in the snd_soc_component_set_jack callback function and snd_soc_component_set_jack() will be called when soc component is removed. However, we should not access SoundWire registers when the bus is suspended.
So set regcache_cache_only(regmap, true) to avoid accessing in the soc component removal process.
--- sound/soc/codecs/rt711.c | 8 ++++++++ 1 file changed, 8 insertions(+)
sound/soc/codecs/rt711.c +8 -0
@@ -895,6 +895,13 @@ static int rt711_probe(struct snd_soc_component *component)return 0 ; } +static void rt711_remove (struct snd_soc_component *component) +{ +struct rt711_priv *rt711 =snd_soc_component_get_drvdata (component); + +regcache_cache_only (rt711->regmap, true); +} +static const struct snd_soc_component_driver soc_codec_dev_rt711 = { .probe = rt711_probe, .set_bias_level = rt711_set_bias_level,
@@ -905,6 +912,7 @@ static const struct snd_soc_component_driver soc_codec_dev_rt711 = { .dapm_routes = rt711_audio_map, .num_dapm_routes = ARRAY_SIZE(rt711_audio_map), .set_jack = rt711_set_jack_detect, + .remove = rt711_remove, }; static int rt711_set_sdw_stream(struct snd_soc_dai *dai, void *sdw_stream,
Signature · 1 line
2.17.1
Mark Brown
maintainerQuoted 6 lines · Bard Liao
We do some IO operations in the
snd_soc_component_set_jackcallback function andsnd_soc_component_set_jack()will be called when soc component is removed. However, we should not access SoundWire registers when the bus is suspended.
So setregcache_cache_only(regmap, true)to avoid accessing in the soc component removal process.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: rt711: add snd_soc_component remove callback
commit: 899b12542b0897f92de9ba30944937c39ebb246d
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark