mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
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>
This commit is contained in:
parent
c4791ce96b
commit
edf04f1af0
1 changed files with 5 additions and 5 deletions
Loading…
Add table
Add a link
Reference in a new issue