diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-01-18 14:11:23 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-01-18 14:11:23 -0500 |
commit | 492e917635a0fa05439bb562fd51577efc9cef30 (patch) | |
tree | 31557bd3b15e1d79d7287cc3d7ded3875cbeea92 | |
parent | 065ae6784f03016ed1c0613863461a162388cf5a (diff) | |
parent | c88c2823e87dd6f8214b8b8cdc36d45f205a8077 (diff) |
Merge branch 'for-2.6.38' into for-2.6.39
-rw-r--r-- | sound/soc/blackfin/Kconfig | 11 | ||||
-rw-r--r-- | sound/soc/blackfin/bf5xx-ac97.c | 4 | ||||
-rw-r--r-- | sound/soc/blackfin/bf5xx-tdm.c | 10 | ||||
-rw-r--r-- | sound/soc/codecs/Kconfig | 2 | ||||
-rw-r--r-- | sound/soc/codecs/wl1273.c | 29 | ||||
-rw-r--r-- | sound/soc/codecs/wl1273.h | 71 | ||||
-rw-r--r-- | sound/soc/codecs/wm8990.c | 10 | ||||
-rw-r--r-- | sound/soc/ep93xx/ep93xx-i2s.c | 18 | ||||
-rw-r--r-- | sound/soc/pxa/z2.c | 3 |
9 files changed, 42 insertions, 116 deletions
diff --git a/sound/soc/blackfin/Kconfig b/sound/soc/blackfin/Kconfig index 3abeeddc67d3..ae403597fd31 100644 --- a/sound/soc/blackfin/Kconfig +++ b/sound/soc/blackfin/Kconfig | |||
@@ -1,6 +1,7 @@ | |||
1 | config SND_BF5XX_I2S | 1 | config SND_BF5XX_I2S |
2 | tristate "SoC I2S Audio for the ADI BF5xx chip" | 2 | tristate "SoC I2S Audio for the ADI BF5xx chip" |
3 | depends on BLACKFIN | 3 | depends on BLACKFIN |
4 | select SND_BF5XX_SOC_SPORT | ||
4 | help | 5 | help |
5 | Say Y or M if you want to add support for codecs attached to | 6 | Say Y or M if you want to add support for codecs attached to |
6 | the Blackfin SPORT (synchronous serial ports) interface in I2S | 7 | the Blackfin SPORT (synchronous serial ports) interface in I2S |
@@ -35,6 +36,7 @@ config SND_BFIN_AD73311_SE | |||
35 | config SND_BF5XX_TDM | 36 | config SND_BF5XX_TDM |
36 | tristate "SoC I2S(TDM mode) Audio for the ADI BF5xx chip" | 37 | tristate "SoC I2S(TDM mode) Audio for the ADI BF5xx chip" |
37 | depends on (BLACKFIN && SND_SOC) | 38 | depends on (BLACKFIN && SND_SOC) |
39 | select SND_BF5XX_SOC_SPORT | ||
38 | help | 40 | help |
39 | Say Y or M if you want to add support for codecs attached to | 41 | Say Y or M if you want to add support for codecs attached to |
40 | the Blackfin SPORT (synchronous serial ports) interface in TDM | 42 | the Blackfin SPORT (synchronous serial ports) interface in TDM |
@@ -61,6 +63,10 @@ config SND_BF5XX_SOC_AD193X | |||
61 | config SND_BF5XX_AC97 | 63 | config SND_BF5XX_AC97 |
62 | tristate "SoC AC97 Audio for the ADI BF5xx chip" | 64 | tristate "SoC AC97 Audio for the ADI BF5xx chip" |
63 | depends on BLACKFIN | 65 | depends on BLACKFIN |
66 | select AC97_BUS | ||
67 | select SND_SOC_AC97_BUS | ||
68 | select SND_BF5XX_SOC_SPORT | ||
69 | select SND_BF5XX_SOC_AC97 | ||
64 | help | 70 | help |
65 | Say Y or M if you want to add support for codecs attached to | 71 | Say Y or M if you want to add support for codecs attached to |
66 | the Blackfin SPORT (synchronous serial ports) interface in slot 16 | 72 | the Blackfin SPORT (synchronous serial ports) interface in slot 16 |
@@ -122,17 +128,12 @@ config SND_BF5XX_SOC_SPORT | |||
122 | 128 | ||
123 | config SND_BF5XX_SOC_I2S | 129 | config SND_BF5XX_SOC_I2S |
124 | tristate | 130 | tristate |
125 | select SND_BF5XX_SOC_SPORT | ||
126 | 131 | ||
127 | config SND_BF5XX_SOC_TDM | 132 | config SND_BF5XX_SOC_TDM |
128 | tristate | 133 | tristate |
129 | select SND_BF5XX_SOC_SPORT | ||
130 | 134 | ||
131 | config SND_BF5XX_SOC_AC97 | 135 | config SND_BF5XX_SOC_AC97 |
132 | tristate | 136 | tristate |
133 | select AC97_BUS | ||
134 | select SND_SOC_AC97_BUS | ||
135 | select SND_BF5XX_SOC_SPORT | ||
136 | 137 | ||
137 | config SND_BF5XX_SPORT_NUM | 138 | config SND_BF5XX_SPORT_NUM |
138 | int "Set a SPORT for Sound chip" | 139 | int "Set a SPORT for Sound chip" |
diff --git a/sound/soc/blackfin/bf5xx-ac97.c b/sound/soc/blackfin/bf5xx-ac97.c index c5f856ec27ca..ffbac26b9bce 100644 --- a/sound/soc/blackfin/bf5xx-ac97.c +++ b/sound/soc/blackfin/bf5xx-ac97.c | |||
@@ -260,9 +260,9 @@ static int bf5xx_ac97_suspend(struct snd_soc_dai *dai) | |||
260 | pr_debug("%s : sport %d\n", __func__, dai->id); | 260 | pr_debug("%s : sport %d\n", __func__, dai->id); |
261 | if (!dai->active) | 261 | if (!dai->active) |
262 | return 0; | 262 | return 0; |
263 | if (dai->capture.active) | 263 | if (dai->capture_active) |
264 | sport_rx_stop(sport); | 264 | sport_rx_stop(sport); |
265 | if (dai->playback.active) | 265 | if (dai->playback_active) |
266 | sport_tx_stop(sport); | 266 | sport_tx_stop(sport); |
267 | return 0; | 267 | return 0; |
268 | } | 268 | } |
diff --git a/sound/soc/blackfin/bf5xx-tdm.c b/sound/soc/blackfin/bf5xx-tdm.c index 125123929f16..5515ac9e05c7 100644 --- a/sound/soc/blackfin/bf5xx-tdm.c +++ b/sound/soc/blackfin/bf5xx-tdm.c | |||
@@ -210,7 +210,7 @@ static int bf5xx_tdm_set_channel_map(struct snd_soc_dai *dai, | |||
210 | #ifdef CONFIG_PM | 210 | #ifdef CONFIG_PM |
211 | static int bf5xx_tdm_suspend(struct snd_soc_dai *dai) | 211 | static int bf5xx_tdm_suspend(struct snd_soc_dai *dai) |
212 | { | 212 | { |
213 | struct sport_device *sport = dai->private_data; | 213 | struct sport_device *sport = snd_soc_dai_get_drvdata(dai); |
214 | 214 | ||
215 | if (!dai->active) | 215 | if (!dai->active) |
216 | return 0; | 216 | return 0; |
@@ -235,13 +235,13 @@ static int bf5xx_tdm_resume(struct snd_soc_dai *dai) | |||
235 | ret = -EBUSY; | 235 | ret = -EBUSY; |
236 | } | 236 | } |
237 | 237 | ||
238 | ret = sport_config_rx(sport, IRFS, 0x1F, 0, 0); | 238 | ret = sport_config_rx(sport, 0, 0x1F, 0, 0); |
239 | if (ret) { | 239 | if (ret) { |
240 | pr_err("SPORT is busy!\n"); | 240 | pr_err("SPORT is busy!\n"); |
241 | ret = -EBUSY; | 241 | ret = -EBUSY; |
242 | } | 242 | } |
243 | 243 | ||
244 | ret = sport_config_tx(sport, ITFS, 0x1F, 0, 0); | 244 | ret = sport_config_tx(sport, 0, 0x1F, 0, 0); |
245 | if (ret) { | 245 | if (ret) { |
246 | pr_err("SPORT is busy!\n"); | 246 | pr_err("SPORT is busy!\n"); |
247 | ret = -EBUSY; | 247 | ret = -EBUSY; |
@@ -303,14 +303,14 @@ static int __devinit bfin_tdm_probe(struct platform_device *pdev) | |||
303 | goto sport_config_err; | 303 | goto sport_config_err; |
304 | } | 304 | } |
305 | 305 | ||
306 | ret = sport_config_rx(sport_handle, IRFS, 0x1F, 0, 0); | 306 | ret = sport_config_rx(sport_handle, 0, 0x1F, 0, 0); |
307 | if (ret) { | 307 | if (ret) { |
308 | pr_err("SPORT is busy!\n"); | 308 | pr_err("SPORT is busy!\n"); |
309 | ret = -EBUSY; | 309 | ret = -EBUSY; |
310 | goto sport_config_err; | 310 | goto sport_config_err; |
311 | } | 311 | } |
312 | 312 | ||
313 | ret = sport_config_tx(sport_handle, ITFS, 0x1F, 0, 0); | 313 | ret = sport_config_tx(sport_handle, 0, 0x1F, 0, 0); |
314 | if (ret) { | 314 | if (ret) { |
315 | pr_err("SPORT is busy!\n"); | 315 | pr_err("SPORT is busy!\n"); |
316 | ret = -EBUSY; | 316 | ret = -EBUSY; |
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index a18cff4afbcc..a9cb2a04ad56 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig | |||
@@ -45,7 +45,7 @@ config SND_SOC_ALL_CODECS | |||
45 | select SND_SOC_TWL6040 if TWL4030_CORE | 45 | select SND_SOC_TWL6040 if TWL4030_CORE |
46 | select SND_SOC_UDA134X | 46 | select SND_SOC_UDA134X |
47 | select SND_SOC_UDA1380 if I2C | 47 | select SND_SOC_UDA1380 if I2C |
48 | select SND_SOC_WL1273 if WL1273_CORE | 48 | select SND_SOC_WL1273 if RADIO_WL1273 |
49 | select SND_SOC_WM2000 if I2C | 49 | select SND_SOC_WM2000 if I2C |
50 | select SND_SOC_WM8350 if MFD_WM8350 | 50 | select SND_SOC_WM8350 if MFD_WM8350 |
51 | select SND_SOC_WM8400 if MFD_WM8400 | 51 | select SND_SOC_WM8400 if MFD_WM8400 |
diff --git a/sound/soc/codecs/wl1273.c b/sound/soc/codecs/wl1273.c index d3ffa2f0122a..861b28f543d2 100644 --- a/sound/soc/codecs/wl1273.c +++ b/sound/soc/codecs/wl1273.c | |||
@@ -42,7 +42,7 @@ struct wl1273_priv { | |||
42 | static int snd_wl1273_fm_set_i2s_mode(struct wl1273_core *core, | 42 | static int snd_wl1273_fm_set_i2s_mode(struct wl1273_core *core, |
43 | int rate, int width) | 43 | int rate, int width) |
44 | { | 44 | { |
45 | struct device *dev = &core->i2c_dev->dev; | 45 | struct device *dev = &core->client->dev; |
46 | int r = 0; | 46 | int r = 0; |
47 | u16 mode; | 47 | u16 mode; |
48 | 48 | ||
@@ -123,13 +123,13 @@ static int snd_wl1273_fm_set_i2s_mode(struct wl1273_core *core, | |||
123 | dev_dbg(dev, "mode: 0x%04x\n", mode); | 123 | dev_dbg(dev, "mode: 0x%04x\n", mode); |
124 | 124 | ||
125 | if (core->i2s_mode != mode) { | 125 | if (core->i2s_mode != mode) { |
126 | r = wl1273_fm_write_cmd(core, WL1273_I2S_MODE_CONFIG_SET, mode); | 126 | r = core->write(core, WL1273_I2S_MODE_CONFIG_SET, mode); |
127 | if (r) | 127 | if (r) |
128 | goto out; | 128 | goto out; |
129 | 129 | ||
130 | core->i2s_mode = mode; | 130 | core->i2s_mode = mode; |
131 | r = wl1273_fm_write_cmd(core, WL1273_AUDIO_ENABLE, | 131 | r = core->write(core, WL1273_AUDIO_ENABLE, |
132 | WL1273_AUDIO_ENABLE_I2S); | 132 | WL1273_AUDIO_ENABLE_I2S); |
133 | if (r) | 133 | if (r) |
134 | goto out; | 134 | goto out; |
135 | } | 135 | } |
@@ -142,8 +142,7 @@ out: | |||
142 | static int snd_wl1273_fm_set_channel_number(struct wl1273_core *core, | 142 | static int snd_wl1273_fm_set_channel_number(struct wl1273_core *core, |
143 | int channel_number) | 143 | int channel_number) |
144 | { | 144 | { |
145 | struct i2c_client *client = core->i2c_dev; | 145 | struct device *dev = &core->client->dev; |
146 | struct device *dev = &client->dev; | ||
147 | int r = 0; | 146 | int r = 0; |
148 | 147 | ||
149 | dev_dbg(dev, "%s\n", __func__); | 148 | dev_dbg(dev, "%s\n", __func__); |
@@ -154,17 +153,13 @@ static int snd_wl1273_fm_set_channel_number(struct wl1273_core *core, | |||
154 | goto out; | 153 | goto out; |
155 | 154 | ||
156 | if (channel_number == 1 && core->mode == WL1273_MODE_RX) | 155 | if (channel_number == 1 && core->mode == WL1273_MODE_RX) |
157 | r = wl1273_fm_write_cmd(core, WL1273_MOST_MODE_SET, | 156 | r = core->write(core, WL1273_MOST_MODE_SET, WL1273_RX_MONO); |
158 | WL1273_RX_MONO); | ||
159 | else if (channel_number == 1 && core->mode == WL1273_MODE_TX) | 157 | else if (channel_number == 1 && core->mode == WL1273_MODE_TX) |
160 | r = wl1273_fm_write_cmd(core, WL1273_MONO_SET, | 158 | r = core->write(core, WL1273_MONO_SET, WL1273_TX_MONO); |
161 | WL1273_TX_MONO); | ||
162 | else if (channel_number == 2 && core->mode == WL1273_MODE_RX) | 159 | else if (channel_number == 2 && core->mode == WL1273_MODE_RX) |
163 | r = wl1273_fm_write_cmd(core, WL1273_MOST_MODE_SET, | 160 | r = core->write(core, WL1273_MOST_MODE_SET, WL1273_RX_STEREO); |
164 | WL1273_RX_STEREO); | ||
165 | else if (channel_number == 2 && core->mode == WL1273_MODE_TX) | 161 | else if (channel_number == 2 && core->mode == WL1273_MODE_TX) |
166 | r = wl1273_fm_write_cmd(core, WL1273_MONO_SET, | 162 | r = core->write(core, WL1273_MONO_SET, WL1273_TX_STEREO); |
167 | WL1273_TX_STEREO); | ||
168 | else | 163 | else |
169 | r = -EINVAL; | 164 | r = -EINVAL; |
170 | out: | 165 | out: |
@@ -237,7 +232,7 @@ static int snd_wl1273_fm_audio_put(struct snd_kcontrol *kcontrol, | |||
237 | if (wl1273->core->audio_mode == val) | 232 | if (wl1273->core->audio_mode == val) |
238 | return 0; | 233 | return 0; |
239 | 234 | ||
240 | r = wl1273_fm_set_audio(wl1273->core, val); | 235 | r = wl1273->core->set_audio(wl1273->core, val); |
241 | if (r < 0) | 236 | if (r < 0) |
242 | return r; | 237 | return r; |
243 | 238 | ||
@@ -272,8 +267,8 @@ static int snd_wl1273_fm_volume_put(struct snd_kcontrol *kcontrol, | |||
272 | 267 | ||
273 | dev_dbg(codec->dev, "%s: enter.\n", __func__); | 268 | dev_dbg(codec->dev, "%s: enter.\n", __func__); |
274 | 269 | ||
275 | r = wl1273_fm_set_volume(wl1273->core, | 270 | r = wl1273->core->set_volume(wl1273->core, |
276 | ucontrol->value.integer.value[0]); | 271 | ucontrol->value.integer.value[0]); |
277 | if (r) | 272 | if (r) |
278 | return r; | 273 | return r; |
279 | 274 | ||
diff --git a/sound/soc/codecs/wl1273.h b/sound/soc/codecs/wl1273.h index 14ed027fdcfc..43ec7e668c51 100644 --- a/sound/soc/codecs/wl1273.h +++ b/sound/soc/codecs/wl1273.h | |||
@@ -25,77 +25,6 @@ | |||
25 | #ifndef __WL1273_CODEC_H__ | 25 | #ifndef __WL1273_CODEC_H__ |
26 | #define __WL1273_CODEC_H__ | 26 | #define __WL1273_CODEC_H__ |
27 | 27 | ||
28 | /* I2S protocol, left channel first, data width 16 bits */ | ||
29 | #define WL1273_PCM_DEF_MODE 0x00 | ||
30 | |||
31 | /* Rx */ | ||
32 | #define WL1273_AUDIO_ENABLE_I2S (1 << 0) | ||
33 | #define WL1273_AUDIO_ENABLE_ANALOG (1 << 1) | ||
34 | |||
35 | /* Tx */ | ||
36 | #define WL1273_AUDIO_IO_SET_ANALOG 0 | ||
37 | #define WL1273_AUDIO_IO_SET_I2S 1 | ||
38 | |||
39 | #define WL1273_POWER_SET_OFF 0 | ||
40 | #define WL1273_POWER_SET_FM (1 << 0) | ||
41 | #define WL1273_POWER_SET_RDS (1 << 1) | ||
42 | #define WL1273_POWER_SET_RETENTION (1 << 4) | ||
43 | |||
44 | #define WL1273_PUPD_SET_OFF 0x00 | ||
45 | #define WL1273_PUPD_SET_ON 0x01 | ||
46 | #define WL1273_PUPD_SET_RETENTION 0x10 | ||
47 | |||
48 | /* I2S mode */ | ||
49 | #define WL1273_IS2_WIDTH_32 0x0 | ||
50 | #define WL1273_IS2_WIDTH_40 0x1 | ||
51 | #define WL1273_IS2_WIDTH_22_23 0x2 | ||
52 | #define WL1273_IS2_WIDTH_23_22 0x3 | ||
53 | #define WL1273_IS2_WIDTH_48 0x4 | ||
54 | #define WL1273_IS2_WIDTH_50 0x5 | ||
55 | #define WL1273_IS2_WIDTH_60 0x6 | ||
56 | #define WL1273_IS2_WIDTH_64 0x7 | ||
57 | #define WL1273_IS2_WIDTH_80 0x8 | ||
58 | #define WL1273_IS2_WIDTH_96 0x9 | ||
59 | #define WL1273_IS2_WIDTH_128 0xa | ||
60 | #define WL1273_IS2_WIDTH 0xf | ||
61 | |||
62 | #define WL1273_IS2_FORMAT_STD (0x0 << 4) | ||
63 | #define WL1273_IS2_FORMAT_LEFT (0x1 << 4) | ||
64 | #define WL1273_IS2_FORMAT_RIGHT (0x2 << 4) | ||
65 | #define WL1273_IS2_FORMAT_USER (0x3 << 4) | ||
66 | |||
67 | #define WL1273_IS2_MASTER (0x0 << 6) | ||
68 | #define WL1273_IS2_SLAVEW (0x1 << 6) | ||
69 | |||
70 | #define WL1273_IS2_TRI_AFTER_SENDING (0x0 << 7) | ||
71 | #define WL1273_IS2_TRI_ALWAYS_ACTIVE (0x1 << 7) | ||
72 | |||
73 | #define WL1273_IS2_SDOWS_RR (0x0 << 8) | ||
74 | #define WL1273_IS2_SDOWS_RF (0x1 << 8) | ||
75 | #define WL1273_IS2_SDOWS_FR (0x2 << 8) | ||
76 | #define WL1273_IS2_SDOWS_FF (0x3 << 8) | ||
77 | |||
78 | #define WL1273_IS2_TRI_OPT (0x0 << 10) | ||
79 | #define WL1273_IS2_TRI_ALWAYS (0x1 << 10) | ||
80 | |||
81 | #define WL1273_IS2_RATE_48K (0x0 << 12) | ||
82 | #define WL1273_IS2_RATE_44_1K (0x1 << 12) | ||
83 | #define WL1273_IS2_RATE_32K (0x2 << 12) | ||
84 | #define WL1273_IS2_RATE_22_05K (0x4 << 12) | ||
85 | #define WL1273_IS2_RATE_16K (0x5 << 12) | ||
86 | #define WL1273_IS2_RATE_12K (0x8 << 12) | ||
87 | #define WL1273_IS2_RATE_11_025 (0x9 << 12) | ||
88 | #define WL1273_IS2_RATE_8K (0xa << 12) | ||
89 | #define WL1273_IS2_RATE (0xf << 12) | ||
90 | |||
91 | #define WL1273_I2S_DEF_MODE (WL1273_IS2_WIDTH_32 | \ | ||
92 | WL1273_IS2_FORMAT_STD | \ | ||
93 | WL1273_IS2_MASTER | \ | ||
94 | WL1273_IS2_TRI_AFTER_SENDING | \ | ||
95 | WL1273_IS2_SDOWS_RR | \ | ||
96 | WL1273_IS2_TRI_OPT | \ | ||
97 | WL1273_IS2_RATE_48K) | ||
98 | |||
99 | int wl1273_get_format(struct snd_soc_codec *codec, unsigned int *fmt); | 28 | int wl1273_get_format(struct snd_soc_codec *codec, unsigned int *fmt); |
100 | 29 | ||
101 | #endif /* End of __WL1273_CODEC_H__ */ | 30 | #endif /* End of __WL1273_CODEC_H__ */ |
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c index 5c87a634fc04..100aeee5ba96 100644 --- a/sound/soc/codecs/wm8990.c +++ b/sound/soc/codecs/wm8990.c | |||
@@ -1183,7 +1183,7 @@ static int wm8990_set_bias_level(struct snd_soc_codec *codec, | |||
1183 | WM8990_VMIDTOG); | 1183 | WM8990_VMIDTOG); |
1184 | 1184 | ||
1185 | /* Delay to allow output caps to discharge */ | 1185 | /* Delay to allow output caps to discharge */ |
1186 | msleep(msecs_to_jiffies(300)); | 1186 | msleep(300); |
1187 | 1187 | ||
1188 | /* Disable VMIDTOG */ | 1188 | /* Disable VMIDTOG */ |
1189 | snd_soc_write(codec, WM8990_ANTIPOP2, WM8990_SOFTST | | 1189 | snd_soc_write(codec, WM8990_ANTIPOP2, WM8990_SOFTST | |
@@ -1195,17 +1195,17 @@ static int wm8990_set_bias_level(struct snd_soc_codec *codec, | |||
1195 | /* Enable outputs */ | 1195 | /* Enable outputs */ |
1196 | snd_soc_write(codec, WM8990_POWER_MANAGEMENT_1, 0x1b00); | 1196 | snd_soc_write(codec, WM8990_POWER_MANAGEMENT_1, 0x1b00); |
1197 | 1197 | ||
1198 | msleep(msecs_to_jiffies(50)); | 1198 | msleep(50); |
1199 | 1199 | ||
1200 | /* Enable VMID at 2x50k */ | 1200 | /* Enable VMID at 2x50k */ |
1201 | snd_soc_write(codec, WM8990_POWER_MANAGEMENT_1, 0x1f02); | 1201 | snd_soc_write(codec, WM8990_POWER_MANAGEMENT_1, 0x1f02); |
1202 | 1202 | ||
1203 | msleep(msecs_to_jiffies(100)); | 1203 | msleep(100); |
1204 | 1204 | ||
1205 | /* Enable VREF */ | 1205 | /* Enable VREF */ |
1206 | snd_soc_write(codec, WM8990_POWER_MANAGEMENT_1, 0x1f03); | 1206 | snd_soc_write(codec, WM8990_POWER_MANAGEMENT_1, 0x1f03); |
1207 | 1207 | ||
1208 | msleep(msecs_to_jiffies(600)); | 1208 | msleep(600); |
1209 | 1209 | ||
1210 | /* Enable BUFIOEN */ | 1210 | /* Enable BUFIOEN */ |
1211 | snd_soc_write(codec, WM8990_ANTIPOP2, WM8990_SOFTST | | 1211 | snd_soc_write(codec, WM8990_ANTIPOP2, WM8990_SOFTST | |
@@ -1250,7 +1250,7 @@ static int wm8990_set_bias_level(struct snd_soc_codec *codec, | |||
1250 | /* Disable VMID */ | 1250 | /* Disable VMID */ |
1251 | snd_soc_write(codec, WM8990_POWER_MANAGEMENT_1, 0x1f01); | 1251 | snd_soc_write(codec, WM8990_POWER_MANAGEMENT_1, 0x1f01); |
1252 | 1252 | ||
1253 | msleep(msecs_to_jiffies(300)); | 1253 | msleep(300); |
1254 | 1254 | ||
1255 | /* Enable all output discharge bits */ | 1255 | /* Enable all output discharge bits */ |
1256 | snd_soc_write(codec, WM8990_ANTIPOP1, WM8990_DIS_LLINE | | 1256 | snd_soc_write(codec, WM8990_ANTIPOP1, WM8990_DIS_LLINE | |
diff --git a/sound/soc/ep93xx/ep93xx-i2s.c b/sound/soc/ep93xx/ep93xx-i2s.c index 9ac93f6b4f85..fff579a1c134 100644 --- a/sound/soc/ep93xx/ep93xx-i2s.c +++ b/sound/soc/ep93xx/ep93xx-i2s.c | |||
@@ -267,14 +267,16 @@ static int ep93xx_i2s_hw_params(struct snd_pcm_substream *substream, | |||
267 | ep93xx_i2s_write_reg(info, EP93XX_I2S_RXWRDLEN, word_len); | 267 | ep93xx_i2s_write_reg(info, EP93XX_I2S_RXWRDLEN, word_len); |
268 | 268 | ||
269 | /* | 269 | /* |
270 | * Calculate the sdiv (bit clock) and lrdiv (left/right clock) values. | 270 | * EP93xx I2S module can be setup so SCLK / LRCLK value can be |
271 | * If the lrclk is pulse length is larger than the word size, then the | 271 | * 32, 64, 128. MCLK / SCLK value can be 2 and 4. |
272 | * bit clock will be gated for the unused bits. | 272 | * We set LRCLK equal to `rate' and minimum SCLK / LRCLK |
273 | * value is 64, because our sample size is 32 bit * 2 channels. | ||
274 | * I2S standard permits us to transmit more bits than | ||
275 | * the codec uses. | ||
273 | */ | 276 | */ |
274 | div = (clk_get_rate(info->mclk) / params_rate(params)) * | 277 | div = clk_get_rate(info->mclk) / params_rate(params); |
275 | params_channels(params); | ||
276 | for (sdiv = 2; sdiv <= 4; sdiv += 2) | 278 | for (sdiv = 2; sdiv <= 4; sdiv += 2) |
277 | for (lrdiv = 32; lrdiv <= 128; lrdiv <<= 1) | 279 | for (lrdiv = 64; lrdiv <= 128; lrdiv <<= 1) |
278 | if (sdiv * lrdiv == div) { | 280 | if (sdiv * lrdiv == div) { |
279 | found = 1; | 281 | found = 1; |
280 | goto out; | 282 | goto out; |
@@ -341,9 +343,7 @@ static struct snd_soc_dai_ops ep93xx_i2s_dai_ops = { | |||
341 | .set_fmt = ep93xx_i2s_set_dai_fmt, | 343 | .set_fmt = ep93xx_i2s_set_dai_fmt, |
342 | }; | 344 | }; |
343 | 345 | ||
344 | #define EP93XX_I2S_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \ | 346 | #define EP93XX_I2S_FORMATS (SNDRV_PCM_FMTBIT_S32_LE) |
345 | SNDRV_PCM_FMTBIT_S24_LE | \ | ||
346 | SNDRV_PCM_FMTBIT_S32_LE) | ||
347 | 347 | ||
348 | static struct snd_soc_dai_driver ep93xx_i2s_dai = { | 348 | static struct snd_soc_dai_driver ep93xx_i2s_dai = { |
349 | .symmetric_rates= 1, | 349 | .symmetric_rates= 1, |
diff --git a/sound/soc/pxa/z2.c b/sound/soc/pxa/z2.c index 2d4f896d7fec..3ceaef68e01d 100644 --- a/sound/soc/pxa/z2.c +++ b/sound/soc/pxa/z2.c | |||
@@ -104,6 +104,7 @@ static struct snd_soc_jack_gpio hs_jack_gpios[] = { | |||
104 | .name = "hsdet-gpio", | 104 | .name = "hsdet-gpio", |
105 | .report = SND_JACK_HEADSET, | 105 | .report = SND_JACK_HEADSET, |
106 | .debounce_time = 200, | 106 | .debounce_time = 200, |
107 | .invert = 1, | ||
107 | }, | 108 | }, |
108 | }; | 109 | }; |
109 | 110 | ||
@@ -192,7 +193,7 @@ static struct snd_soc_dai_link z2_dai = { | |||
192 | .cpu_dai_name = "pxa2xx-i2s", | 193 | .cpu_dai_name = "pxa2xx-i2s", |
193 | .codec_dai_name = "wm8750-hifi", | 194 | .codec_dai_name = "wm8750-hifi", |
194 | .platform_name = "pxa-pcm-audio", | 195 | .platform_name = "pxa-pcm-audio", |
195 | .codec_name = "wm8750-codec.0-001a", | 196 | .codec_name = "wm8750-codec.0-001b", |
196 | .init = z2_wm8750_init, | 197 | .init = z2_wm8750_init, |
197 | .ops = &z2_ops, | 198 | .ops = &z2_ops, |
198 | }; | 199 | }; |