From patchwork Wed Jul 26 20:47:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harsha Priya X-Patchwork-Id: 9865869 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 25A10602B1 for ; Wed, 26 Jul 2017 20:48:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 180722871C for ; Wed, 26 Jul 2017 20:48:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C7A628733; Wed, 26 Jul 2017 20:48:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 720D32871C for ; Wed, 26 Jul 2017 20:48:50 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id CD9D8267566; Wed, 26 Jul 2017 22:48:20 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id B6682266D12; Wed, 26 Jul 2017 22:48:18 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by alsa0.perex.cz (Postfix) with ESMTP id 180C3267575 for ; Wed, 26 Jul 2017 22:48:00 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jul 2017 13:48:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,416,1496127600"; d="scan'208";a="129858778" Received: from pharsha-ubuntu.sc.intel.com ([10.3.62.176]) by orsmga005.jf.intel.com with ESMTP; 26 Jul 2017 13:48:00 -0700 From: Harsha Priya To: tiwai@suse.de, vinod.koul@intel.com, broonie@kernel.org, alsa-devel@alsa-project.org Date: Wed, 26 Jul 2017 13:47:43 -0700 Message-Id: <1501102065-11083-2-git-send-email-harshapriya.n@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1501102065-11083-1-git-send-email-harshapriya.n@intel.com> References: <1501102065-11083-1-git-send-email-harshapriya.n@intel.com> Cc: Harsha Priya Subject: [alsa-devel] [v2 1/3] ASoC: Intel: Fix cracking noise in rt5663 headphones for kabylake platform X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP This patch fixes the cracking noise in rt5663 headphones for kabylake platform by calling the rt5663_sel_asrc_clk_src() for RT5663_AD_STEREO_FILTER as well. The ASRC function is for asynchronous MCLK and LRCK. For RT5663 ASRC should be enabled to support special i2s clock format like Intel's 100fs. ASRC function will track i2s clock and generate a corresponding system clock for codec. Calling this function helps select the clock source for both RT5663_AD_STEREO_FILTER and RT5663_DA_STEREO_FILTER filters which fixes the crackling sound. Signed-off-by: Harsha Priya --- sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c index 3fe4a08..cfde894 100644 --- a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c +++ b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c @@ -319,7 +319,9 @@ static int kabylake_rt5663_hw_params(struct snd_pcm_substream *substream, int ret; /* use ASRC for internal clocks, as PLL rate isn't multiple of BCLK */ - rt5663_sel_asrc_clk_src(codec_dai->codec, RT5663_DA_STEREO_FILTER, 1); + rt5663_sel_asrc_clk_src(codec_dai->codec, + RT5663_DA_STEREO_FILTER | RT5663_AD_STEREO_FILTER, + RT5663_CLK_SEL_I2S1_ASRC); ret = snd_soc_dai_set_sysclk(codec_dai, RT5663_SCLK_S_MCLK, 24576000, SND_SOC_CLOCK_IN);