alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>
To: Mark Brown <broonie@kernel.org>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>,
	Simon <horms@verge.net.au>, Liam Girdwood <lgirdwood@gmail.com>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Subject: [PATCH 04/10] ASoC: rsnd: make sure variable name for 44.1kHz/48kHz
Date: Thu, 19 Dec 2013 19:27:19 -0800 (PST)	[thread overview]
Message-ID: <87fvpourql.wl%kuninori.morimoto.gx@gmail.com> (raw)
In-Reply-To: <87lhzgurtc.wl%kuninori.morimoto.gx@gmail.com>

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

This driver is assuming that
RBGA is used as source clock of 44.1kHz category, and
RBGB is used as source clock of 48kHz category.
This patch clarifies the variable name.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/sh/rcar/adg.c |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c
index 55d0394..2e71a7b 100644
--- a/sound/soc/sh/rcar/adg.c
+++ b/sound/soc/sh/rcar/adg.c
@@ -19,8 +19,8 @@
 struct rsnd_adg {
 	struct clk *clk[CLKMAX];
 
-	int rate_of_441khz_div_6;
-	int rate_of_48khz_div_6;
+	int rbga_rate_for_441khz_div_6;	/* RBGA */
+	int rbgb_rate_for_48khz_div_6;	/* RBGB */
 	u32 ckr;
 };
 
@@ -101,12 +101,12 @@ int rsnd_adg_ssi_clk_try_start(struct rsnd_mod *mod, unsigned int rate)
 	/*
 	 * find 1/6 clock from BRGA/BRGB
 	 */
-	if (rate == adg->rate_of_441khz_div_6) {
+	if (rate == adg->rbga_rate_for_441khz_div_6) {
 		data = 0x10;
 		goto found_clock;
 	}
 
-	if (rate == adg->rate_of_48khz_div_6) {
+	if (rate == adg->rbgb_rate_for_48khz_div_6) {
 		data = 0x20;
 		goto found_clock;
 	}
@@ -156,8 +156,8 @@ static void rsnd_adg_ssi_clk_init(struct rsnd_priv *priv, struct rsnd_adg *adg)
 	 *	rsnd_adg_ssi_clk_try_start()
 	 */
 	ckr = 0;
-	adg->rate_of_441khz_div_6 = 0;
-	adg->rate_of_48khz_div_6  = 0;
+	adg->rbga_rate_for_441khz_div_6 = 0;
+	adg->rbgb_rate_for_48khz_div_6  = 0;
 	for_each_rsnd_clk(clk, adg, i) {
 		rate = clk_get_rate(clk);
 
@@ -165,14 +165,14 @@ static void rsnd_adg_ssi_clk_init(struct rsnd_priv *priv, struct rsnd_adg *adg)
 			continue;
 
 		/* RBGA */
-		if (!adg->rate_of_441khz_div_6 && (0 == rate % 44100)) {
-			adg->rate_of_441khz_div_6 = rate / 6;
+		if (!adg->rbga_rate_for_441khz_div_6 && (0 == rate % 44100)) {
+			adg->rbga_rate_for_441khz_div_6 = rate / 6;
 			ckr |= brg_table[i] << 20;
 		}
 
 		/* RBGB */
-		if (!adg->rate_of_48khz_div_6 && (0 == rate % 48000)) {
-			adg->rate_of_48khz_div_6 = rate / 6;
+		if (!adg->rbgb_rate_for_48khz_div_6 && (0 == rate % 48000)) {
+			adg->rbgb_rate_for_48khz_div_6 = rate / 6;
 			ckr |= brg_table[i] << 16;
 		}
 	}
-- 
1.7.9.5

  parent reply	other threads:[~2013-12-20  3:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-20  3:25 [PATCH 0/10] ASoC: rsnd: add SRC support Kuninori Morimoto
2013-12-20  3:26 ` [PATCH 01/10] ASoC: rsnd: add rsnd_adg_set_ssi_clk() and cleanup adg Kuninori Morimoto
2013-12-20  3:26 ` [PATCH 02/10] ASoC: rsnd: tidyup ssi comment Kuninori Morimoto
2013-12-20  3:27 ` [PATCH 03/10] ASoC: rsnd: tidyup register naming Kuninori Morimoto
2013-12-20  3:27 ` Kuninori Morimoto [this message]
2013-12-20  3:27 ` [PATCH 05/10] ASoC: rsnd: route setting is needed only Gen1 Kuninori Morimoto
2013-12-20  3:28 ` [PATCH 07/10] ASoC: rsnd: add rsnd_scu_transfer_start() Kuninori Morimoto
2013-12-20  3:28 ` [PATCH 06/10] ASoC: rsnd: INT_ENABLE is needed only Gen2 Kuninori Morimoto
2013-12-20  3:28 ` [PATCH 08/10] ASoC: rsnd: scu cleanup: add rsnd_scu_rate_ctrl() Kuninori Morimoto
2013-12-20  3:28 ` [PATCH 09/10] ASoC: rsnd: tidyup rsnd_ssi_master_clk_start() parameter Kuninori Morimoto
2013-12-20  3:28 ` [PATCH 10/10] ASoC: rsnd: add SRC (Sampling Rate Converter) support Kuninori Morimoto
2013-12-31 13:36 ` [PATCH 0/10] ASoC: rsnd: add SRC support Mark Brown
2014-01-06  5:29   ` Kuninori Morimoto
2014-01-06 15:23     ` Mark Brown
2014-01-07  0:21       ` Kuninori Morimoto
2014-01-07  9:21         ` Jean-Francois Moine
2014-01-07 11:22         ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fvpourql.wl%kuninori.morimoto.gx@gmail.com \
    --to=kuninori.morimoto.gx@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=horms@verge.net.au \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).