From patchwork Tue Feb 25 13:17:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Nikula X-Patchwork-Id: 3716751 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A036E9F38B for ; Tue, 25 Feb 2014 13:18:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C3A8D201E4 for ; Tue, 25 Feb 2014 13:18:26 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 107FC201EC for ; Tue, 25 Feb 2014 13:18:25 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 0F7D726560D; Tue, 25 Feb 2014 14:18:24 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 4C4312655DE; Tue, 25 Feb 2014 14:17:56 +0100 (CET) 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 88A072655EF; Tue, 25 Feb 2014 14:17:55 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by alsa0.perex.cz (Postfix) with ESMTP id 82A26265463 for ; Tue, 25 Feb 2014 14:17:45 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 25 Feb 2014 05:17:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,540,1389772800"; d="scan'208";a="489456659" Received: from mylly.fi.intel.com (HELO mylly.fi.intel.com.) ([10.237.72.50]) by orsmga002.jf.intel.com with ESMTP; 25 Feb 2014 05:17:38 -0800 From: Jarkko Nikula To: alsa-devel@alsa-project.org Date: Tue, 25 Feb 2014 15:17:28 +0200 Message-Id: <1393334248-29033-2-git-send-email-jarkko.nikula@linux.intel.com> X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <1393334248-29033-1-git-send-email-jarkko.nikula@linux.intel.com> References: <1393334248-29033-1-git-send-email-jarkko.nikula@linux.intel.com> Cc: Liam Girdwood , Mark Brown , Jarkko Nikula , Liam Girdwood Subject: [alsa-devel] [PATCH 2/2] ASoC: Intel: byt-rt5640: Use init time DAI format 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 Setting static DAI format has been supported in the soc-core quite some time now so there is no need to set it runtime in machine driver. Signed-off-by: Jarkko Nikula --- sound/soc/intel/byt-rt5640.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/sound/soc/intel/byt-rt5640.c b/sound/soc/intel/byt-rt5640.c index 672fedbfa680..eff97c8e5218 100644 --- a/sound/soc/intel/byt-rt5640.c +++ b/sound/soc/intel/byt-rt5640.c @@ -57,19 +57,8 @@ static int byt_rt5640_hw_params(struct snd_pcm_substream *substream, { struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_dai *codec_dai = rtd->codec_dai; - unsigned int fmt; int ret; - fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | - SND_SOC_DAIFMT_CBS_CFS; - - ret = snd_soc_dai_set_fmt(codec_dai, fmt); - if (ret < 0) { - dev_err(codec_dai->dev, - "can't set codec DAI configuration %d\n", ret); - return ret; - } - ret = snd_soc_dai_set_sysclk(codec_dai, RT5640_SCLK_S_PLL1, params_rate(params) * 256, SND_SOC_CLOCK_IN); @@ -132,6 +121,8 @@ static struct snd_soc_dai_link byt_rt5640_dais[] = { .codec_dai_name = "rt5640-aif1", .codec_name = "i2c-10EC5640:00", .platform_name = "baytrail-pcm-audio", + .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | + SND_SOC_DAIFMT_CBS_CFS, .init = byt_rt5640_init, .ignore_suspend = 1, .ops = &byt_rt5640_ops, @@ -143,6 +134,8 @@ static struct snd_soc_dai_link byt_rt5640_dais[] = { .codec_dai_name = "rt5640-aif1", .codec_name = "i2c-10EC5640:00", .platform_name = "baytrail-pcm-audio", + .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | + SND_SOC_DAIFMT_CBS_CFS, .init = NULL, .ignore_suspend = 1, .ops = &byt_rt5640_ops,