From patchwork Thu Dec 11 17:45:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 5477031 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9C48ABEEA8 for ; Thu, 11 Dec 2014 17:53:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DB52E201C7 for ; Thu, 11 Dec 2014 17:53:56 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 841F9201BC for ; Thu, 11 Dec 2014 17:53:55 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id C949026587C; Thu, 11 Dec 2014 18:53:53 +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 91FD526571B; Thu, 11 Dec 2014 18:48: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 A4180265713; Thu, 11 Dec 2014 18:48:54 +0100 (CET) Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by alsa0.perex.cz (Postfix) with ESMTP id 9E658265326 for ; Thu, 11 Dec 2014 18:46:57 +0100 (CET) Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NGF00K6UIQ8WC50@mailout3.samsung.com> for alsa-devel@alsa-project.org; Fri, 12 Dec 2014 02:46:56 +0900 (KST) X-AuditID: cbfee61a-f79c06d000004e71-dc-5489d8906c2c Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 33.E0.20081.098D9845; Fri, 12 Dec 2014 02:46:56 +0900 (KST) Received: from amdc1344.digital.local ([106.116.147.32]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NGF00MHSIP1T280@mmp1.samsung.com>; Fri, 12 Dec 2014 02:46:56 +0900 (KST) From: Sylwester Nawrocki To: alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org Date: Thu, 11 Dec 2014 18:45:49 +0100 Message-id: <1418319952-10163-12-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1418319952-10163-1-git-send-email-s.nawrocki@samsung.com> References: <1418319952-10163-1-git-send-email-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprILMWRmVeSWpSXmKPExsVy+t9jAd0JNzpDDJqXKlhcuXiIyWLqwyds Fo/mP2a2mHF+H5PF75vf2SwOv2lntbi44guTA7vHhs9NbB6Lvmd5bFrVyebRt2UVo8fnTXIB rFFcNimpOZllqUX6dglcGY869rEULOaqONW+irWBcT9HFyMHh4SAiURHJ2MXIyeQKSZx4d56 NhBbSGARo8SF27ldjFxAdgeTxLaFc1lAEmwChhK9R/vAGkQEnCRmznnPBlLELNDMKHH+1w0m kISwQJTEpQ37wRpYBFQlZh+YCmbzCrhLrP47nRlisYLEnEk2IGFOoPD6X+dYIBa7STza2MA6 gZF3ASPDKkbR1ILkguKk9FxDveLE3OLSvHS95PzcTYzggHomtYNxZYPFIUYBDkYlHt6M+M4Q IdbEsuLK3EOMEhzMSiK8ey4DhXhTEiurUovy44tKc1KLDzFKc7AoifMq2beFCAmkJ5akZqem FqQWwWSZODilGhjZfv+WMOXP324x/zr7De4pL57EK57VDhH9yc6zyN3/9kxVAfb6pzLbH/Qf Z2VLnnRmwZ7Fy+uXb50Vlv6v51fsz69BnlPmMCi944+6x2TDcrolPbO11V6EWer4P/4XlZP6 7rHmWigZHDt9vjW2xmZVDBvnG47t608susM4+e33n7aq8rLBN0SVWIozEg21mIuKEwHSzlNM JAIAAA== Cc: sbkim73@samsung.com, broonie@kernel.org, drake@endlessm.com, Sylwester Nawrocki , padma.v@samsung.com Subject: [alsa-devel] [PATCH/RFC 11/14] ASoC: samsung: odroidx2: Handle I2S CDCLK clock conditionally 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 If the codec control it's master clock provider by the I2S module we should not be touching it with set_sysclk() calls. So skip the set_sysclk() call in the machine driver if "clocks" property is found in the codec device node. Signed-off-by: Sylwester Nawrocki --- sound/soc/samsung/odroidx2_max98090.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sound/soc/samsung/odroidx2_max98090.c b/sound/soc/samsung/odroidx2_max98090.c index 3c8f604..ca94938 100644 --- a/sound/soc/samsung/odroidx2_max98090.c +++ b/sound/soc/samsung/odroidx2_max98090.c @@ -21,6 +21,8 @@ struct odroidx2_drv_data { /* The I2S CDCLK output clock frequency for the MAX98090 codec */ #define MAX98090_MCLK 19200000 +static struct snd_soc_dai_link odroidx2_dai[]; + static int odroidx2_late_probe(struct snd_soc_card *card) { struct snd_soc_dai *codec_dai = card->rtd[0].codec_dai; @@ -29,7 +31,9 @@ static int odroidx2_late_probe(struct snd_soc_card *card) ret = snd_soc_dai_set_sysclk(codec_dai, 0, MAX98090_MCLK, SND_SOC_CLOCK_IN); - if (ret < 0) + + if (ret < 0 || of_find_property(odroidx2_dai[0].codec_of_node, + "clocks", NULL)) return ret; /* Set the cpu DAI configuration in order to use CDCLK */