From patchwork Wed Oct 18 11:11:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 116261 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp5934568qgn; Wed, 18 Oct 2017 04:13:02 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TmhygD8WZeyPS4LK5tTQ/gndrOvnxwOmfG9bZOmfzhZouwIFQUuOr7OsqzYvPVob2rPf/Z X-Received: by 10.223.163.70 with SMTP id d6mr6256826wrb.45.1508325182726; Wed, 18 Oct 2017 04:13:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508325182; cv=none; d=google.com; s=arc-20160816; b=baVNpbPG/JKeD9OVQ8hOuhFzfu6miFIHIz8JE35UGFZdqEZpF/f+zLo0y4o57XIqZr apqQJifmiXPgHQDyLX7OlTFOtRrGaOCVN4aSODb885lRrfeH9mLYbnm6X7b8kdspQ7AL xsF85K5YXe10vltyLt9SyADRDXfFtdGbHLQAwB+5VYI7v6MstqsUgEiNyvND392EJZbm 8zWuK/0Zk7Vx/UhDvkMxND2z0JvEVTpF0QOJWU3AGIzRGb4uoHLBSyhO57mLWnR1Q2YX Su7I+LPzDCCZIfIgF/9QZ9FIj37epevO529Royme1Ij+HRtgUYO/bBNSqwbisMccQZBR z4DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=2To530QjYC7cQdO/vnCL5gp+/tt3yS23JHDhvUMfrsQ=; b=Bzpu9gF+kEqxWPw0gegmMYc4Ium5zdFk/KPuCx73dTfJpbZzD+Fv3W6l2uAMUMzRKR I2wOY8+P28eXb+qTNwdlMhJzIPgTCQGd4aC922Gi690zUo3hlygJgEasrlnGen2etxoY OurcsCsL5fVuIUuR5dnUk7Au4s4VPRWZUXNOFwvSWGvUYyFkQ4KBtjiU5JpK/3AxVK5Y Ebvb+seUeeN/8Pw/G1eXKYBMatZSXox7bnLs7yvSCjeF6n+FGwXqMll/CRsrG01r5f+l +0xiTPpGy4G7dyvrIDKUqPT9P9CEOStlXGC3+8klDJ8nzc+9k6WoCignMkErk0n5lEI0 Qh4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=AZFpUul9; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id o12si2175058wme.4.2017.10.18.04.13.02; Wed, 18 Oct 2017 04:13:02 -0700 (PDT) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=AZFpUul9; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 720A7267438; Wed, 18 Oct 2017 13:12:20 +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 4B8CE26741E; Wed, 18 Oct 2017 13:12:16 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, SPF_PASS autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 01F83266FEA for ; Wed, 18 Oct 2017 13:12:10 +0200 (CEST) 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=GSo5/Co4IhKq01otw2SLvgCeZCHWy/n0NVXWMGumMKk=; b=AZFpUul9AMXi aJfifLPVj+AvJinjdQgJFi7uhFyyJbs7qWkpj+lAEAuF5m8+YYQZJbddJHXMtbTh86Yc6pX2sxGKi lWRrZy7CpCv6tEbTHHtC/szO5R4wbU7KzJh+lo7JUzoUjV9fzQomDtKAITMDBMluMj5lnloJ7ObID GbiLg=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1e4mGP-0007UB-Qd; Wed, 18 Oct 2017 11:11:53 +0000 Received: from broonie by debutante with local (Exim 4.89) (envelope-from ) id 1e4mGP-0002DP-DW; Wed, 18 Oct 2017 12:11:53 +0100 From: Mark Brown To: Bard Liao In-Reply-To: <1508152516-25767-4-git-send-email-bardliao@realtek.com> Message-Id: Date: Wed, 18 Oct 2017 12:11:53 +0100 Cc: oder_chiou@realtek.com, jack.yu@realtek.com, alsa-devel@alsa-project.org, lars@metafoo.de, lgirdwood@gmail.com, broonie@kernel.org, shumingf@realtek.com, xiaoxiang@pinecone.net, zhongan@pinecone.net, flove@realtek.com Subject: [alsa-devel] Applied "ASoC: rt5659: move set_pll to codec level" to the asoc tree 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 The patch ASoC: rt5659: move set_pll to codec level has been applied to the asoc tree at git://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 c8a04b5de4bbdd0c7553aaa315c72722b10f0207 Mon Sep 17 00:00:00 2001 From: Bard Liao Date: Mon, 16 Oct 2017 19:15:16 +0800 Subject: [PATCH] ASoC: rt5659: move set_pll to codec level Move set_pll function to codec level and people can use it at both codec and dai level. Signed-off-by: Bard Liao Signed-off-by: Mark Brown --- sound/soc/codecs/rt5659.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) -- 2.14.1 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/codecs/rt5659.c b/sound/soc/codecs/rt5659.c index 09cfddb5e53d..07e7757417bc 100644 --- a/sound/soc/codecs/rt5659.c +++ b/sound/soc/codecs/rt5659.c @@ -3419,15 +3419,15 @@ static int rt5659_set_codec_sysclk(struct snd_soc_codec *codec, int clk_id, return 0; } -static int rt5659_set_dai_pll(struct snd_soc_dai *dai, int pll_id, int Source, - unsigned int freq_in, unsigned int freq_out) +static int rt5659_set_codec_pll(struct snd_soc_codec *codec, int pll_id, + int source, unsigned int freq_in, + unsigned int freq_out) { - struct snd_soc_codec *codec = dai->codec; struct rt5659_priv *rt5659 = snd_soc_codec_get_drvdata(codec); struct rl6231_pll_code pll_code; int ret; - if (Source == rt5659->pll_src && freq_in == rt5659->pll_in && + if (source == rt5659->pll_src && freq_in == rt5659->pll_in && freq_out == rt5659->pll_out) return 0; @@ -3441,7 +3441,7 @@ static int rt5659_set_dai_pll(struct snd_soc_dai *dai, int pll_id, int Source, return 0; } - switch (Source) { + switch (source) { case RT5659_PLL1_S_MCLK: snd_soc_update_bits(codec, RT5659_GLB_CLK, RT5659_PLL1_SRC_MASK, RT5659_PLL1_SRC_MCLK); @@ -3459,7 +3459,7 @@ static int rt5659_set_dai_pll(struct snd_soc_dai *dai, int pll_id, int Source, RT5659_PLL1_SRC_MASK, RT5659_PLL1_SRC_BCLK3); break; default: - dev_err(codec->dev, "Unknown PLL Source %d\n", Source); + dev_err(codec->dev, "Unknown PLL source %d\n", source); return -EINVAL; } @@ -3481,7 +3481,7 @@ static int rt5659_set_dai_pll(struct snd_soc_dai *dai, int pll_id, int Source, rt5659->pll_in = freq_in; rt5659->pll_out = freq_out; - rt5659->pll_src = Source; + rt5659->pll_src = source; return 0; } @@ -3667,7 +3667,6 @@ static const struct snd_soc_dai_ops rt5659_aif_dai_ops = { .hw_params = rt5659_hw_params, .set_fmt = rt5659_set_dai_fmt, .set_tdm_slot = rt5659_set_tdm_slot, - .set_pll = rt5659_set_dai_pll, .set_bclk_ratio = rt5659_set_bclk_ratio, }; @@ -3747,6 +3746,7 @@ static const struct snd_soc_codec_driver soc_codec_dev_rt5659 = { .num_dapm_routes = ARRAY_SIZE(rt5659_dapm_routes), }, .set_sysclk = rt5659_set_codec_sysclk, + .set_pll = rt5659_set_codec_pll, };