From patchwork Thu Jun 5 10:19:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bo Shen X-Patchwork-Id: 4304321 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 D94519F1D6 for ; Thu, 5 Jun 2014 10:21:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F075E202F8 for ; Thu, 5 Jun 2014 10:21:47 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id C7ED920120 for ; Thu, 5 Jun 2014 10:21:46 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id A4C3A265673; Thu, 5 Jun 2014 12:21:45 +0200 (CEST) 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,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 6D7582655C2; Thu, 5 Jun 2014 12:20: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 322AD264F3A; Thu, 5 Jun 2014 12:20:43 +0200 (CEST) Received: from DVREDG01.corp.atmel.com (nasmtp01.atmel.com [192.199.1.245]) by alsa0.perex.cz (Postfix) with ESMTP id 39325264F53 for ; Thu, 5 Jun 2014 12:20:29 +0200 (CEST) Received: from sjogate2.atmel.com (10.42.103.223) by DVREDG01.corp.atmel.com (10.42.103.30) with Microsoft SMTP Server id 14.2.347.0; Thu, 5 Jun 2014 04:20:21 -0600 Received: from Dev4Android.corp.atmel.com ([10.217.2.46]) by sjogate2.atmel.com (8.13.6/8.13.6) with ESMTP id s55ACJXG026171; Thu, 5 Jun 2014 03:12:49 -0700 (PDT) From: Bo Shen To: Date: Thu, 5 Jun 2014 18:19:28 +0800 Message-ID: <1401963572-10953-2-git-send-email-voice.shen@atmel.com> X-Mailer: git-send-email 1.8.5.2 In-Reply-To: <1401963572-10953-1-git-send-email-voice.shen@atmel.com> References: <1401963572-10953-1-git-send-email-voice.shen@atmel.com> MIME-Version: 1.0 Cc: boris.brezillon@free-electrons.com, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, nicolas.ferre@atmel.com, linux-sound@vger.kernel.org, Bo Shen , linux-arm-kernel@lists.infradead.org Subject: [alsa-devel] [PATCH 1/5] ASoC: atmel_wm8904: switch to CCF 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Bo Shen --- sound/soc/atmel/atmel_wm8904.c | 50 ------------------------------------------ 1 file changed, 50 deletions(-) diff --git a/sound/soc/atmel/atmel_wm8904.c b/sound/soc/atmel/atmel_wm8904.c index b4e3690..4052268 100644 --- a/sound/soc/atmel/atmel_wm8904.c +++ b/sound/soc/atmel/atmel_wm8904.c @@ -18,10 +18,6 @@ #include "../codecs/wm8904.h" #include "atmel_ssc_dai.h" -#define MCLK_RATE 32768 - -static struct clk *mclk; - static const struct snd_soc_dapm_widget atmel_asoc_wm8904_dapm_widgets[] = { SND_SOC_DAPM_HP("Headphone Jack", NULL), SND_SOC_DAPM_MIC("Mic", NULL), @@ -61,26 +57,6 @@ static struct snd_soc_ops atmel_asoc_wm8904_ops = { .hw_params = atmel_asoc_wm8904_hw_params, }; -static int atmel_set_bias_level(struct snd_soc_card *card, - struct snd_soc_dapm_context *dapm, - enum snd_soc_bias_level level) -{ - if (dapm->bias_level == SND_SOC_BIAS_STANDBY) { - switch (level) { - case SND_SOC_BIAS_PREPARE: - clk_prepare_enable(mclk); - break; - case SND_SOC_BIAS_OFF: - clk_disable_unprepare(mclk); - break; - default: - break; - } - } - - return 0; -}; - static struct snd_soc_dai_link atmel_asoc_wm8904_dailink = { .name = "WM8904", .stream_name = "WM8904 PCM", @@ -94,7 +70,6 @@ static struct snd_soc_dai_link atmel_asoc_wm8904_dailink = { static struct snd_soc_card atmel_asoc_wm8904_card = { .name = "atmel_asoc_wm8904", .owner = THIS_MODULE, - .set_bias_level = atmel_set_bias_level, .dai_link = &atmel_asoc_wm8904_dailink, .num_links = 1, .dapm_widgets = atmel_asoc_wm8904_dapm_widgets, @@ -153,7 +128,6 @@ static int atmel_asoc_wm8904_probe(struct platform_device *pdev) { struct snd_soc_card *card = &atmel_asoc_wm8904_card; struct snd_soc_dai_link *dailink = &atmel_asoc_wm8904_dailink; - struct clk *clk_src; int id, ret; card->dev = &pdev->dev; @@ -170,30 +144,6 @@ static int atmel_asoc_wm8904_probe(struct platform_device *pdev) return ret; } - mclk = clk_get(NULL, "pck0"); - if (IS_ERR(mclk)) { - dev_err(&pdev->dev, "failed to get pck0\n"); - ret = PTR_ERR(mclk); - goto err_set_audio; - } - - clk_src = clk_get(NULL, "clk32k"); - if (IS_ERR(clk_src)) { - dev_err(&pdev->dev, "failed to get clk32k\n"); - ret = PTR_ERR(clk_src); - goto err_set_audio; - } - - ret = clk_set_parent(mclk, clk_src); - clk_put(clk_src); - if (ret != 0) { - dev_err(&pdev->dev, "failed to set MCLK parent\n"); - goto err_set_audio; - } - - dev_info(&pdev->dev, "setting pck0 to %dHz\n", MCLK_RATE); - clk_set_rate(mclk, MCLK_RATE); - ret = snd_soc_register_card(card); if (ret) { dev_err(&pdev->dev, "snd_soc_register_card failed\n");