diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/tlv320aic32x4.c | 28 | ||||
-rw-r--r-- | sound/soc/codecs/tlv320aic32x4.h | 3 | ||||
-rw-r--r-- | sound/soc/codecs/wm5100.c | 2 | ||||
-rw-r--r-- | sound/soc/codecs/wm5110.c | 48 | ||||
-rw-r--r-- | sound/soc/fsl/fsl_ssi.c | 9 | ||||
-rw-r--r-- | sound/soc/omap/Kconfig | 1 |
6 files changed, 73 insertions, 18 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 | } |
2145 | EXPORT_SYMBOL_GPL(wm5100_detect); | ||
2144 | 2146 | ||
2145 | static irqreturn_t wm5100_irq(int irq, void *data) | 2147 | static 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 | ||
86 | static int wm5110_sysclk_ev(struct snd_soc_dapm_widget *w, | 134 | static int wm5110_sysclk_ev(struct snd_soc_dapm_widget *w, |
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index f9090b167ad7..1c791ddbf006 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c | |||
@@ -1262,18 +1262,13 @@ static int fsl_ssi_probe(struct platform_device *pdev) | |||
1262 | return -EINVAL; | 1262 | return -EINVAL; |
1263 | hw_type = (enum fsl_ssi_type) of_id->data; | 1263 | hw_type = (enum fsl_ssi_type) of_id->data; |
1264 | 1264 | ||
1265 | /* We only support the SSI in "I2S Slave" mode */ | ||
1266 | sprop = of_get_property(np, "fsl,mode", NULL); | 1265 | sprop = of_get_property(np, "fsl,mode", NULL); |
1267 | if (!sprop) { | 1266 | if (!sprop) { |
1268 | dev_err(&pdev->dev, "fsl,mode property is necessary\n"); | 1267 | dev_err(&pdev->dev, "fsl,mode property is necessary\n"); |
1269 | return -EINVAL; | 1268 | return -EINVAL; |
1270 | } | 1269 | } |
1271 | if (!strcmp(sprop, "ac97-slave")) { | 1270 | if (!strcmp(sprop, "ac97-slave")) |
1272 | ac97 = true; | 1271 | ac97 = true; |
1273 | } else if (strcmp(sprop, "i2s-slave")) { | ||
1274 | dev_notice(&pdev->dev, "mode %s is unsupported\n", sprop); | ||
1275 | return -ENODEV; | ||
1276 | } | ||
1277 | 1272 | ||
1278 | /* The DAI name is the last part of the full name of the node. */ | 1273 | /* The DAI name is the last part of the full name of the node. */ |
1279 | p = strrchr(np->full_name, '/') + 1; | 1274 | p = strrchr(np->full_name, '/') + 1; |
@@ -1391,7 +1386,7 @@ static int fsl_ssi_probe(struct platform_device *pdev) | |||
1391 | */ | 1386 | */ |
1392 | ssi_private->baudclk = devm_clk_get(&pdev->dev, "baud"); | 1387 | ssi_private->baudclk = devm_clk_get(&pdev->dev, "baud"); |
1393 | if (IS_ERR(ssi_private->baudclk)) | 1388 | if (IS_ERR(ssi_private->baudclk)) |
1394 | dev_warn(&pdev->dev, "could not get baud clock: %ld\n", | 1389 | dev_dbg(&pdev->dev, "could not get baud clock: %ld\n", |
1395 | PTR_ERR(ssi_private->baudclk)); | 1390 | PTR_ERR(ssi_private->baudclk)); |
1396 | else | 1391 | else |
1397 | clk_prepare_enable(ssi_private->baudclk); | 1392 | clk_prepare_enable(ssi_private->baudclk); |
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. |