From mboxrd@z Thu Jan 1 00:00:00 1970 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=-5.2 required=3.0 tests=DEAR_SOMETHING,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 05B5DC10DCE for ; Wed, 18 Mar 2020 09:37:28 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8471120771 for ; Wed, 18 Mar 2020 09:37:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="kr7jfLUu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8471120771 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id B35751763; Wed, 18 Mar 2020 10:36:35 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B35751763 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1584524245; bh=fRG+jGEt+sH088/KGK+xRAyusCfhNU0d3/fqbUy+Cnc=; h=Subject:To:References:From:Date:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=kr7jfLUu7VgrAenzAvu64RpT4mK9412+1akSStU6HHVRkhJ6VqrVu9sPVU1PYLNSy zE8Eb6fF3MpO+ZVlj3t9Fra0IaizVwhh+MgRGL47barwp2DjbKGn9TUiq+zeyLsZ0Y yDJ+ZKP1EWCmKdfD3dIa23T3zh0UA68qVtERDhTE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id EBFC5F8028C; Wed, 18 Mar 2020 10:36:20 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 12F51F8028D; Wed, 18 Mar 2020 10:36:19 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id D9E00F80212 for ; Wed, 18 Mar 2020 10:36:14 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D9E00F80212 IronPort-SDR: WklYk5XbWSCE5vEm7fFpBDdMi8l4TPZgFnMCiVQBco23Pc74iJikc5JSNtn48iESVPISdV4Hg4 KB7tdcTp2egg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2020 02:36:12 -0700 IronPort-SDR: ChNEYfGz/CwAy4qyVd/Dglll80ybrQ4FKxX6qO1Jap3fQIR8UW64NhTtdsAKYVn1aylX8M+K0+ hN+o+nW0QIjA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,566,1574150400"; d="scan'208";a="324111977" Received: from hwang33-mobl.ccr.corp.intel.com (HELO [10.254.210.239]) ([10.254.210.239]) by orsmga001.jf.intel.com with ESMTP; 18 Mar 2020 02:36:09 -0700 Subject: Re: [PATCH 1/2] ASoC: rt5682: fix the random recording noise of headset To: Albert Chen , =?UTF-8?B?U2h1bWluZyBb6IyD5pu46YqY?= =?UTF-8?Q?=5d?= , "broonie@kernel.org" , "lgirdwood@gmail.com" References: <20200317073308.11572-1-shumingf@realtek.com> <2dc0887c-b86f-0f76-2107-bd7978e7a204@linux.intel.com> <8ffd32c6b52b4684bdcdd45f095f38b2@realtek.com> From: Keyon Jie Message-ID: Date: Wed, 18 Mar 2020 17:36:32 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <8ffd32c6b52b4684bdcdd45f095f38b2@realtek.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Cc: Oder Chiou , Jack Yu , "alsa-devel@alsa-project.org" , "lars@metafoo.de" , =?UTF-8?B?RGVyZWsgW+aWueW+t+e+qV0=?= , "sathya.prakash.m.r@intel.com" , "Flove\(HsinFu\)" X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On 3/18/20 2:07 PM, Albert Chen wrote: > > > -----Original Message----- > From: Keyon Jie > Sent: Wednesday, March 18, 2020 11:31 AM > To: Albert Chen ; Shuming [范書銘] ; broonie@kernel.org; lgirdwood@gmail.com > Cc: Oder Chiou ; Jack Yu ; alsa-devel@alsa-project.org; lars@metafoo.de; Derek [方德義] ; sathya.prakash.m.r@intel.com; Flove(HsinFu) > Subject: Re: [PATCH 1/2] ASoC: rt5682: fix the random recording noise of headset > > > On 3/18/20 11:06 AM, Albert Chen wrote: >> Dear Sir, >> >> Inline. >> >> Thanks, >> Albert >> >> -----Original Message----- >> From: Keyon Jie >> Sent: Wednesday, March 18, 2020 10:32 AM >> To: Shuming [范書銘] ; broonie@kernel.org; >> lgirdwood@gmail.com >> Cc: Oder Chiou ; Jack Yu >> ; alsa-devel@alsa-project.org; lars@metafoo.de; >> Albert Chen ; Derek [方德義] >> ; sathya.prakash.m.r@intel.com; Flove(HsinFu) >> >> Subject: Re: [PATCH 1/2] ASoC: rt5682: fix the random recording noise >> of headset >> >> On 3/17/20 3:33 PM, shumingf@realtek.com wrote: >>> From: Shuming Fan >>> >>> The cycle time of FIFO clock should increase 2 times to avoid the >>> random recording noise issue. >>> This setting could apply to all known situations in i2s mode. >> >> Thanks for fixing this Shuming. >> >> Just try to understand what has happened. >> >> Can you help share more details about it, e.g. >> 1. the recording noise happened on headset mic or dmic? >> Headset Mic >> 2. will this change impact the microphone sampling clock, or the BCLK that of the I2S bclk pin? >> No. >> 3. without this change, why the clk is wrong, some example? >> Only adjust FIFO buffer setting. > > Where is the FIFO buffer you mentioned located? Is it included in the path "headset mic ADC--(loopback)-->ADC headphone"? > I2S interface. > > The issue was reported to Intel also, that's why I am querying this here. > > From previous feedback, Shuming shared that the loopback path mentioned above don't have this random noise issue. > > These are have total two recording random noise issues, one is the PCB trace design and another is Codec setting, Our previous reported is PCB trace cause noise. Okay, thanks for explaining. Looks good to me now. :) Thanks, ~Keyon > > Thanks, > ~Keyon > >> >> Thanks, >> ~Keyon >> >>> >>> Signed-off-by: Shuming Fan >>> --- >>> sound/soc/codecs/rt5682.c | 2 ++ >>> sound/soc/codecs/rt5682.h | 2 ++ >>> 2 files changed, 4 insertions(+) >>> >>> diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c >>> index 7ca02a5e52e9..023bc672274b 100644 >>> --- a/sound/soc/codecs/rt5682.c >>> +++ b/sound/soc/codecs/rt5682.c >>> @@ -3643,6 +3643,8 @@ static int rt5682_i2c_probe(struct i2c_client *i2c, >>> RT5682_CP_CLK_HP_MASK, RT5682_CP_CLK_HP_300KHZ); >>> regmap_update_bits(rt5682->regmap, RT5682_HP_CHARGE_PUMP_1, >>> RT5682_PM_HP_MASK, RT5682_PM_HP_HV); >>> + regmap_update_bits(rt5682->regmap, RT5682_DMIC_CTRL_1, >>> + RT5682_FIFO_CLK_DIV_MASK, RT5682_FIFO_CLK_DIV_2); >>> >>> INIT_DELAYED_WORK(&rt5682->jack_detect_work, >>> rt5682_jack_detect_handler); >>> diff --git a/sound/soc/codecs/rt5682.h b/sound/soc/codecs/rt5682.h >>> index 43de6e802309..0baeece84ec4 100644 >>> --- a/sound/soc/codecs/rt5682.h >>> +++ b/sound/soc/codecs/rt5682.h >>> @@ -657,6 +657,8 @@ >>> #define RT5682_DMIC_1_EN_SFT 15 >>> #define RT5682_DMIC_1_DIS (0x0 << 15) >>> #define RT5682_DMIC_1_EN (0x1 << 15) >>> +#define RT5682_FIFO_CLK_DIV_MASK (0x7 << 12) >>> +#define RT5682_FIFO_CLK_DIV_2 (0x1 << 12) >>> #define RT5682_DMIC_1_DP_MASK (0x3 << 4) >>> #define RT5682_DMIC_1_DP_SFT 4 >>> #define RT5682_DMIC_1_DP_GPIO2 (0x0 << 4) >>> >> >> ------Please consider the environment before printing this e-mail. >>