ALSA: hda/realtek - Reduce click noise on Dell Precision 5820 headphone
commit843a9a5b5675e72814a4e18cbce2ed7c2a077032
authorTakashi Iwai <tiwai@suse.de>
Wed, 20 Feb 2019 15:15:45 +0000 (20 16:15 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Mar 2019 12:10:57 +0000 (19 13:10 +0100)
tree11ff539b4b054e4c3a75a44d504c410918bb89c0
parent6f63adaf88816b72f74b22aaa40d55fab993c572
ALSA: hda/realtek - Reduce click noise on Dell Precision 5820 headphone

commit c0ca5eced22215c1e03e3ad479f8fab0bbb30772 upstream.

Dell Precision 5820 with ALC3234 codec (which is equivalent with
ALC255) shows click noises at (runtime) PM resume on the headphone.
The biggest source of the noise comes from the cleared headphone pin
control at resume, which is done via the standard shutup procedure.

Although we have an override of the standard shutup callback to
replace with NOP, this would skip other needed stuff (e.g. the pull
down of headset power).  So, instead, this "fixes" the behavior of
alc_fixup_no_shutup() by introducing spec->no_shutup_pins flag.
When this flag is set, Realtek codec won't call the standard
snd_hda_shutup_pins() & co.  Now alc_fixup_no_shutup() just sets this
flag instead of overriding spec->shutup callback itself.  This allows
us to apply the similar fix for other entries easily if needed in
future.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/pci/hda/patch_realtek.c