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 C54A3C433DB for ; Mon, 22 Mar 2021 11:20:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 95C856191A for ; Mon, 22 Mar 2021 11:20:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229941AbhCVLUV (ORCPT ); Mon, 22 Mar 2021 07:20:21 -0400 Received: from mx2.suse.de ([195.135.220.15]:60322 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229673AbhCVLTu (ORCPT ); Mon, 22 Mar 2021 07:19:50 -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 187B7ADAA; Mon, 22 Mar 2021 11:19:49 +0000 (UTC) Date: Mon, 22 Mar 2021 12:19:48 +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 1/2] ALSA: hda/realtek: fix a determine_headset_type issue for a Dell AIO In-Reply-To: <20210320091542.6748-1-hui.wang@canonical.com> References: <20210320091542.6748-1-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:41 +0100, Hui Wang wrote: > > We found a recording issue on a Dell AIO, users plug a headset-mic and > select headset-mic from UI, but can't record any sound from > headset-mic. The root cause is the determine_headset_type() returns a > wrong type, e.g. users plug a ctia type headset, but that function > returns omtp type. > > On this machine, the internal mic is not connected to the codec, the > "Input Source" is headset mic by default. And when users plug a > headset, the determine_headset_type() will be called immediately, the > codec on this AIO is alc274, the delay time for this codec in the > determine_headset_type() is only 80ms, the delay is too short to > correctly determine the headset type, the fail rate is nearly 99% when > users plug the headset with the normal speed. > > Other codecs set several hundred ms delay time, so here I change the > delay time to 850ms for alc2x4 series, after this change, the fail > rate is zero unless users plug the headset slowly on purpose. > > Cc: > Signed-off-by: Hui Wang Applied, thanks. Takashi