Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASoC: rt711_*: add snd_soc_component remove callback #2640

Merged
merged 1 commit into from
Dec 18, 2020

Conversation

bardliao
Copy link
Collaborator

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.

Signed-off-by: Bard Liao [email protected]

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.

Signed-off-by: Bard Liao <[email protected]>
@RanderWang
Copy link

@bardliao when device is removing, reg map can be accessed ? Do other drivers implement this ?

@bardliao
Copy link
Collaborator Author

@bardliao when device is removing, reg map can be accessed ? Do other drivers implement this ?

regmap can still be accessed during its removing process (device is not removed yet). I didn't see other drivers implement, but I think it is needed for rt711_* codecs. The point is that we can't access sdw registers when the bus driver is suspended. Currently we set regcache_cache_only(regmap, true) in rt711 suspend function. But if we tried to remove sound card in a corner case that codec is in resume but sdw bus is in suspend, we will meet the issue. And set regcache_cache_only(regmap, true) in component remove function can avoid it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants