aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/tlv320aic32x4.c28
-rw-r--r--sound/soc/codecs/tlv320aic32x4.h3
-rw-r--r--sound/soc/codecs/wm5100.c2
-rw-r--r--sound/soc/codecs/wm5110.c48
-rw-r--r--sound/soc/omap/Kconfig1
-rw-r--r--sound/soc/samsung/Kconfig4
-rw-r--r--sound/soc/samsung/h1940_uda1380.c1
-rw-r--r--sound/soc/samsung/i2s.c5
-rw-r--r--sound/soc/samsung/neo1973_wm8753.c1
-rw-r--r--sound/soc/samsung/rx1950_uda1380.c1
-rw-r--r--sound/soc/samsung/s3c-i2s-v2.c6
-rw-r--r--sound/soc/samsung/s3c2412-i2s.c2
-rw-r--r--sound/soc/samsung/s3c24xx-i2s.c2
-rw-r--r--sound/soc/samsung/smartq_wm8987.c1
-rw-r--r--sound/soc/samsung/smdk_wm8994.c4
15 files changed, 87 insertions, 22 deletions
diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c
index 385dec16eb8a..688151ba309a 100644
--- a/sound/soc/codecs/tlv320aic32x4.c
+++ b/sound/soc/codecs/tlv320aic32x4.c
@@ -450,6 +450,17 @@ static int aic32x4_hw_params(struct snd_pcm_substream *substream,
450 } 450 }
451 snd_soc_write(codec, AIC32X4_IFACE1, data); 451 snd_soc_write(codec, AIC32X4_IFACE1, data);
452 452
453 if (params_channels(params) == 1) {
454 data = AIC32X4_RDAC2LCHN | AIC32X4_LDAC2LCHN;
455 } else {
456 if (aic32x4->swapdacs)
457 data = AIC32X4_RDAC2LCHN | AIC32X4_LDAC2RCHN;
458 else
459 data = AIC32X4_LDAC2LCHN | AIC32X4_RDAC2RCHN;
460 }
461 snd_soc_update_bits(codec, AIC32X4_DACSETUP, AIC32X4_DAC_CHAN_MASK,
462 data);
463
453 return 0; 464 return 0;
454} 465}
455 466
@@ -606,20 +617,15 @@ static int aic32x4_probe(struct snd_soc_codec *codec)
606 } 617 }
607 snd_soc_write(codec, AIC32X4_CMMODE, tmp_reg); 618 snd_soc_write(codec, AIC32X4_CMMODE, tmp_reg);
608 619
609 /* Do DACs need to be swapped? */
610 if (aic32x4->swapdacs) {
611 snd_soc_write(codec, AIC32X4_DACSETUP, AIC32X4_LDAC2RCHN | AIC32X4_RDAC2LCHN);
612 } else {
613 snd_soc_write(codec, AIC32X4_DACSETUP, AIC32X4_LDAC2LCHN | AIC32X4_RDAC2RCHN);
614 }
615
616 /* Mic PGA routing */ 620 /* Mic PGA routing */
617 if (aic32x4->micpga_routing & AIC32X4_MICPGA_ROUTE_LMIC_IN2R_10K) { 621 if (aic32x4->micpga_routing & AIC32X4_MICPGA_ROUTE_LMIC_IN2R_10K)
618 snd_soc_write(codec, AIC32X4_LMICPGANIN, AIC32X4_LMICPGANIN_IN2R_10K); 622 snd_soc_write(codec, AIC32X4_LMICPGANIN, AIC32X4_LMICPGANIN_IN2R_10K);
619 } 623 else
620 if (aic32x4->micpga_routing & AIC32X4_MICPGA_ROUTE_RMIC_IN1L_10K) { 624 snd_soc_write(codec, AIC32X4_LMICPGANIN, AIC32X4_LMICPGANIN_CM1L_10K);
625 if (aic32x4->micpga_routing & AIC32X4_MICPGA_ROUTE_RMIC_IN1L_10K)
621 snd_soc_write(codec, AIC32X4_RMICPGANIN, AIC32X4_RMICPGANIN_IN1L_10K); 626 snd_soc_write(codec, AIC32X4_RMICPGANIN, AIC32X4_RMICPGANIN_IN1L_10K);
622 } 627 else
628 snd_soc_write(codec, AIC32X4_RMICPGANIN, AIC32X4_RMICPGANIN_CM1R_10K);
623 629
624 aic32x4_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 630 aic32x4_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
625 631
diff --git a/sound/soc/codecs/tlv320aic32x4.h b/sound/soc/codecs/tlv320aic32x4.h
index 35774223fd91..995f033a855d 100644
--- a/sound/soc/codecs/tlv320aic32x4.h
+++ b/sound/soc/codecs/tlv320aic32x4.h
@@ -120,7 +120,9 @@
120#define AIC32X4_MICBIAS_2075V 0x60 120#define AIC32X4_MICBIAS_2075V 0x60
121 121
122#define AIC32X4_LMICPGANIN_IN2R_10K 0x10 122#define AIC32X4_LMICPGANIN_IN2R_10K 0x10
123#define AIC32X4_LMICPGANIN_CM1L_10K 0x40
123#define AIC32X4_RMICPGANIN_IN1L_10K 0x10 124#define AIC32X4_RMICPGANIN_IN1L_10K 0x10
125#define AIC32X4_RMICPGANIN_CM1R_10K 0x40
124 126
125#define AIC32X4_LMICPGAVOL_NOGAIN 0x80 127#define AIC32X4_LMICPGAVOL_NOGAIN 0x80
126#define AIC32X4_RMICPGAVOL_NOGAIN 0x80 128#define AIC32X4_RMICPGAVOL_NOGAIN 0x80
@@ -138,6 +140,7 @@
138#define AIC32X4_LDAC2RCHN (0x02 << 4) 140#define AIC32X4_LDAC2RCHN (0x02 << 4)
139#define AIC32X4_LDAC2LCHN (0x01 << 4) 141#define AIC32X4_LDAC2LCHN (0x01 << 4)
140#define AIC32X4_RDAC2RCHN (0x01 << 2) 142#define AIC32X4_RDAC2RCHN (0x01 << 2)
143#define AIC32X4_DAC_CHAN_MASK 0x3c
141 144
142#define AIC32X4_SSTEP2WCLK 0x01 145#define AIC32X4_SSTEP2WCLK 0x01
143#define AIC32X4_MUTEON 0x0C 146#define AIC32X4_MUTEON 0x0C
diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c
index 4cf91deabc02..4e3e31aaf509 100644
--- a/sound/soc/codecs/wm5100.c
+++ b/sound/soc/codecs/wm5100.c
@@ -14,6 +14,7 @@
14#include <linux/moduleparam.h> 14#include <linux/moduleparam.h>
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/delay.h> 16#include <linux/delay.h>
17#include <linux/export.h>
17#include <linux/pm.h> 18#include <linux/pm.h>
18#include <linux/gcd.h> 19#include <linux/gcd.h>
19#include <linux/gpio.h> 20#include <linux/gpio.h>
@@ -2141,6 +2142,7 @@ int wm5100_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack)
2141 2142
2142 return 0; 2143 return 0;
2143} 2144}
2145EXPORT_SYMBOL_GPL(wm5100_detect);
2144 2146
2145static irqreturn_t wm5100_irq(int irq, void *data) 2147static irqreturn_t wm5100_irq(int irq, void *data)
2146{ 2148{
diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c
index d862f76b59f9..2c3c962d9a85 100644
--- a/sound/soc/codecs/wm5110.c
+++ b/sound/soc/codecs/wm5110.c
@@ -81,6 +81,54 @@ static const struct reg_default wm5110_sysclk_revd_patch[] = {
81 { 0x3133, 0x1201 }, 81 { 0x3133, 0x1201 },
82 { 0x3183, 0x1501 }, 82 { 0x3183, 0x1501 },
83 { 0x31D3, 0x1401 }, 83 { 0x31D3, 0x1401 },
84 { 0x0049, 0x01ea },
85 { 0x004a, 0x01f2 },
86 { 0x0057, 0x01e7 },
87 { 0x0058, 0x01fb },
88 { 0x33ce, 0xc4f5 },
89 { 0x33cf, 0x1361 },
90 { 0x33d0, 0x0402 },
91 { 0x33d1, 0x4700 },
92 { 0x33d2, 0x026d },
93 { 0x33d3, 0xff00 },
94 { 0x33d4, 0x026d },
95 { 0x33d5, 0x0101 },
96 { 0x33d6, 0xc4f5 },
97 { 0x33d7, 0x0361 },
98 { 0x33d8, 0x0402 },
99 { 0x33d9, 0x6701 },
100 { 0x33da, 0xc4f5 },
101 { 0x33db, 0x136f },
102 { 0x33dc, 0xc4f5 },
103 { 0x33dd, 0x134f },
104 { 0x33de, 0xc4f5 },
105 { 0x33df, 0x131f },
106 { 0x33e0, 0x026d },
107 { 0x33e1, 0x4f01 },
108 { 0x33e2, 0x026d },
109 { 0x33e3, 0xf100 },
110 { 0x33e4, 0x026d },
111 { 0x33e5, 0x0001 },
112 { 0x33e6, 0xc4f5 },
113 { 0x33e7, 0x0361 },
114 { 0x33e8, 0x0402 },
115 { 0x33e9, 0x6601 },
116 { 0x33ea, 0xc4f5 },
117 { 0x33eb, 0x136f },
118 { 0x33ec, 0xc4f5 },
119 { 0x33ed, 0x134f },
120 { 0x33ee, 0xc4f5 },
121 { 0x33ef, 0x131f },
122 { 0x33f0, 0x026d },
123 { 0x33f1, 0x4e01 },
124 { 0x33f2, 0x026d },
125 { 0x33f3, 0xf000 },
126 { 0x33f6, 0xc4f5 },
127 { 0x33f7, 0x1361 },
128 { 0x33f8, 0x0402 },
129 { 0x33f9, 0x4600 },
130 { 0x33fa, 0x026d },
131 { 0x33fb, 0xfe00 },
84}; 132};
85 133
86static int wm5110_sysclk_ev(struct snd_soc_dapm_widget *w, 134static int wm5110_sysclk_ev(struct snd_soc_dapm_widget *w,
diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig
index 4a07f7179690..22ad9c5654b5 100644
--- a/sound/soc/omap/Kconfig
+++ b/sound/soc/omap/Kconfig
@@ -30,6 +30,7 @@ config SND_OMAP_SOC_RX51
30 select SND_OMAP_SOC_MCBSP 30 select SND_OMAP_SOC_MCBSP
31 select SND_SOC_TLV320AIC3X 31 select SND_SOC_TLV320AIC3X
32 select SND_SOC_TPA6130A2 32 select SND_SOC_TPA6130A2
33 depends on GPIOLIB
33 help 34 help
34 Say Y if you want to add support for SoC audio on Nokia RX-51 35 Say Y if you want to add support for SoC audio on Nokia RX-51
35 hardware. This is also known as Nokia N900 product. 36 hardware. This is also known as Nokia N900 product.
diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig
index 27930fc432dc..454f41cfc828 100644
--- a/sound/soc/samsung/Kconfig
+++ b/sound/soc/samsung/Kconfig
@@ -19,7 +19,7 @@ config SND_S3C_DMA_LEGACY
19 19
20config SND_S3C24XX_I2S 20config SND_S3C24XX_I2S
21 tristate 21 tristate
22 select S3C2410_DMA 22 select S3C24XX_DMA
23 23
24config SND_S3C_I2SV2_SOC 24config SND_S3C_I2SV2_SOC
25 tristate 25 tristate
@@ -210,7 +210,7 @@ config SND_SOC_TOBERMORY
210 210
211config SND_SOC_BELLS 211config SND_SOC_BELLS
212 tristate "Audio support for Wolfson Bells" 212 tristate "Audio support for Wolfson Bells"
213 depends on SND_SOC_SAMSUNG && MACH_WLF_CRAGG_6410 213 depends on SND_SOC_SAMSUNG && MACH_WLF_CRAGG_6410 && MFD_ARIZONA
214 select SND_SAMSUNG_I2S 214 select SND_SAMSUNG_I2S
215 select SND_SOC_WM5102 215 select SND_SOC_WM5102
216 select SND_SOC_WM5110 216 select SND_SOC_WM5110
diff --git a/sound/soc/samsung/h1940_uda1380.c b/sound/soc/samsung/h1940_uda1380.c
index fa91376e323d..fbced589d077 100644
--- a/sound/soc/samsung/h1940_uda1380.c
+++ b/sound/soc/samsung/h1940_uda1380.c
@@ -23,6 +23,7 @@
23#include "regs-iis.h" 23#include "regs-iis.h"
24#include <asm/mach-types.h> 24#include <asm/mach-types.h>
25 25
26#include <mach/gpio-samsung.h>
26#include "s3c24xx-i2s.h" 27#include "s3c24xx-i2s.h"
27 28
28static unsigned int rates[] = { 29static unsigned int rates[] = {
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index 92f64363427d..0a9b44c940ce 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -22,8 +22,6 @@
22#include <sound/soc.h> 22#include <sound/soc.h>
23#include <sound/pcm_params.h> 23#include <sound/pcm_params.h>
24 24
25#include <mach/dma.h>
26
27#include <linux/platform_data/asoc-s3c.h> 25#include <linux/platform_data/asoc-s3c.h>
28 26
29#include "dma.h" 27#include "dma.h"
@@ -1268,7 +1266,8 @@ static int samsung_i2s_probe(struct platform_device *pdev)
1268 1266
1269 return 0; 1267 return 0;
1270err: 1268err:
1271 release_mem_region(regs_base, resource_size(res)); 1269 if (res)
1270 release_mem_region(regs_base, resource_size(res));
1272 1271
1273 return ret; 1272 return ret;
1274} 1273}
diff --git a/sound/soc/samsung/neo1973_wm8753.c b/sound/soc/samsung/neo1973_wm8753.c
index 807db417d234..98a04c11202d 100644
--- a/sound/soc/samsung/neo1973_wm8753.c
+++ b/sound/soc/samsung/neo1973_wm8753.c
@@ -20,6 +20,7 @@
20 20
21#include <sound/soc.h> 21#include <sound/soc.h>
22 22
23#include <mach/gpio-samsung.h>
23#include <asm/mach-types.h> 24#include <asm/mach-types.h>
24#include "regs-iis.h" 25#include "regs-iis.h"
25 26
diff --git a/sound/soc/samsung/rx1950_uda1380.c b/sound/soc/samsung/rx1950_uda1380.c
index 704460a37005..06ebdc061770 100644
--- a/sound/soc/samsung/rx1950_uda1380.c
+++ b/sound/soc/samsung/rx1950_uda1380.c
@@ -24,6 +24,7 @@
24#include <sound/soc.h> 24#include <sound/soc.h>
25#include <sound/jack.h> 25#include <sound/jack.h>
26 26
27#include <mach/gpio-samsung.h>
27#include "regs-iis.h" 28#include "regs-iis.h"
28#include <asm/mach-types.h> 29#include <asm/mach-types.h>
29 30
diff --git a/sound/soc/samsung/s3c-i2s-v2.c b/sound/soc/samsung/s3c-i2s-v2.c
index fefc56100349..79e7efb9283c 100644
--- a/sound/soc/samsung/s3c-i2s-v2.c
+++ b/sound/soc/samsung/s3c-i2s-v2.c
@@ -729,7 +729,7 @@ int s3c_i2sv2_register_component(struct device *dev, int id,
729 struct snd_soc_component_driver *cmp_drv, 729 struct snd_soc_component_driver *cmp_drv,
730 struct snd_soc_dai_driver *dai_drv) 730 struct snd_soc_dai_driver *dai_drv)
731{ 731{
732 struct snd_soc_dai_ops *ops = drv->ops; 732 struct snd_soc_dai_ops *ops = dai_drv->ops;
733 733
734 ops->trigger = s3c2412_i2s_trigger; 734 ops->trigger = s3c2412_i2s_trigger;
735 if (!ops->hw_params) 735 if (!ops->hw_params)
@@ -742,8 +742,8 @@ int s3c_i2sv2_register_component(struct device *dev, int id,
742 if (!ops->delay) 742 if (!ops->delay)
743 ops->delay = s3c2412_i2s_delay; 743 ops->delay = s3c2412_i2s_delay;
744 744
745 drv->suspend = s3c2412_i2s_suspend; 745 dai_drv->suspend = s3c2412_i2s_suspend;
746 drv->resume = s3c2412_i2s_resume; 746 dai_drv->resume = s3c2412_i2s_resume;
747 747
748 return snd_soc_register_component(dev, cmp_drv, dai_drv, 1); 748 return snd_soc_register_component(dev, cmp_drv, dai_drv, 1);
749} 749}
diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c
index ea885cb9f76c..d0794458963a 100644
--- a/sound/soc/samsung/s3c2412-i2s.c
+++ b/sound/soc/samsung/s3c2412-i2s.c
@@ -26,6 +26,8 @@
26#include <sound/pcm_params.h> 26#include <sound/pcm_params.h>
27 27
28#include <mach/dma.h> 28#include <mach/dma.h>
29#include <mach/gpio-samsung.h>
30#include <plat/gpio-cfg.h>
29 31
30#include "dma.h" 32#include "dma.h"
31#include "regs-i2s-v2.h" 33#include "regs-i2s-v2.h"
diff --git a/sound/soc/samsung/s3c24xx-i2s.c b/sound/soc/samsung/s3c24xx-i2s.c
index 9c8ebd872fac..f31e916dd8c4 100644
--- a/sound/soc/samsung/s3c24xx-i2s.c
+++ b/sound/soc/samsung/s3c24xx-i2s.c
@@ -24,6 +24,8 @@
24#include <sound/pcm_params.h> 24#include <sound/pcm_params.h>
25 25
26#include <mach/dma.h> 26#include <mach/dma.h>
27#include <mach/gpio-samsung.h>
28#include <plat/gpio-cfg.h>
27#include "regs-iis.h" 29#include "regs-iis.h"
28 30
29#include "dma.h" 31#include "dma.h"
diff --git a/sound/soc/samsung/smartq_wm8987.c b/sound/soc/samsung/smartq_wm8987.c
index 58ae3237ef69..c3b2adafb7b5 100644
--- a/sound/soc/samsung/smartq_wm8987.c
+++ b/sound/soc/samsung/smartq_wm8987.c
@@ -19,6 +19,7 @@
19#include <sound/soc.h> 19#include <sound/soc.h>
20#include <sound/jack.h> 20#include <sound/jack.h>
21 21
22#include <mach/gpio-samsung.h>
22#include <asm/mach-types.h> 23#include <asm/mach-types.h>
23 24
24#include "i2s.h" 25#include "i2s.h"
diff --git a/sound/soc/samsung/smdk_wm8994.c b/sound/soc/samsung/smdk_wm8994.c
index b072bd107b31..d38ae98e2f32 100644
--- a/sound/soc/samsung/smdk_wm8994.c
+++ b/sound/soc/samsung/smdk_wm8994.c
@@ -152,13 +152,11 @@ static struct snd_soc_card smdk = {
152 .num_links = ARRAY_SIZE(smdk_dai), 152 .num_links = ARRAY_SIZE(smdk_dai),
153}; 153};
154 154
155#ifdef CONFIG_OF
156static const struct of_device_id samsung_wm8994_of_match[] = { 155static const struct of_device_id samsung_wm8994_of_match[] = {
157 { .compatible = "samsung,smdk-wm8994", .data = &smdk_board_data }, 156 { .compatible = "samsung,smdk-wm8994", .data = &smdk_board_data },
158 {}, 157 {},
159}; 158};
160MODULE_DEVICE_TABLE(of, samsung_wm8994_of_match); 159MODULE_DEVICE_TABLE(of, samsung_wm8994_of_match);
161#endif /* CONFIG_OF */
162 160
163static int smdk_audio_probe(struct platform_device *pdev) 161static int smdk_audio_probe(struct platform_device *pdev)
164{ 162{
@@ -188,7 +186,7 @@ static int smdk_audio_probe(struct platform_device *pdev)
188 smdk_dai[0].platform_of_node = smdk_dai[0].cpu_of_node; 186 smdk_dai[0].platform_of_node = smdk_dai[0].cpu_of_node;
189 } 187 }
190 188
191 id = of_match_device(samsung_wm8994_of_match, &pdev->dev); 189 id = of_match_device(of_match_ptr(samsung_wm8994_of_match), &pdev->dev);
192 if (id) 190 if (id)
193 *board = *((struct smdk_wm8994_data *)id->data); 191 *board = *((struct smdk_wm8994_data *)id->data);
194 192