From: "Cormier, Jonathan" <jcormier@criticallink.com>
To: Liam Girdwood <lgirdwood@gmail.com>
Cc: Bob Duke <bduke@criticallink.com>,
Mike Williamson <michael.williamson@criticallink.com>,
Greg Gluszek <greg.gluszek@criticallink.com>,
Mark Brown <broonie@linaro.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
Peter Ujfalusi <peter.ujfalusi@ti.com>,
Jyri Sarha <jsarha@ti.com>,
Misael Lopez Cruz <misael.lopez@ti.com>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
"Cormier, Jonathan" <jcormier@criticallink.com>
Subject: [PATCH V1 5/6] ASoC: tlv320aic26: hw_params was unintentionally clearing AIC26 master mode
Date: Fri, 25 Sep 2015 14:30:08 -0400 [thread overview]
Message-ID: <1443205809-27549-6-git-send-email-jcormier@criticallink.com> (raw)
In-Reply-To: <1443205809-27549-1-git-send-email-jcormier@criticallink.com>
Commit: 5b0959d472c2 "ASoC: tlv320aic26: Use snd_soc_update_bits()" broke setting AIC26_REG_AUDIO_CTRL3
in master mode when fsref happens to be 48000. The master mode bit was getting cleared.
Also fix setting AIC26_REG_DAC_GAIN and AIC26_REG_AUDIO_CTRL2 which was broke by same commit.
Fixes: 5b0959d472c2 "ASoC: tlv320aic26: Use snd_soc_update_bits()"
Signed-off-by: Cormier, Jonathan <jcormier@criticallink.com>
---
sound/soc/codecs/tlv320aic26.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/sound/soc/codecs/tlv320aic26.c b/sound/soc/codecs/tlv320aic26.c
index 8355f379d45d..7d2fbca068d0 100644
--- a/sound/soc/codecs/tlv320aic26.c
+++ b/sound/soc/codecs/tlv320aic26.c
@@ -138,11 +138,12 @@ static int aic26_hw_params(struct snd_pcm_substream *substream,
snd_soc_write(codec, AIC26_REG_PLL_PROG2, reg);
/* Audio Control 3 (master mode, fsref rate) */
+ reg = 0;
if (aic26->master)
- reg = 0x0800;
+ reg |= 0x0800;
if (fsref == 48000)
- reg = 0x2000;
- snd_soc_update_bits(codec, AIC26_REG_AUDIO_CTRL3, 0xf800, reg);
+ reg |= 0x2000;
+ snd_soc_update_bits(codec, AIC26_REG_AUDIO_CTRL3, 0x2800, reg);
/* Audio Control 1 (FSref divisor) */
reg = wlen | aic26->datfm | (divisor << 3) | divisor;
@@ -167,7 +168,7 @@ static int aic26_mute(struct snd_soc_dai *dai, int mute)
reg = 0x8080;
else
reg = 0;
- snd_soc_update_bits(codec, AIC26_REG_DAC_GAIN, 0x8000, reg);
+ snd_soc_update_bits(codec, AIC26_REG_DAC_GAIN, 0x8080, reg);
return 0;
}
@@ -302,7 +303,7 @@ static ssize_t aic26_keyclick_set(struct device *dev,
struct aic26 *aic26 = dev_get_drvdata(dev);
snd_soc_update_bits(aic26->codec, AIC26_REG_AUDIO_CTRL2,
- 0x8000, 0x800);
+ 0x8000, 0x8000);
return count;
}
--
1.9.1
next prev parent reply other threads:[~2015-09-25 18:31 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-18 20:11 [PATCH RFC 0/7] ASoC: tlv320aic26: Add device tree support and bug fixes Cormier, Jonathan
2015-09-18 20:11 ` [PATCH RFC 1/7] ASoC: tlv320aic26: Add device tree binding Cormier, Jonathan
2015-09-21 8:38 ` [alsa-devel] " Peter Ujfalusi
2015-09-21 13:01 ` Jon Cormier
2015-09-18 20:11 ` [PATCH RFC 2/7] ASoC: tlv320aic26: Fix module autoload Cormier, Jonathan
2015-09-18 20:11 ` [PATCH RFC 3/7] ASoC: tlv320aic26: Make SND_SOC_TLV320AIC26 user-visible Cormier, Jonathan
2015-09-18 20:11 ` [PATCH RFC 4/7] ASoC: tlv320aic26: Fix regmap by setting reg_defaults and reg_stride Cormier, Jonathan
2015-09-18 20:11 ` [PATCH RFC 5/7] ASoC: tlv320aic26: hw_params was unintentionally clearing AIC26 master mode Cormier, Jonathan
2015-09-18 20:11 ` [PATCH RFC 6/7] ASoC: tlv320aic26: Add support for DSP_B data format Cormier, Jonathan
2015-09-21 6:19 ` Peter Ujfalusi
2015-09-21 13:05 ` Jon Cormier
2015-09-18 20:11 ` [PATCH RFC 7/7] ASoC: tlv320aic26: Change Capture Mute to Capture Switch to match alsa documentation Cormier, Jonathan
2015-09-25 18:30 ` [PATCH V1 0/6] ASoC: tlv320aic26: Add device tree support and bug fixes Cormier, Jonathan
2015-09-25 18:30 ` [PATCH V1 1/6] ASoC: tlv320aic26: Add device tree binding Cormier, Jonathan
2015-09-25 18:30 ` [PATCH V1 2/6] ASoC: tlv320aic26: Fix module autoload Cormier, Jonathan
2015-09-25 18:30 ` [PATCH V1 3/6] ASoC: tlv320aic26: Make SND_SOC_TLV320AIC26 user-visible Cormier, Jonathan
2015-09-25 18:30 ` [PATCH V1 4/6] ASoC: tlv320aic26: Fix regmap by setting reg_defaults and reg_stride Cormier, Jonathan
2015-09-25 18:30 ` Cormier, Jonathan [this message]
2015-09-25 18:30 ` [PATCH V1 6/6] ASoC: tlv320aic26: Change Capture Mute to Capture Switch to match alsa documentation Cormier, Jonathan
2015-09-30 10:43 ` [PATCH V1 0/6] ASoC: tlv320aic26: Add device tree support and bug fixes Peter Ujfalusi
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=1443205809-27549-6-git-send-email-jcormier@criticallink.com \
--to=jcormier@criticallink.com \
--cc=alsa-devel@alsa-project.org \
--cc=bduke@criticallink.com \
--cc=broonie@linaro.org \
--cc=greg.gluszek@criticallink.com \
--cc=jsarha@ti.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.williamson@criticallink.com \
--cc=misael.lopez@ti.com \
--cc=perex@perex.cz \
--cc=peter.ujfalusi@ti.com \
--cc=tiwai@suse.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
all inboxes | Powered by JetHome®