Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
zephyr: Explicitly manage DAI power states during D3 transitions
Zephyr's device power management framework offers two methods for reducing power consumption: Device Runtime Power Management and System-Managed Device Power Management. These methods allow devices to be suspended when idle, either independently or as part of system power state transitions. The framework is designed to minimize power usage with minimal intervention from applications, relying on device drivers to manage the power state transitions of their devices. The SOF firmware uses Zephyr's Device Runtime Power Management for DAIs, where the device driver is responsible for indicating the active or idle state of the device. However, during system-wide power state transitions such as D3 entry and exit, explicit power state management is necessary to maintain audio data integrity and prevent artifacts. In SOF, entry into the D3 power state requires that there be no active audio pipelines. This means that all pipelines must be paused (if not deleted), and while paused DAIs remain powered up, they must be explicitly managed to ensure they are in the correct state for D3 transitions. This patch enhances the SOF firmware's power management by adding static helper functions `suspend_dais()` and `resume_dais()` within `cpu.c`. These functions manage the power states of DAI components explicitly during D3 state transitions, ensuring that DAIs are suspended before the DSP core enters D3 and resumed upon wake-up. By implementing this logic within the SOF firmware, we provide a more integrated and reliable power management process that aligns with the complex requirements of audio DSP workloads. This approach ensures that the SOF firmware can manage DAI power states effectively, complementing Zephyr's device runtime PM framework. Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
- Loading branch information