]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ALSA: hda/realtek: Fix speaker amp on HP Envy AiO 32
authorTakashi Iwai <tiwai@suse.de>
Tue, 4 May 2021 09:18:02 +0000 (11:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 May 2021 08:49:30 +0000 (10:49 +0200)
commit84a360fcffdc35822790b05a1e7d940ff8fe0413
treef61c6dd89a8f10e29f285a853f8803d6f8d48df8
parent65b1fd4153669af0a3ebf3bb5923034e5944fedb
ALSA: hda/realtek: Fix speaker amp on HP Envy AiO 32

commit 622464c893142f7beac89f5ba8c9773bca5e5004 upstream.

HP Envy AiO 32-a12xxx has an external amp that is controlled via GPIO
bit 0x04.  However, unlike other devices, this amp seems to shut down
itself after the certain period, hence the OS needs to up/down the bit
dynamically only during the actual playback.

This patch adds the control of the GPIO bit via the existing pcm_hook
mechanism.  Ideally it should be triggered at the actual stream start,
but we have only the state change at prepare/cleanup, so use those for
switching the GPIO bit on/off.  This should be good enough for the
purpose, and was actually confirmed to work fine.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=212873
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210504091802.13200-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/pci/hda/patch_realtek.c