summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8731.c
diff options
context:
space:
mode:
authorLiam Girdwood <lg@opensource.wolfsonmicro.com>2006-10-19 20:35:56 +0200
committerJaroslav Kysela <perex@suse.cz>2007-02-09 09:01:07 +0100
commita71a468a50f1385855e28864e26251b02df829bb (patch)
tree243daee96ea5c55c88a186aa03b7917f7ad533f6 /sound/soc/codecs/wm8731.c
parent543a0fbe18d0b44f3d037fe6b59458fa0c0d5e4b (diff)
[ALSA] ASoC: Add support for BCLK based on (Rate * Chn * Word Size)
This patch adds support for the DAI BCLK to be generated by multiplying Rate * Channels * Word Size (RCW). This now gives 3 options for BCLK clocking and synchronisation :- 1. BCLK = Rate * x 2. BCLK = MCLK / x 3. BCLK = Rate * Chn * Word Size. (New) Changes:- o Add support for RCW generation of BCLK o Update Documentation to include RCW. o Update DAI documentation for label = value DAI modes. o Add RCW support to wm8731, wm8750 and pxa2xx-i2s drivers. Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/soc/codecs/wm8731.c')
-rw-r--r--sound/soc/codecs/wm8731.c33
1 files changed, 21 insertions, 12 deletions
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c
index 9adbd2d401c..412291241ec 100644
--- a/sound/soc/codecs/wm8731.c
+++ b/sound/soc/codecs/wm8731.c
@@ -90,32 +90,36 @@ static struct snd_soc_dai_mode wm8731_modes[] = {
.pcmfmt = WM8731_HIFI_BITS,
.pcmrate = SNDRV_PCM_RATE_8000,
.pcmdir = WM8731_DIR,
+ .flags = SND_SOC_DAI_BFS_RATE,
.fs = 1536,
- .bfs = SND_SOC_FSB(64),
+ .bfs = 64,
},
{
.fmt = WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
.pcmfmt = WM8731_HIFI_BITS,
.pcmrate = SNDRV_PCM_RATE_8000,
.pcmdir = WM8731_DIR,
+ .flags = SND_SOC_DAI_BFS_RATE,
.fs = 2304,
- .bfs = SND_SOC_FSB(64),
+ .bfs = 64,
},
{
.fmt = WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
.pcmfmt = WM8731_HIFI_BITS,
.pcmrate = SNDRV_PCM_RATE_8000,
.pcmdir = WM8731_DIR,
+ .flags = SND_SOC_DAI_BFS_RATE,
.fs = 1408,
- .bfs = SND_SOC_FSB(64),
+ .bfs = 64,
},
{
.fmt = WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
.pcmfmt = WM8731_HIFI_BITS,
.pcmrate = SNDRV_PCM_RATE_8000,
.pcmdir = WM8731_DIR,
+ .flags = SND_SOC_DAI_BFS_RATE,
.fs = 2112,
- .bfs = SND_SOC_FSB(64),
+ .bfs = 64,
},
/* 32k */
@@ -124,16 +128,18 @@ static struct snd_soc_dai_mode wm8731_modes[] = {
.pcmfmt = WM8731_HIFI_BITS,
.pcmrate = SNDRV_PCM_RATE_32000,
.pcmdir = WM8731_DIR,
+ .flags = SND_SOC_DAI_BFS_RATE,
.fs = 384,
- .bfs = SND_SOC_FSB(64),
+ .bfs = 64,
},
{
.fmt = WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
.pcmfmt = WM8731_HIFI_BITS,
.pcmrate = SNDRV_PCM_RATE_32000,
.pcmdir = WM8731_DIR,
+ .flags = SND_SOC_DAI_BFS_RATE,
.fs = 576,
- .bfs = SND_SOC_FSB(64),
+ .bfs = 64,
},
/* 44.1k & 48k */
@@ -142,16 +148,18 @@ static struct snd_soc_dai_mode wm8731_modes[] = {
.pcmfmt = WM8731_HIFI_BITS,
.pcmrate = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000,
.pcmdir = WM8731_DIR,
+ .flags = SND_SOC_DAI_BFS_RATE,
.fs = 256,
- .bfs = SND_SOC_FSB(64),
+ .bfs = 64,
},
{
.fmt = WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
.pcmfmt = WM8731_HIFI_BITS,
.pcmrate = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000,
.pcmdir = WM8731_DIR,
+ .flags = SND_SOC_DAI_BFS_RATE,
.fs = 384,
- .bfs = SND_SOC_FSB(64),
+ .bfs = 64,
},
/* 88.2 & 96k */
@@ -160,17 +168,18 @@ static struct snd_soc_dai_mode wm8731_modes[] = {
.pcmfmt = WM8731_HIFI_BITS,
.pcmrate = SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000,
.pcmdir = WM8731_DIR,
+ .flags = SND_SOC_DAI_BFS_RATE,
.fs = 128,
- .bfs = SND_SOC_FSB(64),
-
+ .bfs = 64,
},
{
.fmt = WM8731_DAIFMT | SND_SOC_DAIFMT_CBM_CFM,
.pcmfmt = WM8731_HIFI_BITS,
.pcmrate = SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000,
.pcmdir = WM8731_DIR,
+ .flags = SND_SOC_DAI_BFS_RATE,
.fs = 192,
- .bfs = SND_SOC_FSB(64),
+ .bfs = 64,
},
/* USB codec frame and clock master modes */
@@ -237,7 +246,7 @@ static struct snd_soc_dai_mode wm8731_modes[] = {
.pcmdir = WM8731_DIR,
.flags = SND_SOC_DAI_BFS_DIV,
.fs = SND_SOC_FS_ALL,
- .bfs = SND_SOC_FSBD_ALL,
+ .bfs = SND_SOC_FSB_ALL,
},
};