Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp11154476imu; Thu, 6 Dec 2018 12:27:12 -0800 (PST) X-Google-Smtp-Source: AFSGD/U+Gz+o/xPG4/8QI7miw2SphrwVleBH9gtDv+7aeEd5joukJdM3ZKqEjt54v/k6YU7mtg7a X-Received: by 2002:a17:902:2a66:: with SMTP id i93mr29087037plb.113.1544128032192; Thu, 06 Dec 2018 12:27:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544128032; cv=none; d=google.com; s=arc-20160816; b=pmG/Qj1LDycGngPgFVmONk0XS0/nk8M3c0LHax/StOsCyf0VAL264m6TUtoz/85H+d R0bO9g3M6WknMtN6j8ssSg4gGq90rjR/dpK7YZY9Dk4w6EmUw1+ZQNbESkVlk94l9ENs 8U8ldPLivFx+5yGq2hbkPKD6sh2/DAMsw88nAcumlc8vN+sTnGAqrLLEgn+99c4SzUrz Zn10kKuay9y2N8mXTb9eKN6KAyqXO+zsnk+bCcK+bniy2eKAPy0/Q4TInXPH4RpwaGMY L8U89UIPA0XE9cntiDE+a2CF2CsoWwW+fX+Cio5KwhKrAELe46wMZQFrKlx/x4naqz6x 6Lhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:in-reply-to:subject:cc:to :from:dkim-signature; bh=NxR6Sngaos64k0bU68KuHOWuEV7L5qj+QzolACtoLr8=; b=Plln1WIB4x0W5piKzE5y21Z90TUD6qxI0K5Eqll32qmDnV/e7gj0zSzpOxe5IeGkHO lNfoIEp3/HGim9DtbJm6pczngkGrjeh6DLLlGkPluWX2IfqOG+KE80RkZ/6duzXmzkj9 JTRA+HqzetA+gX+1wD4/zgjZE1JtI6kJ7XdPJJfAhi7YZLES1FnrTsjWSYpNYT9ML14a Ptey5afO5BlUj4KV5Lhgzz11dgLJeabamnpKa92u+QnDgMBPzvlzjMyPVbLDhkh0cpJw yQ3TrTATapr0VeYpOq842/WFw29hYfHZpxRmd7bddy+kaemEAV+T2tlgTwGYp4P2Wu/e v//g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=NDjpk1kn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y20si994840plr.106.2018.12.06.12.26.57; Thu, 06 Dec 2018 12:27:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=NDjpk1kn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725995AbeLFUZs (ORCPT + 99 others); Thu, 6 Dec 2018 15:25:48 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:36188 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725916AbeLFUZr (ORCPT ); Thu, 6 Dec 2018 15:25:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=NxR6Sngaos64k0bU68KuHOWuEV7L5qj+QzolACtoLr8=; b=NDjpk1knTNR/ X76Qoj3XfTDA/5FLqCdrpYS7Pp6rMRfRLwQXAulJANOnphePhksYRUyQZlb3XbcIpxC+CaVLfAhqZ SAPrwn/YbQGPazV7wFhiBFqb5oLBHzONwq/3VGD78R6aDSMXTeVVwYKBRcAxyn6iqkPo5jXceGw/3 AUuGw=; Received: from cpc102320-sgyl38-2-0-cust46.18-2.cable.virginm.net ([82.37.168.47] helo=debutante.sirena.org.uk) by heliosphere.sirena.org.uk with esmtpa (Exim 4.89) (envelope-from ) id 1gV0DO-0001g2-Lk; Thu, 06 Dec 2018 20:25:42 +0000 Received: by debutante.sirena.org.uk (Postfix, from userid 1000) id 5151311252F7; Thu, 6 Dec 2018 20:25:42 +0000 (GMT) From: Mark Brown To: Cheng-Yi Chiang Cc: Srinivas Kandagatla , Mark Brown , linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, tzungbi@chromium.org, Mark Brown , Rohit kumar , dgreid@chromium.org, alsa-devel@alsa-project.org Subject: Applied "ASoC: sdm845: Add configuration for headset codec" to the asoc tree In-Reply-To: <20181128090037.257359-4-cychiang@chromium.org> X-Patchwork-Hint: ignore Message-Id: <20181206202542.5151311252F7@debutante.sirena.org.uk> Date: Thu, 6 Dec 2018 20:25:42 +0000 (GMT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch ASoC: sdm845: Add configuration for headset codec has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark From f7485875a68792d3e5d3984d521f2498ee385fa3 Mon Sep 17 00:00:00 2001 From: Cheng-Yi Chiang Date: Wed, 28 Nov 2018 17:00:36 +0800 Subject: [PATCH] ASoC: sdm845: Add configuration for headset codec Set DAI format and sysclk for headset codec. Signed-off-by: Cheng-Yi Chiang Acked-by: Srinivas Kandagatla Signed-off-by: Mark Brown --- sound/soc/qcom/sdm845.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/sound/soc/qcom/sdm845.c b/sound/soc/qcom/sdm845.c index d0df7ec6042e..1db8ef668223 100644 --- a/sound/soc/qcom/sdm845.c +++ b/sound/soc/qcom/sdm845.c @@ -14,6 +14,7 @@ #include #include "common.h" #include "qdsp6/q6afe.h" +#include "../codecs/rt5663.h" #define DEFAULT_SAMPLE_RATE_48K 48000 #define DEFAULT_MCLK_RATE 24576000 @@ -125,9 +126,27 @@ static int sdm845_snd_hw_params(struct snd_pcm_substream *substream, { struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_dai *cpu_dai = rtd->cpu_dai; + struct snd_soc_dai *codec_dai = rtd->codec_dai; int ret = 0; switch (cpu_dai->id) { + case PRIMARY_MI2S_RX: + case PRIMARY_MI2S_TX: + /* + * Use ASRC for internal clocks, as PLL rate isn't multiple + * of BCLK. + */ + rt5663_sel_asrc_clk_src( + codec_dai->component, + 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, DEFAULT_MCLK_RATE, + SND_SOC_CLOCK_IN); + if (ret < 0) + dev_err(rtd->dev, + "snd_soc_dai_set_sysclk err = %d\n", ret); + break; case QUATERNARY_TDM_RX_0: case QUATERNARY_TDM_TX_0: ret = sdm845_tdm_snd_hw_params(substream, params); @@ -202,6 +221,7 @@ static int sdm845_snd_startup(struct snd_pcm_substream *substream) switch (cpu_dai->id) { case PRIMARY_MI2S_RX: case PRIMARY_MI2S_TX: + codec_dai_fmt |= SND_SOC_DAIFMT_NB_NF; if (++(data->pri_mi2s_clk_count) == 1) { snd_soc_dai_set_sysclk(cpu_dai, Q6AFE_LPASS_CLK_ID_MCLK_1, @@ -211,6 +231,7 @@ static int sdm845_snd_startup(struct snd_pcm_substream *substream) MI2S_BCLK_RATE, SNDRV_PCM_STREAM_PLAYBACK); } snd_soc_dai_set_fmt(cpu_dai, fmt); + snd_soc_dai_set_fmt(codec_dai, codec_dai_fmt); break; case SECONDARY_MI2S_TX: -- 2.19.0.rc2