Commit edf04f1
ALSA: hda/senary: Fix beep error handling and optimize EAPD switching
This patch addresses a potential state inconsistency bug and optimizes
runtime performance:
1. Fix error handling in set_beep_amp():
Previously, beep_nid was assigned before adding kcontrols. If
kcontrol creation failed, the function returned error but left
beep_nid set, causing inconsistent driver state. Moved the
assignment to the end of the function.
2. Optimize senary_auto_turn_eapd():
Removed the redundant snd_hda_query_pin_caps() check inside the
loop. The target pins are sourced from spec->eapds, which is
strictly filtered during the initial parse phase. Checking
capabilities again during every mute/unmute hook is unnecessary
overhead.
Signed-off-by: wangdicheng <wangdicheng@kylinos.cn>
Link: https://patch.msgid.link/20260310023649.155858-1-wangdich9700@163.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>1 parent c4791ce commit edf04f1
1 file changed
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | 79 | | |
81 | 80 | | |
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
85 | 84 | | |
86 | 85 | | |
| 86 | + | |
| 87 | + | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| |||
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| |||
0 commit comments