diff options
Diffstat (limited to 'sound/soc/pxa')
-rw-r--r-- | sound/soc/pxa/brownstone.c | 1 | ||||
-rw-r--r-- | sound/soc/pxa/corgi.c | 1 | ||||
-rw-r--r-- | sound/soc/pxa/e740_wm9705.c | 1 | ||||
-rw-r--r-- | sound/soc/pxa/e750_wm9705.c | 1 | ||||
-rw-r--r-- | sound/soc/pxa/e800_wm9712.c | 1 | ||||
-rw-r--r-- | sound/soc/pxa/imote2.c | 1 | ||||
-rw-r--r-- | sound/soc/pxa/mioa701_wm9713.c | 1 | ||||
-rw-r--r-- | sound/soc/pxa/mmp-sspa.c | 5 | ||||
-rw-r--r-- | sound/soc/pxa/palm27x.c | 1 | ||||
-rw-r--r-- | sound/soc/pxa/poodle.c | 1 | ||||
-rw-r--r-- | sound/soc/pxa/pxa2xx-ac97.c | 56 | ||||
-rw-r--r-- | sound/soc/pxa/pxa2xx-i2s.c | 3 | ||||
-rw-r--r-- | sound/soc/pxa/tosa.c | 1 | ||||
-rw-r--r-- | sound/soc/pxa/ttc-dkb.c | 1 |
14 files changed, 40 insertions, 35 deletions
diff --git a/sound/soc/pxa/brownstone.c b/sound/soc/pxa/brownstone.c index 5b7d969f89a9..08acdc236bf8 100644 --- a/sound/soc/pxa/brownstone.c +++ b/sound/soc/pxa/brownstone.c | |||
@@ -163,6 +163,7 @@ static struct platform_driver mmp_driver = { | |||
163 | .driver = { | 163 | .driver = { |
164 | .name = "brownstone-audio", | 164 | .name = "brownstone-audio", |
165 | .owner = THIS_MODULE, | 165 | .owner = THIS_MODULE, |
166 | .pm = &snd_soc_pm_ops, | ||
166 | }, | 167 | }, |
167 | .probe = brownstone_probe, | 168 | .probe = brownstone_probe, |
168 | .remove = brownstone_remove, | 169 | .remove = brownstone_remove, |
diff --git a/sound/soc/pxa/corgi.c b/sound/soc/pxa/corgi.c index f4cce1e80112..1853d41034bf 100644 --- a/sound/soc/pxa/corgi.c +++ b/sound/soc/pxa/corgi.c | |||
@@ -329,6 +329,7 @@ static struct platform_driver corgi_driver = { | |||
329 | .driver = { | 329 | .driver = { |
330 | .name = "corgi-audio", | 330 | .name = "corgi-audio", |
331 | .owner = THIS_MODULE, | 331 | .owner = THIS_MODULE, |
332 | .pm = &snd_soc_pm_ops, | ||
332 | }, | 333 | }, |
333 | .probe = corgi_probe, | 334 | .probe = corgi_probe, |
334 | .remove = corgi_remove, | 335 | .remove = corgi_remove, |
diff --git a/sound/soc/pxa/e740_wm9705.c b/sound/soc/pxa/e740_wm9705.c index 70d799b13f0d..44b5c09d296b 100644 --- a/sound/soc/pxa/e740_wm9705.c +++ b/sound/soc/pxa/e740_wm9705.c | |||
@@ -178,6 +178,7 @@ static struct platform_driver e740_driver = { | |||
178 | .driver = { | 178 | .driver = { |
179 | .name = "e740-audio", | 179 | .name = "e740-audio", |
180 | .owner = THIS_MODULE, | 180 | .owner = THIS_MODULE, |
181 | .pm = &snd_soc_pm_ops, | ||
181 | }, | 182 | }, |
182 | .probe = e740_probe, | 183 | .probe = e740_probe, |
183 | .remove = e740_remove, | 184 | .remove = e740_remove, |
diff --git a/sound/soc/pxa/e750_wm9705.c b/sound/soc/pxa/e750_wm9705.c index f94d2ab51351..c34e447eb991 100644 --- a/sound/soc/pxa/e750_wm9705.c +++ b/sound/soc/pxa/e750_wm9705.c | |||
@@ -160,6 +160,7 @@ static struct platform_driver e750_driver = { | |||
160 | .driver = { | 160 | .driver = { |
161 | .name = "e750-audio", | 161 | .name = "e750-audio", |
162 | .owner = THIS_MODULE, | 162 | .owner = THIS_MODULE, |
163 | .pm = &snd_soc_pm_ops, | ||
163 | }, | 164 | }, |
164 | .probe = e750_probe, | 165 | .probe = e750_probe, |
165 | .remove = e750_remove, | 166 | .remove = e750_remove, |
diff --git a/sound/soc/pxa/e800_wm9712.c b/sound/soc/pxa/e800_wm9712.c index 8768a640dd71..3137f800b43f 100644 --- a/sound/soc/pxa/e800_wm9712.c +++ b/sound/soc/pxa/e800_wm9712.c | |||
@@ -150,6 +150,7 @@ static struct platform_driver e800_driver = { | |||
150 | .driver = { | 150 | .driver = { |
151 | .name = "e800-audio", | 151 | .name = "e800-audio", |
152 | .owner = THIS_MODULE, | 152 | .owner = THIS_MODULE, |
153 | .pm = &snd_soc_pm_ops, | ||
153 | }, | 154 | }, |
154 | .probe = e800_probe, | 155 | .probe = e800_probe, |
155 | .remove = e800_remove, | 156 | .remove = e800_remove, |
diff --git a/sound/soc/pxa/imote2.c b/sound/soc/pxa/imote2.c index eef1f7b7b38e..fd2f4eda1fd3 100644 --- a/sound/soc/pxa/imote2.c +++ b/sound/soc/pxa/imote2.c | |||
@@ -91,6 +91,7 @@ static struct platform_driver imote2_driver = { | |||
91 | .driver = { | 91 | .driver = { |
92 | .name = "imote2-audio", | 92 | .name = "imote2-audio", |
93 | .owner = THIS_MODULE, | 93 | .owner = THIS_MODULE, |
94 | .pm = &snd_soc_pm_ops, | ||
94 | }, | 95 | }, |
95 | .probe = imote2_probe, | 96 | .probe = imote2_probe, |
96 | .remove = imote2_remove, | 97 | .remove = imote2_remove, |
diff --git a/sound/soc/pxa/mioa701_wm9713.c b/sound/soc/pxa/mioa701_wm9713.c index bbea7780eac6..160c5245448f 100644 --- a/sound/soc/pxa/mioa701_wm9713.c +++ b/sound/soc/pxa/mioa701_wm9713.c | |||
@@ -215,6 +215,7 @@ static struct platform_driver mioa701_wm9713_driver = { | |||
215 | .driver = { | 215 | .driver = { |
216 | .name = "mioa701-wm9713", | 216 | .name = "mioa701-wm9713", |
217 | .owner = THIS_MODULE, | 217 | .owner = THIS_MODULE, |
218 | .pm = &snd_soc_pm_ops, | ||
218 | }, | 219 | }, |
219 | }; | 220 | }; |
220 | 221 | ||
diff --git a/sound/soc/pxa/mmp-sspa.c b/sound/soc/pxa/mmp-sspa.c index 41752a5fe3b0..5bf5f1f7cac5 100644 --- a/sound/soc/pxa/mmp-sspa.c +++ b/sound/soc/pxa/mmp-sspa.c | |||
@@ -455,8 +455,8 @@ static int asoc_mmp_sspa_probe(struct platform_device *pdev) | |||
455 | priv->dai_fmt = (unsigned int) -1; | 455 | priv->dai_fmt = (unsigned int) -1; |
456 | platform_set_drvdata(pdev, priv); | 456 | platform_set_drvdata(pdev, priv); |
457 | 457 | ||
458 | return snd_soc_register_component(&pdev->dev, &mmp_sspa_component, | 458 | return devm_snd_soc_register_component(&pdev->dev, &mmp_sspa_component, |
459 | &mmp_sspa_dai, 1); | 459 | &mmp_sspa_dai, 1); |
460 | } | 460 | } |
461 | 461 | ||
462 | static int asoc_mmp_sspa_remove(struct platform_device *pdev) | 462 | static int asoc_mmp_sspa_remove(struct platform_device *pdev) |
@@ -466,7 +466,6 @@ static int asoc_mmp_sspa_remove(struct platform_device *pdev) | |||
466 | clk_disable(priv->audio_clk); | 466 | clk_disable(priv->audio_clk); |
467 | clk_put(priv->audio_clk); | 467 | clk_put(priv->audio_clk); |
468 | clk_put(priv->sysclk); | 468 | clk_put(priv->sysclk); |
469 | snd_soc_unregister_component(&pdev->dev); | ||
470 | return 0; | 469 | return 0; |
471 | } | 470 | } |
472 | 471 | ||
diff --git a/sound/soc/pxa/palm27x.c b/sound/soc/pxa/palm27x.c index e1ffcdd9a649..3284c4b901cb 100644 --- a/sound/soc/pxa/palm27x.c +++ b/sound/soc/pxa/palm27x.c | |||
@@ -181,6 +181,7 @@ static struct platform_driver palm27x_wm9712_driver = { | |||
181 | .driver = { | 181 | .driver = { |
182 | .name = "palm27x-asoc", | 182 | .name = "palm27x-asoc", |
183 | .owner = THIS_MODULE, | 183 | .owner = THIS_MODULE, |
184 | .pm = &snd_soc_pm_ops, | ||
184 | }, | 185 | }, |
185 | }; | 186 | }; |
186 | 187 | ||
diff --git a/sound/soc/pxa/poodle.c b/sound/soc/pxa/poodle.c index fafe46355c31..c93e138d8dc3 100644 --- a/sound/soc/pxa/poodle.c +++ b/sound/soc/pxa/poodle.c | |||
@@ -303,6 +303,7 @@ static struct platform_driver poodle_driver = { | |||
303 | .driver = { | 303 | .driver = { |
304 | .name = "poodle-audio", | 304 | .name = "poodle-audio", |
305 | .owner = THIS_MODULE, | 305 | .owner = THIS_MODULE, |
306 | .pm = &snd_soc_pm_ops, | ||
306 | }, | 307 | }, |
307 | .probe = poodle_probe, | 308 | .probe = poodle_probe, |
308 | .remove = poodle_remove, | 309 | .remove = poodle_remove, |
diff --git a/sound/soc/pxa/pxa2xx-ac97.c b/sound/soc/pxa/pxa2xx-ac97.c index f1059d999de6..ae956e3f4b9d 100644 --- a/sound/soc/pxa/pxa2xx-ac97.c +++ b/sound/soc/pxa/pxa2xx-ac97.c | |||
@@ -89,33 +89,6 @@ static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_mic_mono_in = { | |||
89 | .filter_data = &pxa2xx_ac97_pcm_aux_mic_mono_req, | 89 | .filter_data = &pxa2xx_ac97_pcm_aux_mic_mono_req, |
90 | }; | 90 | }; |
91 | 91 | ||
92 | #ifdef CONFIG_PM | ||
93 | static int pxa2xx_ac97_suspend(struct snd_soc_dai *dai) | ||
94 | { | ||
95 | return pxa2xx_ac97_hw_suspend(); | ||
96 | } | ||
97 | |||
98 | static int pxa2xx_ac97_resume(struct snd_soc_dai *dai) | ||
99 | { | ||
100 | return pxa2xx_ac97_hw_resume(); | ||
101 | } | ||
102 | |||
103 | #else | ||
104 | #define pxa2xx_ac97_suspend NULL | ||
105 | #define pxa2xx_ac97_resume NULL | ||
106 | #endif | ||
107 | |||
108 | static int pxa2xx_ac97_probe(struct snd_soc_dai *dai) | ||
109 | { | ||
110 | return pxa2xx_ac97_hw_probe(to_platform_device(dai->dev)); | ||
111 | } | ||
112 | |||
113 | static int pxa2xx_ac97_remove(struct snd_soc_dai *dai) | ||
114 | { | ||
115 | pxa2xx_ac97_hw_remove(to_platform_device(dai->dev)); | ||
116 | return 0; | ||
117 | } | ||
118 | |||
119 | static int pxa2xx_ac97_hw_params(struct snd_pcm_substream *substream, | 92 | static int pxa2xx_ac97_hw_params(struct snd_pcm_substream *substream, |
120 | struct snd_pcm_hw_params *params, | 93 | struct snd_pcm_hw_params *params, |
121 | struct snd_soc_dai *cpu_dai) | 94 | struct snd_soc_dai *cpu_dai) |
@@ -185,10 +158,6 @@ static struct snd_soc_dai_driver pxa_ac97_dai_driver[] = { | |||
185 | { | 158 | { |
186 | .name = "pxa2xx-ac97", | 159 | .name = "pxa2xx-ac97", |
187 | .ac97_control = 1, | 160 | .ac97_control = 1, |
188 | .probe = pxa2xx_ac97_probe, | ||
189 | .remove = pxa2xx_ac97_remove, | ||
190 | .suspend = pxa2xx_ac97_suspend, | ||
191 | .resume = pxa2xx_ac97_resume, | ||
192 | .playback = { | 161 | .playback = { |
193 | .stream_name = "AC97 Playback", | 162 | .stream_name = "AC97 Playback", |
194 | .channels_min = 2, | 163 | .channels_min = 2, |
@@ -246,6 +215,12 @@ static int pxa2xx_ac97_dev_probe(struct platform_device *pdev) | |||
246 | return -ENXIO; | 215 | return -ENXIO; |
247 | } | 216 | } |
248 | 217 | ||
218 | ret = pxa2xx_ac97_hw_probe(pdev); | ||
219 | if (ret) { | ||
220 | dev_err(&pdev->dev, "PXA2xx AC97 hw probe error (%d)\n", ret); | ||
221 | return ret; | ||
222 | } | ||
223 | |||
249 | ret = snd_soc_set_ac97_ops(&pxa2xx_ac97_ops); | 224 | ret = snd_soc_set_ac97_ops(&pxa2xx_ac97_ops); |
250 | if (ret != 0) | 225 | if (ret != 0) |
251 | return ret; | 226 | return ret; |
@@ -262,15 +237,34 @@ static int pxa2xx_ac97_dev_remove(struct platform_device *pdev) | |||
262 | { | 237 | { |
263 | snd_soc_unregister_component(&pdev->dev); | 238 | snd_soc_unregister_component(&pdev->dev); |
264 | snd_soc_set_ac97_ops(NULL); | 239 | snd_soc_set_ac97_ops(NULL); |
240 | pxa2xx_ac97_hw_remove(pdev); | ||
265 | return 0; | 241 | return 0; |
266 | } | 242 | } |
267 | 243 | ||
244 | #ifdef CONFIG_PM_SLEEP | ||
245 | static int pxa2xx_ac97_dev_suspend(struct device *dev) | ||
246 | { | ||
247 | return pxa2xx_ac97_hw_suspend(); | ||
248 | } | ||
249 | |||
250 | static int pxa2xx_ac97_dev_resume(struct device *dev) | ||
251 | { | ||
252 | return pxa2xx_ac97_hw_resume(); | ||
253 | } | ||
254 | |||
255 | static SIMPLE_DEV_PM_OPS(pxa2xx_ac97_pm_ops, | ||
256 | pxa2xx_ac97_dev_suspend, pxa2xx_ac97_dev_resume); | ||
257 | #endif | ||
258 | |||
268 | static struct platform_driver pxa2xx_ac97_driver = { | 259 | static struct platform_driver pxa2xx_ac97_driver = { |
269 | .probe = pxa2xx_ac97_dev_probe, | 260 | .probe = pxa2xx_ac97_dev_probe, |
270 | .remove = pxa2xx_ac97_dev_remove, | 261 | .remove = pxa2xx_ac97_dev_remove, |
271 | .driver = { | 262 | .driver = { |
272 | .name = "pxa2xx-ac97", | 263 | .name = "pxa2xx-ac97", |
273 | .owner = THIS_MODULE, | 264 | .owner = THIS_MODULE, |
265 | #ifdef CONFIG_PM_SLEEP | ||
266 | .pm = &pxa2xx_ac97_pm_ops, | ||
267 | #endif | ||
274 | }, | 268 | }, |
275 | }; | 269 | }; |
276 | 270 | ||
diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c index d5340a088858..c0d648d3339f 100644 --- a/sound/soc/pxa/pxa2xx-i2s.c +++ b/sound/soc/pxa/pxa2xx-i2s.c | |||
@@ -165,7 +165,8 @@ static int pxa2xx_i2s_hw_params(struct snd_pcm_substream *substream, | |||
165 | { | 165 | { |
166 | struct snd_dmaengine_dai_dma_data *dma_data; | 166 | struct snd_dmaengine_dai_dma_data *dma_data; |
167 | 167 | ||
168 | BUG_ON(IS_ERR(clk_i2s)); | 168 | if (WARN_ON(IS_ERR(clk_i2s))) |
169 | return -EINVAL; | ||
169 | clk_prepare_enable(clk_i2s); | 170 | clk_prepare_enable(clk_i2s); |
170 | clk_ena = 1; | 171 | clk_ena = 1; |
171 | pxa_i2s_wait(); | 172 | pxa_i2s_wait(); |
diff --git a/sound/soc/pxa/tosa.c b/sound/soc/pxa/tosa.c index a3fe19123f07..1d9c2ed223bc 100644 --- a/sound/soc/pxa/tosa.c +++ b/sound/soc/pxa/tosa.c | |||
@@ -275,6 +275,7 @@ static struct platform_driver tosa_driver = { | |||
275 | .driver = { | 275 | .driver = { |
276 | .name = "tosa-audio", | 276 | .name = "tosa-audio", |
277 | .owner = THIS_MODULE, | 277 | .owner = THIS_MODULE, |
278 | .pm = &snd_soc_pm_ops, | ||
278 | }, | 279 | }, |
279 | .probe = tosa_probe, | 280 | .probe = tosa_probe, |
280 | .remove = tosa_remove, | 281 | .remove = tosa_remove, |
diff --git a/sound/soc/pxa/ttc-dkb.c b/sound/soc/pxa/ttc-dkb.c index 13c9ee0cb83b..0b535b570622 100644 --- a/sound/soc/pxa/ttc-dkb.c +++ b/sound/soc/pxa/ttc-dkb.c | |||
@@ -160,6 +160,7 @@ static struct platform_driver ttc_dkb_driver = { | |||
160 | .driver = { | 160 | .driver = { |
161 | .name = "ttc-dkb-audio", | 161 | .name = "ttc-dkb-audio", |
162 | .owner = THIS_MODULE, | 162 | .owner = THIS_MODULE, |
163 | .pm = &snd_soc_pm_ops, | ||
163 | }, | 164 | }, |
164 | .probe = ttc_dkb_probe, | 165 | .probe = ttc_dkb_probe, |
165 | .remove = ttc_dkb_remove, | 166 | .remove = ttc_dkb_remove, |