summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r--sound/soc/codecs/wm8731.c33
-rw-r--r--sound/soc/codecs/wm8750.c15
2 files changed, 27 insertions, 21 deletions
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c
index 9adbd2d401c4..412291241ece 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,
},
};
diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c
index 243da712d9c1..c5d13a9454d9 100644
--- a/sound/soc/codecs/wm8750.c
+++ b/sound/soc/codecs/wm8750.c
@@ -343,7 +343,7 @@ static struct snd_soc_dai_mode wm8750_modes[] = {
.pcmdir = WM8750_DIR,
.flags = SND_SOC_DAI_BFS_DIV,
.fs = SND_SOC_FS_ALL,
- .bfs = SND_SOC_FSBD_ALL,
+ .bfs = SND_SOC_FSB_ALL,
},
};
@@ -829,6 +829,9 @@ static inline int get_coeff(int mclk, int rate)
if (coeff_div[i].rate == rate && coeff_div[i].mclk == mclk)
return i;
}
+
+ printk(KERN_ERR "wm8750: could not get coeff for mclk %d @ rate %d\n",
+ mclk, rate);
return -EINVAL;
}
@@ -836,13 +839,7 @@ static inline int get_coeff(int mclk, int rate)
static unsigned int wm8750_config_sysclk(struct snd_soc_codec_dai *dai,
struct snd_soc_clock_info *info, unsigned int clk)
{
- dai->mclk = 0;
-
- /* check that the calculated FS and rate actually match a clock from
- * the machine driver */
- if (info->fs * info->rate == clk)
- dai->mclk = clk;
-
+ dai->mclk = clk;
return dai->mclk;
}
@@ -859,7 +856,7 @@ static int wm8750_pcm_prepare(struct snd_pcm_substream *substream)
if (i < 0)
return i;
- bfs = SND_SOC_FSB_REAL(rtd->codec_dai->dai_runtime.bfs);
+ bfs = SND_SOC_FSBD_REAL(rtd->codec_dai->dai_runtime.bfs);
/* set master/slave audio interface */
switch (rtd->codec_dai->dai_runtime.fmt & SND_SOC_DAIFMT_CLOCK_MASK) {
OpenPOWER on IntegriCloud