-
Notifications
You must be signed in to change notification settings - Fork 133
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/hybrid allocation take2 #4428
SoundWire/hybrid allocation take2 #4428
Conversation
This reverts commit 67e9dd7. Signed-off-by: Pierre-Louis Bossart <[email protected]>
…lback" This reverts commit c5019e4. Signed-off-by: Pierre-Louis Bossart <[email protected]>
This reverts commit 43bef8b. Signed-off-by: Pierre-Louis Bossart <[email protected]>
This reverts commit f071bff. Signed-off-by: Pierre-Louis Bossart <[email protected]>
345ad6f
to
fd360c7
Compare
The parameters are only the bus and the device number, manager ops may need additional details on the type of peripheral connected, such as whether it is wake-capable or not. Signed-off-by: Pierre-Louis Bossart <[email protected]>
Rather than add logic in the core for vendor-specific usages, add callbacks for vendor-specific device_number allocation and release. This patch only moves the existing IDA-based allocator used only by Intel to the intel_auxdevice.c file and does not change the functionality. Follow-up patches will extend the behavior by modifying the Intel callbacks. Signed-off-by: Pierre-Louis Bossart <[email protected]>
…tion The IDA-based allocation is useful to simplify debug, but it was also introduced as a prerequisite to deal with the Intel Lunar Lake hardware programming sequences: the wake-ups have to be handled with a system-unique SDI address at the HDaudio controller level. At the time, the restriction introduced by the IDA to 8 devices total seemed perfectly fine, but recently hardware vendors created configurations with more than 8 devices. Add a new allocation strategy to allow for more than 8 devices using information on the type of devices, and only use the IDA-based allocation for devices capable of generating a wake. Signed-off-by: Pierre-Louis Bossart <[email protected]>
fd360c7
to
0ff2f2f
Compare
Only failure is multiple_pause_resume, known firmware issue. |
moving back to draft, we have a race condition discussed in #4426 (comment) which needs to be handled first. |
Nothing in the SoundWire specification mandates that the Device Number be constant or fixed. This patch adds a helper to dynamically change the Device Number, either by re-running the bus allocation routine or with a manual override to be used from a debugfs file. Signed-off-by: Pierre-Louis Bossart <[email protected]>
This patch adds support for a debugfs file. Users can read the device number and override the default for stress tests or for convenience, e.g. to make sure devices always have the same device number no matter which order they appear as ATTACHED on the bus. Signed-off-by: Pierre-Louis Bossart <[email protected]>
@bardliao I added a tentative helper to change the device number on the fly. I tested it with debugfs
this seems to work mostly but there ire issues with interrupts apparently. If you have time to test feedback is welcome. I am not sure how safe this is to change the device_number, if we can't make it work then we have an issue with the IDA stuff, it can be defeated by probe delays
|
@plbossart I didn't meet the same issue as you. It works when the original dev_num is 6.
I verified playback worked after device number changed. |
Address upstream feedback from @vinodkoul and add callbacks rather than make the core logic more complicated.
The code is indeed cleaner with fewer if/else cases, and does not keep stuff we no longer need.
Compile-tested only for now.