]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
ALSA: hda/realtek: call alc_update_headset_mode() in hp_automute_hook
authorHui Wang <hui.wang@canonical.com>
Sat, 20 Mar 2021 09:15:42 +0000 (17:15 +0800)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 8 Apr 2021 20:42:49 +0000 (15:42 -0500)
commit4262c74ac1586fa3744547481ed46ea2b5c16afb
treeaff663ef9ef9384befab1c3adc57f180defe3ba1
parent08b531a00998673c2b429d49ae0ea31fcce1998f
ALSA: hda/realtek: call alc_update_headset_mode() in hp_automute_hook

BugLink: https://bugs.launchpad.net/bugs/1923069
commit e54f30befa7990b897189b44a56c1138c6bfdbb5 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>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
sound/pci/hda/patch_realtek.c