From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: alsa-devel@alsa-project.org,
Jassi Brar <jassisinghbrar@gmail.com>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
Seungwhan Youn <sw.youn@samsung.com>
Subject: [PATCH 5/7] ASoC: Implement BCLK rate selection for WM8580
Date: Fri, 13 Aug 2010 20:35:05 +0100 [thread overview]
Message-ID: <1281728107-25386-5-git-send-email-broonie@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20100813193305.GB3778@sirena.org.uk>
Drive a minimal supported number of clocks required for the current
bit format in master mode. In slave mode this setting has no effect.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
sound/soc/codecs/wm8580.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c
index 3d7ff55..6262124 100644
--- a/sound/soc/codecs/wm8580.c
+++ b/sound/soc/codecs/wm8580.c
@@ -486,14 +486,18 @@ static int wm8580_paif_hw_params(struct snd_pcm_substream *substream,
/* bit size */
switch (params_format(params)) {
case SNDRV_PCM_FORMAT_S16_LE:
+ paifa |= 0x8;
break;
case SNDRV_PCM_FORMAT_S20_3LE:
+ paifa |= 0x10;
paifb |= WM8580_AIF_LENGTH_20;
break;
case SNDRV_PCM_FORMAT_S24_LE:
+ paifa |= 0x10;
paifb |= WM8580_AIF_LENGTH_24;
break;
case SNDRV_PCM_FORMAT_S32_LE:
+ paifa |= 0x10;
paifb |= WM8580_AIF_LENGTH_24;
break;
default:
@@ -515,7 +519,8 @@ static int wm8580_paif_hw_params(struct snd_pcm_substream *substream,
wm8580_sysclk_ratios[i], wm8580->sysclk[dai->driver->id]);
snd_soc_update_bits(codec, WM8580_PAIF1 + dai->driver->id,
- WM8580_AIF_RATE_MASK, paifa);
+ WM8580_AIF_RATE_MASK | WM8580_AIF_BCLKSEL_MASK,
+ paifa);
snd_soc_update_bits(codec, WM8580_PAIF3 + dai->driver->id,
WM8580_AIF_LENGTH_MASK, paifb);
return 0;
--
1.7.1
next prev parent reply other threads:[~2010-08-13 19:35 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-13 19:33 [PATCH 0/7] WM8580 updates Mark Brown
2010-08-13 19:35 ` [PATCH 1/7] ASoC: Add a bit of resource unwinding in the S3C IISv4 driver Mark Brown
2010-08-13 19:35 ` [PATCH 2/7] ASoC: Convert WM8580 hw_params to use snd_soc_update_bits() Mark Brown
2010-08-13 19:35 ` [PATCH 3/7] ASoC: Remove unused rate selection bitmasks from WM8580 Mark Brown
2010-08-13 19:35 ` [PATCH 4/7] ASoC: Automatically calculate clock ratio for WM8580 Mark Brown
2010-08-15 9:00 ` Seungwhan Youn
2010-08-15 11:09 ` Mark Brown
2010-08-16 4:36 ` Jassi Brar
2010-08-16 10:20 ` Mark Brown
2010-08-16 12:51 ` Jassi Brar
2010-08-16 15:19 ` Mark Brown
2010-08-16 23:14 ` Jassi Brar
2010-08-17 9:46 ` Mark Brown
2010-08-31 6:46 ` Jassi Brar
2010-08-31 10:42 ` Mark Brown
2010-08-16 4:16 ` Seungwhan Youn
2010-08-16 12:21 ` Mark Brown
2010-08-16 12:47 ` Jassi Brar
2010-08-13 19:35 ` Mark Brown [this message]
2010-08-13 19:35 ` [PATCH 6/7] ASoC: Fix inverted WM8580 capture mute control Mark Brown
2010-08-15 4:50 ` Seungwhan Youn
2010-08-15 6:20 ` Seungwhan Youn
2010-08-13 19:35 ` [PATCH 7/7] ASoC: Automatically manage WM8580 DAC OSR Mark Brown
2010-08-14 4:09 ` [PATCH 0/7] WM8580 updates Jassi Brar
2010-08-15 9:21 ` Seungwhan Youn
2010-08-15 11:10 ` Mark Brown
2010-08-16 9:44 ` Seungwhan Youn
2010-08-16 14:49 ` Mark Brown
2010-08-19 11:37 ` Seungwhan Youn
2010-08-14 10:45 ` Liam Girdwood
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=1281728107-25386-5-git-send-email-broonie@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=jassisinghbrar@gmail.com \
--cc=lrg@slimlogic.co.uk \
--cc=sw.youn@samsung.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).