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
SoundWire: rt5682: mutex problem #4371
Comments
Possible upstream issue, the last change was this commit 582ed31 ("ASoC:rt5682: Use a maple tree based register cache") |
It'll be the introduction of the RCU read lock. |
not sure what's so special about this RCU read lock. We have mutexes in SoundWire already, they don't seem to trigger any problem. |
It's an atomic lock, like a spinlock. |
errors reproduced with the latest topic/sof-dev branch. Reverting commit 582ed31 ("ASoC:rt5682: Use a maple tree based register cache") restores functionality in limited tests. |
Unfortunately the maple tree requires us to explicitly lock it so we need to take the RCU read lock while iterating. When syncing this means that we end up trying to write out register values while holding the RCU read lock which triggers lockdep issues since that is an atomic context but most buses can't be used in atomic context. Pause the iteration and drop the lock for each register we check to avoid this. Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Closes: thesofproject#4371 Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
limited remote tests with PR #4372 don't expose any problem with the patch suggested by @broonie
@keqiaozhang is there a way you can check locally if the headset functionality is fine on the BRYA devices? I can only check the results of scripts, not sure if it's actually playing/capturing any sound. |
Unfortunately the maple tree requires us to explicitly lock it so we need to take the RCU read lock while iterating. When syncing this means that we end up trying to write out register values while holding the RCU read lock which triggers lockdep issues since that is an atomic context but most buses can't be used in atomic context. Pause the iteration and drop the lock for each register we check to avoid this. Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Closes: thesofproject#4371 Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Unfortunately the maple tree requires us to explicitly lock it so we need to take the RCU read lock while iterating. When syncing this means that we end up trying to write out register values while holding the RCU read lock which triggers lockdep issues since that is an atomic context but most buses can't be used in atomic context. Pause the iteration and drop the lock for each register we check to avoid this. Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Closes: #4371 Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
@plbossart, sorry for my late reply, I have checked the headset functionality, both playback and capture can work, audio quality is good. |
Intel daily test: result/planresultdetail/26265?model=ADLP_BRYA_SDW&testcase=check-playback-all-formats
@bardliao @fredoh9 is this a known issue? I have not seen any reports of this error before....
The text was updated successfully, but these errors were encountered: