提交 8d98f224 编写于 作者: M Mark Brown

Merge branch 'for-2.6.30' into for-2.6.31

...@@ -290,7 +290,7 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream, ...@@ -290,7 +290,7 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream,
case SND_SOC_DAIFMT_DSP_A: case SND_SOC_DAIFMT_DSP_A:
case SND_SOC_DAIFMT_DSP_B: case SND_SOC_DAIFMT_DSP_B:
regs->srgr2 |= FPER(wlen * channels - 1); regs->srgr2 |= FPER(wlen * channels - 1);
regs->srgr1 |= FWID(wlen * channels - 2); regs->srgr1 |= FWID(0);
break; break;
} }
...@@ -309,6 +309,7 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, ...@@ -309,6 +309,7 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai,
{ {
struct omap_mcbsp_data *mcbsp_data = to_mcbsp(cpu_dai->private_data); struct omap_mcbsp_data *mcbsp_data = to_mcbsp(cpu_dai->private_data);
struct omap_mcbsp_reg_cfg *regs = &mcbsp_data->regs; struct omap_mcbsp_reg_cfg *regs = &mcbsp_data->regs;
unsigned int temp_fmt = fmt;
if (mcbsp_data->configured) if (mcbsp_data->configured)
return 0; return 0;
...@@ -342,6 +343,8 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, ...@@ -342,6 +343,8 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai,
/* 0-bit data delay */ /* 0-bit data delay */
regs->rcr2 |= RDATDLY(0); regs->rcr2 |= RDATDLY(0);
regs->xcr2 |= XDATDLY(0); regs->xcr2 |= XDATDLY(0);
/* Invert FS polarity configuration */
temp_fmt ^= SND_SOC_DAIFMT_NB_IF;
break; break;
default: default:
/* Unsupported data format */ /* Unsupported data format */
...@@ -365,7 +368,7 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai, ...@@ -365,7 +368,7 @@ static int omap_mcbsp_dai_set_dai_fmt(struct snd_soc_dai *cpu_dai,
} }
/* Set bit clock (CLKX/CLKR) and FS polarities */ /* Set bit clock (CLKX/CLKR) and FS polarities */
switch (fmt & SND_SOC_DAIFMT_INV_MASK) { switch (temp_fmt & SND_SOC_DAIFMT_INV_MASK) {
case SND_SOC_DAIFMT_NB_NF: case SND_SOC_DAIFMT_NB_NF:
/* /*
* Normal BCLK + FS. * Normal BCLK + FS.
......
...@@ -62,7 +62,7 @@ static int osk_hw_params(struct snd_pcm_substream *substream, ...@@ -62,7 +62,7 @@ static int osk_hw_params(struct snd_pcm_substream *substream,
/* Set codec DAI configuration */ /* Set codec DAI configuration */
err = snd_soc_dai_set_fmt(codec_dai, err = snd_soc_dai_set_fmt(codec_dai,
SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_DSP_B |
SND_SOC_DAIFMT_NB_IF | SND_SOC_DAIFMT_NB_NF |
SND_SOC_DAIFMT_CBM_CFM); SND_SOC_DAIFMT_CBM_CFM);
if (err < 0) { if (err < 0) {
printk(KERN_ERR "can't set codec DAI configuration\n"); printk(KERN_ERR "can't set codec DAI configuration\n");
...@@ -72,7 +72,7 @@ static int osk_hw_params(struct snd_pcm_substream *substream, ...@@ -72,7 +72,7 @@ static int osk_hw_params(struct snd_pcm_substream *substream,
/* Set cpu DAI configuration */ /* Set cpu DAI configuration */
err = snd_soc_dai_set_fmt(cpu_dai, err = snd_soc_dai_set_fmt(cpu_dai,
SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_DSP_B |
SND_SOC_DAIFMT_NB_IF | SND_SOC_DAIFMT_NB_NF |
SND_SOC_DAIFMT_CBM_CFM); SND_SOC_DAIFMT_CBM_CFM);
if (err < 0) { if (err < 0) {
printk(KERN_ERR "can't set cpu DAI configuration\n"); printk(KERN_ERR "can't set cpu DAI configuration\n");
......
...@@ -815,6 +815,7 @@ static int pxa_ssp_probe(struct platform_device *pdev, ...@@ -815,6 +815,7 @@ static int pxa_ssp_probe(struct platform_device *pdev,
goto err_priv; goto err_priv;
} }
priv->dai_fmt = (unsigned int) -1;
dai->private_data = priv; dai->private_data = priv;
return 0; return 0;
......
...@@ -69,8 +69,8 @@ static int jive_hw_params(struct snd_pcm_substream *substream, ...@@ -69,8 +69,8 @@ static int jive_hw_params(struct snd_pcm_substream *substream,
break; break;
} }
s3c_i2sv2_calc_rate(&div, NULL, params_rate(params), s3c_i2sv2_iis_calc_rate(&div, NULL, params_rate(params),
s3c2412_get_iisclk()); s3c2412_get_iisclk());
/* set codec DAI configuration */ /* set codec DAI configuration */
ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S |
...@@ -145,8 +145,9 @@ static struct snd_soc_dai_link jive_dai = { ...@@ -145,8 +145,9 @@ static struct snd_soc_dai_link jive_dai = {
}; };
/* jive audio machine driver */ /* jive audio machine driver */
static struct snd_soc_machine snd_soc_machine_jive = { static struct snd_soc_card snd_soc_machine_jive = {
.name = "Jive", .name = "Jive",
.platform = &s3c24xx_soc_platform,
.dai_link = &jive_dai, .dai_link = &jive_dai,
.num_links = 1, .num_links = 1,
}; };
...@@ -157,9 +158,8 @@ static struct wm8750_setup_data jive_wm8750_setup = { ...@@ -157,9 +158,8 @@ static struct wm8750_setup_data jive_wm8750_setup = {
/* jive audio subsystem */ /* jive audio subsystem */
static struct snd_soc_device jive_snd_devdata = { static struct snd_soc_device jive_snd_devdata = {
.machine = &snd_soc_machine_jive, .card = &snd_soc_machine_jive,
.platform = &s3c24xx_soc_platform, .codec_dev = &soc_codec_dev_wm8750,
.codec_dev = &soc_codec_dev_wm8750_spi,
.codec_data = &jive_wm8750_setup, .codec_data = &jive_wm8750_setup,
}; };
......
...@@ -473,9 +473,9 @@ static int s3c2412_i2s_set_clkdiv(struct snd_soc_dai *cpu_dai, ...@@ -473,9 +473,9 @@ static int s3c2412_i2s_set_clkdiv(struct snd_soc_dai *cpu_dai,
/* default table of all avaialable root fs divisors */ /* default table of all avaialable root fs divisors */
static unsigned int iis_fs_tab[] = { 256, 512, 384, 768 }; static unsigned int iis_fs_tab[] = { 256, 512, 384, 768 };
int s3c2412_iis_calc_rate(struct s3c_i2sv2_rate_calc *info, int s3c_i2sv2_iis_calc_rate(struct s3c_i2sv2_rate_calc *info,
unsigned int *fstab, unsigned int *fstab,
unsigned int rate, struct clk *clk) unsigned int rate, struct clk *clk)
{ {
unsigned long clkrate = clk_get_rate(clk); unsigned long clkrate = clk_get_rate(clk);
unsigned int div; unsigned int div;
...@@ -531,7 +531,7 @@ int s3c2412_iis_calc_rate(struct s3c_i2sv2_rate_calc *info, ...@@ -531,7 +531,7 @@ int s3c2412_iis_calc_rate(struct s3c_i2sv2_rate_calc *info,
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(s3c2412_iis_calc_rate); EXPORT_SYMBOL_GPL(s3c_i2sv2_iis_calc_rate);
int s3c_i2sv2_probe(struct platform_device *pdev, int s3c_i2sv2_probe(struct platform_device *pdev,
struct snd_soc_dai *dai, struct snd_soc_dai *dai,
...@@ -624,10 +624,12 @@ static int s3c2412_i2s_resume(struct snd_soc_dai *dai) ...@@ -624,10 +624,12 @@ static int s3c2412_i2s_resume(struct snd_soc_dai *dai)
int s3c_i2sv2_register_dai(struct snd_soc_dai *dai) int s3c_i2sv2_register_dai(struct snd_soc_dai *dai)
{ {
dai->ops.trigger = s3c2412_i2s_trigger; struct snd_soc_dai_ops *ops = dai->ops;
dai->ops.hw_params = s3c2412_i2s_hw_params;
dai->ops.set_fmt = s3c2412_i2s_set_fmt; ops->trigger = s3c2412_i2s_trigger;
dai->ops.set_clkdiv = s3c2412_i2s_set_clkdiv; ops->hw_params = s3c2412_i2s_hw_params;
ops->set_fmt = s3c2412_i2s_set_fmt;
ops->set_clkdiv = s3c2412_i2s_set_clkdiv;
dai->suspend = s3c2412_i2s_suspend; dai->suspend = s3c2412_i2s_suspend;
dai->resume = s3c2412_i2s_resume; dai->resume = s3c2412_i2s_resume;
......
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
#include <plat/regs-s3c2412-iis.h> #include <plat/regs-s3c2412-iis.h>
#include <plat/regs-gpio.h>
#include <plat/audio.h> #include <plat/audio.h>
#include <mach/regs-gpio.h>
#include <mach/dma.h> #include <mach/dma.h>
#include "s3c24xx-pcm.h" #include "s3c24xx-pcm.h"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册