Repository navigation
Conversation
The component probe requests the fault IRQ as a devres of the I2C device, which stays bound when the sound card is torn down. Every rebind of the card probes the component again and adds another handler for the same amp on the line: after two rebinds the J713's four amps had twelve handlers on their shared IRQ, each fault interrupt ran every one of them, and each does six I2C reads. Free the IRQ in the component remove. Request it as the probe's last step, so that a probe that fails later does not leave a handler behind either. Signed-off-by: Erik Bourget <erik@ebourget.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every time the sound card binds again, each TAS2764 adds another handler for itself on its fault IRQ. This frees the IRQ when the component is removed.
What happens
tas2764_codec_probe()requests the fault IRQ withdevm_request_threaded_irq()on the I2C device. The I2C device stays bound when the card is torn down, so the handler outlives the component. The next bind probes the component again and requests the IRQ again, andtas2764_codec_remove()never frees it.On the J713 the four amps share one active-low fault line. After two rebinds of the speaker card (for example
rmmod snd_soc_macaudio; modprobe snd_soc_macaudio, or reloadingsnd-soc-aopwith #759),/proc/interruptslisted twelvetas2764handlers on it. Each fault interrupt runs every one of them, and each reads six latch registers over I2C, so faults are handled later with every rebind. That includes the over-temperature and over-current group shutdown.The change
tas2764_codec_remove()frees it withdevm_free_irq()when the probe got it. That's tracked, because an amp outside an SDZ group carries on without the IRQ if the request fails.Testing (J713)
snd-soc-aopreload--strictis clean;