aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/pxa
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2008-12-03 14:26:35 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2008-12-09 05:49:27 -0500
commit3f4b783cfdebb559814690572041a17bc9744cf3 (patch)
treeb390f3ad74fe3f9d9e2144fc1f0f120af0705412 /sound/soc/pxa
parent9115171a6b79b6b4d5c6697f123556b6efc37f1f (diff)
ASoC: Register platform DAIs
Register all platform DAIs with the core. In line with current behaviour this is done at module probe time rather than when the devices are probed (since currently that only happens as the entire ASoC card is registered except for those drivers that currently implement some kind of hotplug). Since the core currently ignores DAI registration this has no practical effect. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/pxa')
-rw-r--r--sound/soc/pxa/pxa-ssp.c12
-rw-r--r--sound/soc/pxa/pxa2xx-ac97.c12
-rw-r--r--sound/soc/pxa/pxa2xx-i2s.c13
3 files changed, 36 insertions, 1 deletions
diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c
index 73fa10defcca..3587f2fae5f1 100644
--- a/sound/soc/pxa/pxa-ssp.c
+++ b/sound/soc/pxa/pxa-ssp.c
@@ -913,6 +913,18 @@ struct snd_soc_dai pxa_ssp_dai[] = {
913}; 913};
914EXPORT_SYMBOL_GPL(pxa_ssp_dai); 914EXPORT_SYMBOL_GPL(pxa_ssp_dai);
915 915
916static int __devinit pxa_ssp_init(void)
917{
918 return snd_soc_register_dais(pxa_ssp_dai, ARRAY_SIZE(pxa_ssp_dai));
919}
920module_init(pxa_ssp_init);
921
922static void __exit pxa_ssp_exit(void)
923{
924 snd_soc_unregister_dais(pxa_ssp_dai, ARRAY_SIZE(pxa_ssp_dai));
925}
926module_exit(pxa_ssp_exit);
927
916/* Module information */ 928/* Module information */
917MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); 929MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");
918MODULE_DESCRIPTION("PXA SSP/PCM SoC Interface"); 930MODULE_DESCRIPTION("PXA SSP/PCM SoC Interface");
diff --git a/sound/soc/pxa/pxa2xx-ac97.c b/sound/soc/pxa/pxa2xx-ac97.c
index 8eed80d5675d..f6249d5b492e 100644
--- a/sound/soc/pxa/pxa2xx-ac97.c
+++ b/sound/soc/pxa/pxa2xx-ac97.c
@@ -228,6 +228,18 @@ struct snd_soc_dai pxa_ac97_dai[] = {
228EXPORT_SYMBOL_GPL(pxa_ac97_dai); 228EXPORT_SYMBOL_GPL(pxa_ac97_dai);
229EXPORT_SYMBOL_GPL(soc_ac97_ops); 229EXPORT_SYMBOL_GPL(soc_ac97_ops);
230 230
231static int __devinit pxa_ac97_init(void)
232{
233 return snd_soc_register_dais(pxa_ac97_dai, ARRAY_SIZE(pxa_ac97_dai));
234}
235module_init(pxa_ac97_init);
236
237static void __exit pxa_ac97_exit(void)
238{
239 snd_soc_unregister_dais(pxa_ac97_dai, ARRAY_SIZE(pxa_ac97_dai));
240}
241module_exit(pxa_ac97_exit);
242
231MODULE_AUTHOR("Nicolas Pitre"); 243MODULE_AUTHOR("Nicolas Pitre");
232MODULE_DESCRIPTION("AC97 driver for the Intel PXA2xx chip"); 244MODULE_DESCRIPTION("AC97 driver for the Intel PXA2xx chip");
233MODULE_LICENSE("GPL"); 245MODULE_LICENSE("GPL");
diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c
index 314973ace6dc..517991fb1099 100644
--- a/sound/soc/pxa/pxa2xx-i2s.c
+++ b/sound/soc/pxa/pxa2xx-i2s.c
@@ -364,12 +364,23 @@ EXPORT_SYMBOL_GPL(pxa_i2s_dai);
364 364
365static int pxa2xx_i2s_probe(struct platform_device *dev) 365static int pxa2xx_i2s_probe(struct platform_device *dev)
366{ 366{
367 int ret;
368
367 clk_i2s = clk_get(&dev->dev, "I2SCLK"); 369 clk_i2s = clk_get(&dev->dev, "I2SCLK");
368 return IS_ERR(clk_i2s) ? PTR_ERR(clk_i2s) : 0; 370 if (IS_ERR(clk_i2s))
371 return PTR_ERR(clk_i2s);
372
373 pxa_i2s_dai.dev = &dev->dev;
374 ret = snd_soc_register_dai(&pxa_i2s_dai);
375 if (ret != 0)
376 clk_put(clk_i2s);
377
378 return ret;
369} 379}
370 380
371static int __devexit pxa2xx_i2s_remove(struct platform_device *dev) 381static int __devexit pxa2xx_i2s_remove(struct platform_device *dev)
372{ 382{
383 snd_soc_unregister_dai(&pxa_i2s_dai);
373 clk_put(clk_i2s); 384 clk_put(clk_i2s);
374 clk_i2s = ERR_PTR(-ENOENT); 385 clk_i2s = ERR_PTR(-ENOENT);
375 return 0; 386 return 0;