Merge branch 'fix/asoc' into for-linus

* fix/asoc:
ASoC: OMAP: Fix FS polarity in OSK5912 machine driver
ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver
ASoC: Fix include build error in s3c2412-i2s.c
ASoC: Fix s3c-i2s-v2.c snd_soc_dai changes
ASoC: s3c-i2s-v2.c fix for s3c_i2sv2_iis_calc_rate
ASoC: Fix jive_wm8750.c build problems
ASoC: pxa-ssp: allow setting of dai format 0

+25 -19
+5 -2
sound/soc/omap/omap-mcbsp.c
··· 283 break; 284 case SND_SOC_DAIFMT_DSP_B: 285 regs->srgr2 |= FPER(wlen * channels - 1); 286 - regs->srgr1 |= FWID(wlen * channels - 2); 287 break; 288 } 289 ··· 302 { 303 struct omap_mcbsp_data *mcbsp_data = to_mcbsp(cpu_dai->private_data); 304 struct omap_mcbsp_reg_cfg *regs = &mcbsp_data->regs; 305 306 if (mcbsp_data->configured) 307 return 0; ··· 329 /* 0-bit data delay */ 330 regs->rcr2 |= RDATDLY(0); 331 regs->xcr2 |= XDATDLY(0); 332 break; 333 default: 334 /* Unsupported data format */ ··· 354 } 355 356 /* Set bit clock (CLKX/CLKR) and FS polarities */ 357 - switch (fmt & SND_SOC_DAIFMT_INV_MASK) { 358 case SND_SOC_DAIFMT_NB_NF: 359 /* 360 * Normal BCLK + FS.
··· 283 break; 284 case SND_SOC_DAIFMT_DSP_B: 285 regs->srgr2 |= FPER(wlen * channels - 1); 286 + regs->srgr1 |= FWID(0); 287 break; 288 } 289 ··· 302 { 303 struct omap_mcbsp_data *mcbsp_data = to_mcbsp(cpu_dai->private_data); 304 struct omap_mcbsp_reg_cfg *regs = &mcbsp_data->regs; 305 + unsigned int temp_fmt = fmt; 306 307 if (mcbsp_data->configured) 308 return 0; ··· 328 /* 0-bit data delay */ 329 regs->rcr2 |= RDATDLY(0); 330 regs->xcr2 |= XDATDLY(0); 331 + /* Invert FS polarity configuration */ 332 + temp_fmt ^= SND_SOC_DAIFMT_NB_IF; 333 break; 334 default: 335 /* Unsupported data format */ ··· 351 } 352 353 /* Set bit clock (CLKX/CLKR) and FS polarities */ 354 + switch (temp_fmt & SND_SOC_DAIFMT_INV_MASK) { 355 case SND_SOC_DAIFMT_NB_NF: 356 /* 357 * Normal BCLK + FS.
+2 -2
sound/soc/omap/osk5912.c
··· 62 /* Set codec DAI configuration */ 63 err = snd_soc_dai_set_fmt(codec_dai, 64 SND_SOC_DAIFMT_DSP_B | 65 - SND_SOC_DAIFMT_NB_IF | 66 SND_SOC_DAIFMT_CBM_CFM); 67 if (err < 0) { 68 printk(KERN_ERR "can't set codec DAI configuration\n"); ··· 72 /* Set cpu DAI configuration */ 73 err = snd_soc_dai_set_fmt(cpu_dai, 74 SND_SOC_DAIFMT_DSP_B | 75 - SND_SOC_DAIFMT_NB_IF | 76 SND_SOC_DAIFMT_CBM_CFM); 77 if (err < 0) { 78 printk(KERN_ERR "can't set cpu DAI configuration\n");
··· 62 /* Set codec DAI configuration */ 63 err = snd_soc_dai_set_fmt(codec_dai, 64 SND_SOC_DAIFMT_DSP_B | 65 + SND_SOC_DAIFMT_NB_NF | 66 SND_SOC_DAIFMT_CBM_CFM); 67 if (err < 0) { 68 printk(KERN_ERR "can't set codec DAI configuration\n"); ··· 72 /* Set cpu DAI configuration */ 73 err = snd_soc_dai_set_fmt(cpu_dai, 74 SND_SOC_DAIFMT_DSP_B | 75 + SND_SOC_DAIFMT_NB_NF | 76 SND_SOC_DAIFMT_CBM_CFM); 77 if (err < 0) { 78 printk(KERN_ERR "can't set cpu DAI configuration\n");
+1
sound/soc/pxa/pxa-ssp.c
··· 806 goto err_priv; 807 } 808 809 dai->private_data = priv; 810 811 return 0;
··· 806 goto err_priv; 807 } 808 809 + priv->dai_fmt = (unsigned int) -1; 810 dai->private_data = priv; 811 812 return 0;
+6 -6
sound/soc/s3c24xx/jive_wm8750.c
··· 69 break; 70 } 71 72 - s3c_i2sv2_calc_rate(&div, NULL, params_rate(params), 73 - s3c2412_get_iisclk()); 74 75 /* set codec DAI configuration */ 76 ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | ··· 145 }; 146 147 /* jive audio machine driver */ 148 - static struct snd_soc_machine snd_soc_machine_jive = { 149 .name = "Jive", 150 .dai_link = &jive_dai, 151 .num_links = 1, 152 }; ··· 158 159 /* jive audio subsystem */ 160 static struct snd_soc_device jive_snd_devdata = { 161 - .machine = &snd_soc_machine_jive, 162 - .platform = &s3c24xx_soc_platform, 163 - .codec_dev = &soc_codec_dev_wm8750_spi, 164 .codec_data = &jive_wm8750_setup, 165 }; 166
··· 69 break; 70 } 71 72 + s3c_i2sv2_iis_calc_rate(&div, NULL, params_rate(params), 73 + s3c2412_get_iisclk()); 74 75 /* set codec DAI configuration */ 76 ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | ··· 145 }; 146 147 /* jive audio machine driver */ 148 + static struct snd_soc_card snd_soc_machine_jive = { 149 .name = "Jive", 150 + .platform = &s3c24xx_soc_platform, 151 .dai_link = &jive_dai, 152 .num_links = 1, 153 }; ··· 157 158 /* jive audio subsystem */ 159 static struct snd_soc_device jive_snd_devdata = { 160 + .card = &snd_soc_machine_jive, 161 + .codec_dev = &soc_codec_dev_wm8750, 162 .codec_data = &jive_wm8750_setup, 163 }; 164
+10 -8
sound/soc/s3c24xx/s3c-i2s-v2.c
··· 473 /* default table of all avaialable root fs divisors */ 474 static unsigned int iis_fs_tab[] = { 256, 512, 384, 768 }; 475 476 - int s3c2412_iis_calc_rate(struct s3c_i2sv2_rate_calc *info, 477 - unsigned int *fstab, 478 - unsigned int rate, struct clk *clk) 479 { 480 unsigned long clkrate = clk_get_rate(clk); 481 unsigned int div; ··· 531 532 return 0; 533 } 534 - EXPORT_SYMBOL_GPL(s3c2412_iis_calc_rate); 535 536 int s3c_i2sv2_probe(struct platform_device *pdev, 537 struct snd_soc_dai *dai, ··· 624 625 int s3c_i2sv2_register_dai(struct snd_soc_dai *dai) 626 { 627 - dai->ops.trigger = s3c2412_i2s_trigger; 628 - dai->ops.hw_params = s3c2412_i2s_hw_params; 629 - dai->ops.set_fmt = s3c2412_i2s_set_fmt; 630 - dai->ops.set_clkdiv = s3c2412_i2s_set_clkdiv; 631 632 dai->suspend = s3c2412_i2s_suspend; 633 dai->resume = s3c2412_i2s_resume;
··· 473 /* default table of all avaialable root fs divisors */ 474 static unsigned int iis_fs_tab[] = { 256, 512, 384, 768 }; 475 476 + int s3c_i2sv2_iis_calc_rate(struct s3c_i2sv2_rate_calc *info, 477 + unsigned int *fstab, 478 + unsigned int rate, struct clk *clk) 479 { 480 unsigned long clkrate = clk_get_rate(clk); 481 unsigned int div; ··· 531 532 return 0; 533 } 534 + EXPORT_SYMBOL_GPL(s3c_i2sv2_iis_calc_rate); 535 536 int s3c_i2sv2_probe(struct platform_device *pdev, 537 struct snd_soc_dai *dai, ··· 624 625 int s3c_i2sv2_register_dai(struct snd_soc_dai *dai) 626 { 627 + struct snd_soc_dai_ops *ops = dai->ops; 628 + 629 + ops->trigger = s3c2412_i2s_trigger; 630 + ops->hw_params = s3c2412_i2s_hw_params; 631 + ops->set_fmt = s3c2412_i2s_set_fmt; 632 + ops->set_clkdiv = s3c2412_i2s_set_clkdiv; 633 634 dai->suspend = s3c2412_i2s_suspend; 635 dai->resume = s3c2412_i2s_resume;
+1 -1
sound/soc/s3c24xx/s3c2412-i2s.c
··· 33 34 #include <plat/regs-s3c2412-iis.h> 35 36 - #include <plat/regs-gpio.h> 37 #include <plat/audio.h> 38 #include <mach/dma.h> 39 40 #include "s3c24xx-pcm.h"
··· 33 34 #include <plat/regs-s3c2412-iis.h> 35 36 #include <plat/audio.h> 37 + #include <mach/regs-gpio.h> 38 #include <mach/dma.h> 39 40 #include "s3c24xx-pcm.h"