linux-stable/sound
Hui Wang c3715f06f9 ALSA: hda/realtek: call alc_update_headset_mode() in hp_automute_hook
commit e54f30befa upstream.

We found the alc_update_headset_mode() is not called on some machines
when unplugging the headset, as a result, the mode of the
ALC_HEADSET_MODE_UNPLUGGED can't be set, then the current_headset_type
is not cleared, if users plug a differnt type of headset next time,
the determine_headset_type() will not be called and the audio jack is
set to the headset type of previous time.

On the Dell machines which connect the dmic to the PCH, if we open
the gnome-sound-setting and unplug the headset, this issue will
happen. Those machines disable the auto-mute by ucm and has no
internal mic in the input source, so the update_headset_mode() will
not be called by cap_sync_hook or automute_hook when unplugging, and
because the gnome-sound-setting is opened, the codec will not enter
the runtime_suspend state, so the update_headset_mode() will not be
called by alc_resume when unplugging. In this case the
hp_automute_hook is called when unplugging, so add
update_headset_mode() calling to this function.

Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20210320091542.6748-2-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-07 14:47:42 +02:00
..
ac97
aoa
arm
atmel
core ALSA: seq: oss: Fix missing error check in snd_seq_oss_synth_make_info() 2021-01-27 11:47:39 +01:00
drivers ALSA: opl3: fix infoleak in opl3 2020-07-16 08:16:42 +02:00
firewire ALSA: dice: fix null pointer dereference when node is disconnected 2021-03-24 11:26:34 +01:00
hda ALSA: hda: ignore invalid NHLT table 2021-03-30 14:35:20 +02:00
i2c
isa ALSA: isa/wavefront: prevent out of bounds write in ioctl 2020-06-24 17:50:11 +02:00
mips
oss
parisc
pci ALSA: hda/realtek: call alc_update_headset_mode() in hp_automute_hook 2021-04-07 14:47:42 +02:00
pcmcia
ppc
sh ALSA: sh: Fix compile warning wrt const 2020-02-24 08:36:42 +01:00
soc ASoC: rt5659: Update MCLK rate in set_sysclk() 2021-04-07 14:47:40 +02:00
sparc
spi
synth
usb ALSA: usb-audio: Apply sample rate quirk to Logitech Connect 2021-04-07 14:47:41 +02:00
x86
xen
ac97_bus.c
Kconfig
last.c
Makefile
sound_core.c