ALSA: hda: beep: Simplify keep-power-at-enable behavior
authorTakashi Iwai <tiwai@suse.de>
Tue, 6 Sep 2022 09:23:06 +0000 (11:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 10:34:54 +0000 (12:34 +0200)
commit928ac9fc1ace8a8387bc80b2cd5a525da1516817
tree47f6c2a58d4eb027de881de14a6d4e2a19b061cb
parentfbb88a7c84c1baf6b55f3ecf66a0f1552db3908b
ALSA: hda: beep: Simplify keep-power-at-enable behavior

[ Upstream commit 4c8d695cb9bc5f6fd298a586602947b2fc099a64 ]

The recent fix for IDT codecs to keep the power up while the beep is
enabled can be better integrated into the beep helper code.
This patch cleans up the code with refactoring.

Fixes: 414d38ba8710 ("ALSA: hda/sigmatel: Keep power up while beep is enabled")
Link: https://lore.kernel.org/r/20220906092306.26183-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/pci/hda/hda_beep.c
sound/pci/hda/hda_beep.h
sound/pci/hda/patch_sigmatel.c