All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Liam Girdwood <lrg@ti.com>
Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com,
	Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: [PATCH 1/3] ASoC: arizona: Rename current rates tables to bclk_rates
Date: Wed,  4 Jul 2012 19:13:43 +0100	[thread overview]
Message-ID: <1341425625-17621-1-git-send-email-broonie@opensource.wolfsonmicro.com> (raw)

They're the rates for the BCLK, not for the sample rate, so rename so that
we don't confuse ourselves.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 sound/soc/codecs/arizona.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index 3b5730b..67760b4 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -363,7 +363,7 @@ static int arizona_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
 	return 0;
 }
 
-static const int arizona_48k_rates[] = {
+static const int arizona_48k_bclk_rates[] = {
 	-1,
 	48000,
 	64000,
@@ -385,7 +385,7 @@ static const int arizona_48k_rates[] = {
 	24576000,
 };
 
-static const int arizona_44k1_rates[] = {
+static const int arizona_44k1_bclk_rates[] = {
 	-1,
 	44100,
 	58800,
@@ -445,17 +445,17 @@ static int arizona_hw_params(struct snd_pcm_substream *substream,
 	int bclk, lrclk, wl, frame, sr_val;
 
 	if (params_rate(params) % 8000)
-		rates = &arizona_44k1_rates[0];
+		rates = &arizona_44k1_bclk_rates[0];
 	else
-		rates = &arizona_48k_rates[0];
+		rates = &arizona_48k_bclk_rates[0];
 
-	for (i = 0; i < ARRAY_SIZE(arizona_44k1_rates); i++) {
+	for (i = 0; i < ARRAY_SIZE(arizona_44k1_bclk_rates); i++) {
 		if (rates[i] == snd_soc_params_to_bclk(params)) {
 			bclk = i;
 			break;
 		}
 	}
-	if (i == ARRAY_SIZE(arizona_44k1_rates)) {
+	if (i == ARRAY_SIZE(arizona_44k1_bclk_rates)) {
 		arizona_aif_err(dai, "Unsupported sample rate %dHz\n",
 				params_rate(params));
 		return -EINVAL;
-- 
1.7.10

             reply	other threads:[~2012-07-04 18:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-04 18:13 Mark Brown [this message]
2012-07-04 18:13 ` [PATCH 2/3] ASoC: arizona: Implement AIF clock configuration Mark Brown
2012-07-04 18:13 ` [PATCH 3/3] ASoC: arizona: Be more forgiving in BCLK selection 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=1341425625-17621-1-git-send-email-broonie@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=lrg@ti.com \
    --cc=patches@opensource.wolfsonmicro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.