feat(uac_host): Add global suspend/resume#211
feat(uac_host): Add global suspend/resume#211peter-marcisovsky wants to merge 2 commits intomasterfrom
Conversation
d6a83d2 to
1c8eb77
Compare
| case USB_HOST_CLIENT_EVENT_DEV_SUSPENDED: | ||
| ESP_LOGD(TAG, "Device suspended"); | ||
| _uac_host_device_suspended(event->dev_suspend_resume.dev_hdl); | ||
| break; | ||
| case USB_HOST_CLIENT_EVENT_DEV_RESUMED: | ||
| ESP_LOGD(TAG, "Device resumed"); | ||
| _uac_host_device_resumed(event->dev_suspend_resume.dev_hdl); | ||
| break; |
There was a problem hiding this comment.
Hi @leeebo in this MR I am adding support for global suspend/resume of the root port.
In the current uac driver, there are public API functions like:
/**
* @brief Resume a UAC stream with same stream configuration
*/
esp_err_t uac_host_device_resume(uac_host_device_handle_t uac_dev_handle);
and
/**
* @brief Suspend a UAC stream
*
* @param[in] uac_dev_handle UAC device handle
*/
esp_err_t uac_host_device_suspend(uac_host_device_handle_t uac_dev_handle);
And other static functions like uac_host_interface_suspend(), uac_host_interface_resume().
Which are suspending and resuming the UAC stream, not the device itself in terms of power consumption lowering.
My concern here is, that users might get confused with naming of those functions. And might mistakenly call uac_host_device_suspend() with intention to put a UAC device into a suspended state, to lower it's power consumption. But the function only suspends a UAC stream.
Do you thinks we should consider renaming the functions to something like uac_host_device_suspend_stream() and uac_host_device_resume_stream() ? Can you PTAL and advise how to handle this?
There was a problem hiding this comment.
Yes, I think rename to _suspend_stream() and _resume_stream() is a good choice
There was a problem hiding this comment.
@leeebo renaming the public api would cause a breaking change for the UAC component.
Should should we consider bumping a Major version when releasing this feature ?
There was a problem hiding this comment.
@peter-marcisovsky Sorry for the late response. I prefer using Minor (v1.4.0) for this new feature, because in my understanding, Major usually refers to a significant update or refactoring, such as the introduction of support for UAC 2.0
leeebo
left a comment
There was a problem hiding this comment.
@peter-marcisovsky The implements LGTM! Thanks
1c8eb77 to
d55878d
Compare
d55878d to
1e40388
Compare
1cefd99 to
11cf819
Compare
c399316 to
fc62a98
Compare
fc62a98 to
7d15732
Compare
Description
This MR adds Suspend/Resume events for UAC class driver as a follow-up for the Global/Suspend resume
Changes
Added Suspend and Resume UAC Host interface events
Related
Testing
Checklist
Before submitting a Pull Request, please ensure the following: