Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24CAAC433E2 for ; Mon, 22 Mar 2021 11:20:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D27D761984 for ; Mon, 22 Mar 2021 11:20:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229984AbhCVLUX (ORCPT ); Mon, 22 Mar 2021 07:20:23 -0400 Received: from mx2.suse.de ([195.135.220.15]:60476 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229915AbhCVLUC (ORCPT ); Mon, 22 Mar 2021 07:20:02 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 1E1D3ADAA; Mon, 22 Mar 2021 11:20:01 +0000 (UTC) Date: Mon, 22 Mar 2021 12:20:01 +0100 Message-ID: From: Takashi Iwai To: Hui Wang Cc: alsa-devel@alsa-project.org, kailang@realtek.com, stable@vger.kernel.org Subject: Re: [PATCH v3 2/2] ALSA: hda/realtek: call alc_update_headset_mode() in hp_automute_hook In-Reply-To: <20210320091542.6748-2-hui.wang@canonical.com> References: <20210320091542.6748-1-hui.wang@canonical.com> <20210320091542.6748-2-hui.wang@canonical.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Sat, 20 Mar 2021 10:15:42 +0100, Hui Wang wrote: > > 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: > Signed-off-by: Hui Wang Applied, thanks. Takashi