Commit 93a628f
committed
fix: temporarily handle audio loss after sleep on some devices
Added a temporary compatibility script to handle audio loss issues after
system sleep/wakeup on certain devices. The change introduces a fallback
mechanism that runs a PipeWire suspend script if it exists, otherwise
falls back to the original PulseAudio suspend/resume functions.
The main changes include:
1. Added a new function `runPipewireSuspendScriptIfExists()` that checks
for and executes `/usr/lib/deepin-daemon/pipewire-suspend.sh` with an
action parameter
2. Modified the sleep inhibitor to call this script before and after
sleep (with "1" for suspend and "0" for resume)
3. The script execution takes precedence - if the script exists and
runs successfully, the original PulseAudio suspend/resume functions
are skipped
4. This provides a temporary workaround for devices experiencing audio
loss after wakeup from sleep
This is a temporary compatibility measure until a more permanent
solution can be implemented for the audio subsystem.
fix: 临时处理部分设备睡眠后音频丢失问题
添加了临时兼容性脚本来处理部分设备在系统睡眠/唤醒后音频丢失的问题。该更
改引入了一个回退机制,如果存在 PipeWire 挂起脚本则运行该脚本,否则回退到
原始的 PulseAudio 挂起/恢复函数。
主要更改包括:
1. 添加了新函数 `runPipewireSuspendScriptIfExists()`,用于检查并执行 `/
usr/lib/deepin-daemon/pipewire-suspend.sh` 脚本并传入操作参数
2. 修改了睡眠抑制器,在睡眠前后调用此脚本("1" 表示挂起,"0" 表示恢复)
3. 脚本执行具有优先权 - 如果脚本存在并成功运行,则跳过原始的 PulseAudio
挂起/恢复函数
4. 这为在睡眠唤醒后遇到音频丢失问题的设备提供了一个临时解决方案
这是一个临时兼容性措施,直到音频子系统能够实现更永久的解决方案。
PMS: BUG-3520931 parent c1f483c commit 93a628f
1 file changed
Lines changed: 26 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
17 | 34 | | |
18 | 35 | | |
19 | 36 | | |
| |||
59 | 76 | | |
60 | 77 | | |
61 | 78 | | |
62 | | - | |
63 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
64 | 83 | | |
65 | 84 | | |
66 | 85 | | |
| |||
70 | 89 | | |
71 | 90 | | |
72 | 91 | | |
73 | | - | |
74 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
75 | 96 | | |
76 | 97 | | |
77 | 98 | | |
| |||
0 commit comments