Commit fc93caf
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>1 parent 4aaaf9e commit fc93caf
1 file changed
Lines changed: 68 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
| 21 | + | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
| |||
47 | 51 | | |
48 | 52 | | |
49 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
50 | 114 | | |
51 | 115 | | |
52 | 116 | | |
| |||
80 | 144 | | |
81 | 145 | | |
82 | 146 | | |
| 147 | + | |
| 148 | + | |
83 | 149 | | |
84 | 150 | | |
85 | 151 | | |
| |||
99 | 165 | | |
100 | 166 | | |
101 | 167 | | |
| 168 | + | |
| 169 | + | |
102 | 170 | | |
103 | 171 | | |
104 | 172 | | |
| |||
0 commit comments