public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
Cc: "Andrew F ., Davis" <afd@ti.com>,
	alsa-devel@alsa-project.org, Mark Brown <broonie@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Applied "ASoC: tlv320aic32x4: Use correct shift definition for DATALEN bits" to the asoc tree
Date: Wed, 13 Dec 2017 15:45:31 +0000	[thread overview]
Message-ID: <E1eP9Dv-0002KN-Vi@debutante> (raw)
In-Reply-To: <20171212224311.24045-5-afd@ti.com>

The patch

   ASoC: tlv320aic32x4: Use correct shift definition for DATALEN bits

has been applied to the asoc tree at

   https://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 77bdb58795d86262e96ba37524489ba0969de253 Mon Sep 17 00:00:00 2001
From: "Andrew F. Davis" <afd@ti.com>
Date: Tue, 12 Dec 2017 16:43:06 -0600
Subject: [PATCH] ASoC: tlv320aic32x4: Use correct shift definition for DATALEN
 bits

Setting the DATALEN bit field requires shifting our value by 4. Setting
the OSR value of the PLL divider also requires a shift by 4. Currently
the code abuses this fact and uses the shift for the divider register to
set the data-length register. Fix this here by using the definition meant
for this register.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/tlv320aic32x4.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c
index 8f9719e6cdfd..9f643199e1ba 100644
--- a/sound/soc/codecs/tlv320aic32x4.c
+++ b/sound/soc/codecs/tlv320aic32x4.c
@@ -738,15 +738,20 @@ static int aic32x4_hw_params(struct snd_pcm_substream *substream,
 	data = data & ~(3 << 4);
 	switch (params_width(params)) {
 	case 16:
+		data |= (AIC32X4_WORD_LEN_16BITS <<
+			 AIC32X4_IFACE1_DATALEN_SHIFT);
 		break;
 	case 20:
-		data |= (AIC32X4_WORD_LEN_20BITS << AIC32X4_DOSRMSB_SHIFT);
+		data |= (AIC32X4_WORD_LEN_20BITS <<
+			 AIC32X4_IFACE1_DATALEN_SHIFT);
 		break;
 	case 24:
-		data |= (AIC32X4_WORD_LEN_24BITS << AIC32X4_DOSRMSB_SHIFT);
+		data |= (AIC32X4_WORD_LEN_24BITS <<
+			 AIC32X4_IFACE1_DATALEN_SHIFT);
 		break;
 	case 32:
-		data |= (AIC32X4_WORD_LEN_32BITS << AIC32X4_DOSRMSB_SHIFT);
+		data |= (AIC32X4_WORD_LEN_32BITS <<
+			 AIC32X4_IFACE1_DATALEN_SHIFT);
 		break;
 	}
 	snd_soc_write(codec, AIC32X4_IFACE1, data);
-- 
2.15.1

  reply	other threads:[~2017-12-13 15:45 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-12 22:43 [PATCH 01/10] ASoC: tlv320aic32x4: Remove filename from header and switch to SPDX Andrew F. Davis
2017-12-12 22:43 ` [PATCH 02/10] ASoC: tlv320aic32x4: Use AIC32X4_REG macro for all register definitions Andrew F. Davis
2017-12-13 15:46   ` Applied "ASoC: tlv320aic32x4: Use AIC32X4_REG macro for all register definitions" to the asoc tree Mark Brown
2017-12-12 22:43 ` [PATCH 03/10] ASoC: tlv320aic32x4: Drop define mapping from number to number Andrew F. Davis
2017-12-13 15:45   ` Applied "ASoC: tlv320aic32x4: Drop define mapping from number to number" to the asoc tree Mark Brown
2017-12-12 22:43 ` [PATCH 04/10] ASoC: tlv320aic32x4: Use correct shift definition for DATATYPE bits Andrew F. Davis
2017-12-13 15:45   ` Applied "ASoC: tlv320aic32x4: Use correct shift definition for DATATYPE bits" to the asoc tree Mark Brown
2017-12-12 22:43 ` [PATCH 05/10] ASoC: tlv320aic32x4: Use correct shift definition for DATALEN bits Andrew F. Davis
2017-12-13 15:45   ` Mark Brown [this message]
2017-12-12 22:43 ` [PATCH 06/10] ASoC: tlv320aic32x4: Use BIT and GENMASK for bit field definitions Andrew F. Davis
2017-12-13 15:45   ` Applied "ASoC: tlv320aic32x4: Use BIT and GENMASK for bit field definitions" to the asoc tree Mark Brown
2017-12-12 22:43 ` [PATCH 07/10] ASoC: tlv320aic32x4: Use snd_soc_update_bits() in aic32x4_mute() Andrew F. Davis
2017-12-13 15:45   ` Applied "ASoC: tlv320aic32x4: Use snd_soc_update_bits() in aic32x4_mute()" to the asoc tree Mark Brown
2017-12-12 22:43 ` [PATCH 08/10] ASoC: tlv320aic32x4: Use snd_soc_update_bits() in aic32x4_hw_params() Andrew F. Davis
2017-12-13 15:45   ` Applied "ASoC: tlv320aic32x4: Use snd_soc_update_bits() in aic32x4_hw_params()" to the asoc tree Mark Brown
2017-12-12 22:43 ` [PATCH 09/10] ASoC: tlv320aic32x4: Use snd_soc_update_bits() in aic32x4_set_dai_fmt() Andrew F. Davis
2017-12-13 15:44   ` Applied "ASoC: tlv320aic32x4: Use snd_soc_update_bits() in aic32x4_set_dai_fmt()" to the asoc tree Mark Brown
2017-12-12 22:43 ` [PATCH 10/10] ASoC: tlv320aic32x4: Make driver selectable in Kconfig Andrew F. Davis
2017-12-13 15:44   ` Applied "ASoC: tlv320aic32x4: Make driver selectable in Kconfig" to the asoc tree Mark Brown
2017-12-13  2:19 ` [PATCH 01/10] ASoC: tlv320aic32x4: Remove filename from header and switch to SPDX Joe Perches
2017-12-13 15:44   ` Andrew F. Davis
2017-12-13 15:50     ` Andrew F. Davis
2017-12-13 16:01       ` Mark Brown
2017-12-13 15:50     ` Joe Perches
2017-12-13 15:51       ` Andrew F. Davis
2017-12-13 12:28 ` Mark Brown
2017-12-13 16:13   ` Andrew F. Davis
2017-12-13 17:00     ` 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=E1eP9Dv-0002KN-Vi@debutante \
    --to=broonie@kernel.org \
    --cc=afd@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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