From patchwork Wed Apr 23 08:04:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 28849 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f198.google.com (mail-ig0-f198.google.com [209.85.213.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 854A920534 for ; Wed, 23 Apr 2014 08:05:58 +0000 (UTC) Received: by mail-ig0-f198.google.com with SMTP id h3sf2356072igd.1 for ; Wed, 23 Apr 2014 01:05:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:cc:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=0ILbr+l+yncaEhoR8EzATXj0i7CuyeprSY7rK4VRFm4=; b=FbUbz7ojbrxgyCJsuIzzGke47OWUTfoY58KLgC/S2z5L4c/Pi8gh/nFm7L3aTixE4S MaPPi3uzTGSFnsV3/bc0Jj6H3WeO8QldUGFwoK7rx7u3olTkvaHZlbSPdlkyVWPtDIKA 37gO/ONY1cuWZZWUBTXQvfR54K5Dku5g7/BU3z12gvLg/LQu0jEWzQjt4jq36Tn3ZB5A DHPYtWSKv4EtgUy/NaSr76ldIB2t1Ri+FzXWNoFzE8Pzxgg/bglNp861qbKKSYqSdKG+ DTXUSNUS0FZclOAbv1Oh41tFJpJPfLIn+3CrA7mx+TxFNEJEsA1jCKhn56A7+a/WPr2P MbJw== X-Gm-Message-State: ALoCoQlEsXzLoAxS/J+5qH7PHZl2egqZZo7/6Mgjd1EZDHjRE5TABZ71FRLkHjZPHTVQ5V4Jrz4P X-Received: by 10.42.235.206 with SMTP id kh14mr19302179icb.30.1398240358050; Wed, 23 Apr 2014 01:05:58 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.98.229 with SMTP id o92ls458646qge.95.gmail; Wed, 23 Apr 2014 01:05:57 -0700 (PDT) X-Received: by 10.221.27.8 with SMTP id ro8mr238588vcb.30.1398240357917; Wed, 23 Apr 2014 01:05:57 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id w15si36832vcz.73.2014.04.23.01.05.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Apr 2014 01:05:57 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id lg15so713193vcb.16 for ; Wed, 23 Apr 2014 01:05:57 -0700 (PDT) X-Received: by 10.58.185.145 with SMTP id fc17mr45751265vec.14.1398240357833; Wed, 23 Apr 2014 01:05:57 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp84997vcb; Wed, 23 Apr 2014 01:05:57 -0700 (PDT) X-Received: by 10.14.216.2 with SMTP id f2mr14800352eep.83.1398240356825; Wed, 23 Apr 2014 01:05:56 -0700 (PDT) Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id l41si2011372eef.38.2014.04.23.01.05.56 for ; Wed, 23 Apr 2014 01:05:56 -0700 (PDT) Received-SPF: none (google.com: alsa-devel-bounces@alsa-project.org does not designate permitted sender hosts) client-ip=77.48.224.243; Received: by alsa0.perex.cz (Postfix, from userid 1000) id 6ED812650F2; Wed, 23 Apr 2014 10:05:55 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.2.4 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 30ECF265068; Wed, 23 Apr 2014 10:05:46 +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 8BBC6265086; Wed, 23 Apr 2014 10:05:44 +0200 (CEST) Received: from mail-pd0-f178.google.com (mail-pd0-f178.google.com [209.85.192.178]) by alsa0.perex.cz (Postfix) with ESMTP id 3983B265068 for ; Wed, 23 Apr 2014 10:05:36 +0200 (CEST) Received: by mail-pd0-f178.google.com with SMTP id x10so528530pdj.37 for ; Wed, 23 Apr 2014 01:05:34 -0700 (PDT) X-Received: by 10.68.94.164 with SMTP id dd4mr6661617pbb.161.1398240333307; Wed, 23 Apr 2014 01:05:33 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id te2sm1160817pac.25.2014.04.23.01.05.29 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Apr 2014 01:05:32 -0700 (PDT) From: Tushar Behera To: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org Date: Wed, 23 Apr 2014 13:34:24 +0530 Message-Id: <1398240264-21285-1-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.9.5 Cc: sbkim73@samsung.com, jassisinghbrar@gmail.com, broonie@kernel.org, lgirdwood@gmail.com, kgene.kim@samsung.com Subject: [alsa-devel] [PATCH] ASoC: SAMSUNG: Don't clear clock setting during i2s_startup X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: 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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: tushar.behera@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 In exiting kernel, if DAIFMT flags are set in dai_link and I2S is set to run in master mode, the I2S clocks are not getting configured resulting in no output. Existing code clears the current I2S clock settings during i2s_startup and requires that the clocks are reconfigured. It then assumes that sound-card driver would call snd_soc_dai_{set_sysclk/set_fmt} to configure the root clock. 1. Since I2S clock settings remain fixed for a board, it would be better to set the clocks once during sound-card probe. 2. Also if the DAIFMT flags are set in dai_link, snd_soc_dai_set_fmt is called during DAI probe. If both these conditions are true, then I2S clock remains unconfigured during audio playback. Fix this by removing the code to clear rclk_srcrate in i2s_startup. Instead, reset this during DAI probe. Signed-off-by: Tushar Behera --- The patch is based on v3.15-rc2. sound/soc/samsung/i2s.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 048ead9..6e61db7 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -724,9 +724,6 @@ static int i2s_startup(struct snd_pcm_substream *substream, else i2s->mode |= DAI_MANAGER; - /* Enforce set_sysclk in Master mode */ - i2s->rclk_srcrate = 0; - if (!any_active(i2s) && (i2s->quirks & QUIRK_NEED_RSTCLR)) writel(CON_RSTCLR, i2s->addr + I2SCON); @@ -984,6 +981,7 @@ probe_exit: /* Reset any constraint on RFS and BFS */ i2s->rfs = 0; i2s->bfs = 0; + i2s->rclk_srcrate = 0; i2s_txctrl(i2s, 0); i2s_rxctrl(i2s, 0); i2s_fifo(i2s, FIC_TXFLUSH);