aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--sound/soc/atmel/atmel_ssc_dai.c11
-rw-r--r--sound/soc/au1x/psc-ac97.c3
-rw-r--r--sound/soc/au1x/psc-i2s.c3
-rw-r--r--sound/soc/blackfin/bf5xx-ac97.c12
-rw-r--r--sound/soc/blackfin/bf5xx-i2s.c12
-rw-r--r--sound/soc/davinci/davinci-i2s.c12
-rw-r--r--sound/soc/fsl/fsl_ssi.c10
-rw-r--r--sound/soc/omap/omap-mcbsp.c13
-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
-rw-r--r--sound/soc/s3c24xx/s3c2412-i2s.c13
-rw-r--r--sound/soc/s3c24xx/s3c2443-ac97.c13
-rw-r--r--sound/soc/s3c24xx/s3c24xx-i2s.c12
-rw-r--r--sound/soc/sh/hac.c12
-rw-r--r--sound/soc/sh/ssi.c12
16 files changed, 172 insertions, 3 deletions
diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c
index d9b874c5bf37..c9f02edd7308 100644
--- a/sound/soc/atmel/atmel_ssc_dai.c
+++ b/sound/soc/atmel/atmel_ssc_dai.c
@@ -772,6 +772,17 @@ struct snd_soc_dai atmel_ssc_dai[NUM_SSC_DEVICES] = {
772}; 772};
773EXPORT_SYMBOL_GPL(atmel_ssc_dai); 773EXPORT_SYMBOL_GPL(atmel_ssc_dai);
774 774
775static int __devinit atmel_ssc_modinit(void)
776{
777 return snd_soc_register_dais(atmel_ssc_dai, ARRAY_SIZE(atmel_ssc_dai));
778}
779module_init(snd_soc_init);
780
781static void __exit snd_soc_exit(void)
782{
783 snd_soc_unregister_dais(atmel_ssc_dai, ARRAY_SIZE(atmel_ssc_dai));
784}
785
775/* Module information */ 786/* Module information */
776MODULE_AUTHOR("Sedji Gaouaou, sedji.gaouaou@atmel.com, www.atmel.com"); 787MODULE_AUTHOR("Sedji Gaouaou, sedji.gaouaou@atmel.com, www.atmel.com");
777MODULE_DESCRIPTION("ATMEL SSC ASoC Interface"); 788MODULE_DESCRIPTION("ATMEL SSC ASoC Interface");
diff --git a/sound/soc/au1x/psc-ac97.c b/sound/soc/au1x/psc-ac97.c
index a1e824d29cf9..f0e30aec7f23 100644
--- a/sound/soc/au1x/psc-ac97.c
+++ b/sound/soc/au1x/psc-ac97.c
@@ -371,11 +371,12 @@ EXPORT_SYMBOL_GPL(au1xpsc_ac97_dai);
371static int __init au1xpsc_ac97_init(void) 371static int __init au1xpsc_ac97_init(void)
372{ 372{
373 au1xpsc_ac97_workdata = NULL; 373 au1xpsc_ac97_workdata = NULL;
374 return 0; 374 return snd_soc_register_dai(&au1xpsc_ac97_dai);
375} 375}
376 376
377static void __exit au1xpsc_ac97_exit(void) 377static void __exit au1xpsc_ac97_exit(void)
378{ 378{
379 snd_soc_unregister_dai(&au1xpsc_ac97_dai);
379} 380}
380 381
381module_init(au1xpsc_ac97_init); 382module_init(au1xpsc_ac97_init);
diff --git a/sound/soc/au1x/psc-i2s.c b/sound/soc/au1x/psc-i2s.c
index 16f97462ea15..f916de4400ed 100644
--- a/sound/soc/au1x/psc-i2s.c
+++ b/sound/soc/au1x/psc-i2s.c
@@ -396,11 +396,12 @@ EXPORT_SYMBOL(au1xpsc_i2s_dai);
396static int __init au1xpsc_i2s_init(void) 396static int __init au1xpsc_i2s_init(void)
397{ 397{
398 au1xpsc_i2s_workdata = NULL; 398 au1xpsc_i2s_workdata = NULL;
399 return 0; 399 return snd_soc_register_dai(&au1xpsc_i2s_dai);
400} 400}
401 401
402static void __exit au1xpsc_i2s_exit(void) 402static void __exit au1xpsc_i2s_exit(void)
403{ 403{
404 snd_soc_unregister_dai(&au1xpsc_i2s_dai);
404} 405}
405 406
406module_init(au1xpsc_i2s_init); 407module_init(au1xpsc_i2s_init);
diff --git a/sound/soc/blackfin/bf5xx-ac97.c b/sound/soc/blackfin/bf5xx-ac97.c
index c602ce109d52..ad3efeeb6d44 100644
--- a/sound/soc/blackfin/bf5xx-ac97.c
+++ b/sound/soc/blackfin/bf5xx-ac97.c
@@ -431,6 +431,18 @@ struct snd_soc_dai bfin_ac97_dai = {
431}; 431};
432EXPORT_SYMBOL_GPL(bfin_ac97_dai); 432EXPORT_SYMBOL_GPL(bfin_ac97_dai);
433 433
434static int __devinit bfin_ac97_init(void)
435{
436 return snd_soc_register_dai(&bfin_ac97_dai);
437}
438module_init(bfin_ac97_init);
439
440static void __exit bfin_ac97_exit(void)
441{
442 snd_soc_unregister_dai(&bfin_ac97_dai);
443}
444module_exit(bfin_ac97_exit);
445
434MODULE_AUTHOR("Roy Huang"); 446MODULE_AUTHOR("Roy Huang");
435MODULE_DESCRIPTION("AC97 driver for ADI Blackfin"); 447MODULE_DESCRIPTION("AC97 driver for ADI Blackfin");
436MODULE_LICENSE("GPL"); 448MODULE_LICENSE("GPL");
diff --git a/sound/soc/blackfin/bf5xx-i2s.c b/sound/soc/blackfin/bf5xx-i2s.c
index 9f8ce87cc6c6..0d58d2b6db6a 100644
--- a/sound/soc/blackfin/bf5xx-i2s.c
+++ b/sound/soc/blackfin/bf5xx-i2s.c
@@ -313,6 +313,18 @@ struct snd_soc_dai bf5xx_i2s_dai = {
313}; 313};
314EXPORT_SYMBOL_GPL(bf5xx_i2s_dai); 314EXPORT_SYMBOL_GPL(bf5xx_i2s_dai);
315 315
316static int __devinit bfin_i2s_init(void)
317{
318 return snd_soc_register_dai(&bfin_i2s_dai);
319}
320module_init(bfin_i2s_init);
321
322static void __exit bfin_i2s_exit(void)
323{
324 snd_soc_unregister_dai(&bfin_i2s_dai);
325}
326module_exit(bfin_i2s_exit);
327
316/* Module information */ 328/* Module information */
317MODULE_AUTHOR("Cliff Cai"); 329MODULE_AUTHOR("Cliff Cai");
318MODULE_DESCRIPTION("I2S driver for ADI Blackfin"); 330MODULE_DESCRIPTION("I2S driver for ADI Blackfin");
diff --git a/sound/soc/davinci/davinci-i2s.c b/sound/soc/davinci/davinci-i2s.c
index 8b99efbc64c6..d89fc2f009ab 100644
--- a/sound/soc/davinci/davinci-i2s.c
+++ b/sound/soc/davinci/davinci-i2s.c
@@ -481,6 +481,18 @@ struct snd_soc_dai davinci_i2s_dai = {
481}; 481};
482EXPORT_SYMBOL_GPL(davinci_i2s_dai); 482EXPORT_SYMBOL_GPL(davinci_i2s_dai);
483 483
484static int __devinit davinci_i2s_init(void)
485{
486 return snd_soc_register_dai(&davinci_i2s_dai);
487}
488module_init(davinci_i2s_init);
489
490static void __exit davinci_i2s_exit(void)
491{
492 snd_soc_unregister_dai(&davinci_i2s_dai);
493}
494module_exit(davinci_i2s_exit);
495
484MODULE_AUTHOR("Vladimir Barinov"); 496MODULE_AUTHOR("Vladimir Barinov");
485MODULE_DESCRIPTION("TI DAVINCI I2S (McBSP) SoC Interface"); 497MODULE_DESCRIPTION("TI DAVINCI I2S (McBSP) SoC Interface");
486MODULE_LICENSE("GPL"); 498MODULE_LICENSE("GPL");
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 52c290bb47bf..c6d6eb71dc1d 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -673,6 +673,14 @@ struct snd_soc_dai *fsl_ssi_create_dai(struct fsl_ssi_info *ssi_info)
673 fsl_ssi_dai->private_data = ssi_private; 673 fsl_ssi_dai->private_data = ssi_private;
674 fsl_ssi_dai->name = ssi_private->name; 674 fsl_ssi_dai->name = ssi_private->name;
675 fsl_ssi_dai->id = ssi_info->id; 675 fsl_ssi_dai->id = ssi_info->id;
676 fsl_ssi_dai->dev = ssi_info->dev;
677
678 ret = snd_soc_register_dai(fsl_ssi_dai);
679 if (ret != 0) {
680 dev_err(ssi_info->dev, "failed to register DAI: %d\n", ret);
681 kfree(fsl_ssi_dai);
682 return NULL;
683 }
676 684
677 return fsl_ssi_dai; 685 return fsl_ssi_dai;
678} 686}
@@ -690,6 +698,8 @@ void fsl_ssi_destroy_dai(struct snd_soc_dai *fsl_ssi_dai)
690 698
691 device_remove_file(ssi_private->dev, &ssi_private->dev_attr); 699 device_remove_file(ssi_private->dev, &ssi_private->dev_attr);
692 700
701 snd_soc_unregister_dai(&ssi_private->cpu_dai);
702
693 kfree(ssi_private); 703 kfree(ssi_private);
694} 704}
695EXPORT_SYMBOL_GPL(fsl_ssi_destroy_dai); 705EXPORT_SYMBOL_GPL(fsl_ssi_destroy_dai);
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c
index e8f1314762d7..41cab2034163 100644
--- a/sound/soc/omap/omap-mcbsp.c
+++ b/sound/soc/omap/omap-mcbsp.c
@@ -499,6 +499,19 @@ struct snd_soc_dai omap_mcbsp_dai[] = {
499 499
500EXPORT_SYMBOL_GPL(omap_mcbsp_dai); 500EXPORT_SYMBOL_GPL(omap_mcbsp_dai);
501 501
502static int __devinit omap_mcbsp_init(void)
503{
504 return snd_soc_register_dais(omap_mcbsp_dai,
505 ARRAY_SIZE(omap_mcbsp_dai));
506}
507module_init(omap_mcbsp_init);
508
509static void __exit omap_mcbsp_exit(void)
510{
511 snd_soc_unregister_dais(omap_mcbsp_dai, ARRAY_SIZE(omap_mcbsp_dai));
512}
513module_exit(omap_mcbsp_exit);
514
502MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@nokia.com>"); 515MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@nokia.com>");
503MODULE_DESCRIPTION("OMAP I2S SoC Interface"); 516MODULE_DESCRIPTION("OMAP I2S SoC Interface");
504MODULE_LICENSE("GPL"); 517MODULE_LICENSE("GPL");
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;
diff --git a/sound/soc/s3c24xx/s3c2412-i2s.c b/sound/soc/s3c24xx/s3c2412-i2s.c
index 75f87c3c74d0..2cf050791562 100644
--- a/sound/soc/s3c24xx/s3c2412-i2s.c
+++ b/sound/soc/s3c24xx/s3c2412-i2s.c
@@ -736,6 +736,19 @@ struct snd_soc_dai s3c2412_i2s_dai = {
736}; 736};
737EXPORT_SYMBOL_GPL(s3c2412_i2s_dai); 737EXPORT_SYMBOL_GPL(s3c2412_i2s_dai);
738 738
739static int __devinit s3c2412_i2s_init(void)
740{
741 return snd_soc_register_dai(&s3c2412_i2s_dai);
742}
743module_init(s3c2412_i2s_init);
744
745static void __exit s3c2412_i2s_exit(void)
746{
747 snd_soc_unregister_dai(&s3c2412_i2s_dai);
748}
749module_exit(s3c2412_i2s_exit);
750
751
739/* Module information */ 752/* Module information */
740MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>"); 753MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>");
741MODULE_DESCRIPTION("S3C2412 I2S SoC Interface"); 754MODULE_DESCRIPTION("S3C2412 I2S SoC Interface");
diff --git a/sound/soc/s3c24xx/s3c2443-ac97.c b/sound/soc/s3c24xx/s3c2443-ac97.c
index f0bc9b7e0840..7360c6d913bd 100644
--- a/sound/soc/s3c24xx/s3c2443-ac97.c
+++ b/sound/soc/s3c24xx/s3c2443-ac97.c
@@ -396,6 +396,19 @@ struct snd_soc_dai s3c2443_ac97_dai[] = {
396EXPORT_SYMBOL_GPL(s3c2443_ac97_dai); 396EXPORT_SYMBOL_GPL(s3c2443_ac97_dai);
397EXPORT_SYMBOL_GPL(soc_ac97_ops); 397EXPORT_SYMBOL_GPL(soc_ac97_ops);
398 398
399static int __devinit s3c2443_ac97_init(void)
400{
401 return snd_soc_register_dai(&s3c2443_ac97_dai);
402}
403module_init(s3c2443_ac97_init);
404
405static void __exit s3c2443_ac97_exit(void)
406{
407 snd_soc_unregister_dai(&s3c2443_ac97_dai);
408}
409module_exit(s3c2443_ac97_exit);
410
411
399MODULE_AUTHOR("Graeme Gregory"); 412MODULE_AUTHOR("Graeme Gregory");
400MODULE_DESCRIPTION("AC97 driver for the Samsung s3c2443 chip"); 413MODULE_DESCRIPTION("AC97 driver for the Samsung s3c2443 chip");
401MODULE_LICENSE("GPL"); 414MODULE_LICENSE("GPL");
diff --git a/sound/soc/s3c24xx/s3c24xx-i2s.c b/sound/soc/s3c24xx/s3c24xx-i2s.c
index 45fe8f7c88ab..897b1ac92cef 100644
--- a/sound/soc/s3c24xx/s3c24xx-i2s.c
+++ b/sound/soc/s3c24xx/s3c24xx-i2s.c
@@ -482,6 +482,18 @@ struct snd_soc_dai s3c24xx_i2s_dai = {
482}; 482};
483EXPORT_SYMBOL_GPL(s3c24xx_i2s_dai); 483EXPORT_SYMBOL_GPL(s3c24xx_i2s_dai);
484 484
485static int __devinit s3c24xx_i2s_init(void)
486{
487 return snd_soc_register_dai(&s3c24xx_i2s_dai);
488}
489module_init(s3c24xx_i2s_init);
490
491static void __exit s3c24xx_i2s_exit(void)
492{
493 snd_soc_unregister_dai(&s3c24xx_i2s_dai);
494}
495module_exit(s3c24xx_i2s_exit);
496
485/* Module information */ 497/* Module information */
486MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>"); 498MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>");
487MODULE_DESCRIPTION("s3c24xx I2S SoC Interface"); 499MODULE_DESCRIPTION("s3c24xx I2S SoC Interface");
diff --git a/sound/soc/sh/hac.c b/sound/soc/sh/hac.c
index c435913c60eb..9169bad1acfb 100644
--- a/sound/soc/sh/hac.c
+++ b/sound/soc/sh/hac.c
@@ -314,6 +314,18 @@ struct snd_soc_dai sh4_hac_dai[] = {
314}; 314};
315EXPORT_SYMBOL_GPL(sh4_hac_dai); 315EXPORT_SYMBOL_GPL(sh4_hac_dai);
316 316
317static int __devinit sh4_hac_init(void)
318{
319 return snd_soc_register_dais(sh4_hac_dai, ARRAY_SIZE(sh4_hac_dai));
320}
321module_init(sh4_hac_init);
322
323static void __exit sh4_hac_exit(void)
324{
325 snd_soc_unregister_dais(sh4_hac_dai, ARRAY_SIZE(sh4_hac_dai));
326}
327module_exit(sh4_hac_exit);
328
317MODULE_LICENSE("GPL"); 329MODULE_LICENSE("GPL");
318MODULE_DESCRIPTION("SuperH onchip HAC (AC97) audio driver"); 330MODULE_DESCRIPTION("SuperH onchip HAC (AC97) audio driver");
319MODULE_AUTHOR("Manuel Lauss <mano@roarinelk.homelinux.net>"); 331MODULE_AUTHOR("Manuel Lauss <mano@roarinelk.homelinux.net>");
diff --git a/sound/soc/sh/ssi.c b/sound/soc/sh/ssi.c
index fed544a3deff..9093588d4d07 100644
--- a/sound/soc/sh/ssi.c
+++ b/sound/soc/sh/ssi.c
@@ -392,6 +392,18 @@ struct snd_soc_dai sh4_ssi_dai[] = {
392}; 392};
393EXPORT_SYMBOL_GPL(sh4_ssi_dai); 393EXPORT_SYMBOL_GPL(sh4_ssi_dai);
394 394
395static int __devinit sh4_ssi_init(void)
396{
397 return snd_soc_register_dais(sh4_ssi_dai, ARRAY_SIZE(sh4_ssi_dai));
398}
399module_init(sh4_ssi_init);
400
401static void __exit sh4_ssi_exit(void)
402{
403 snd_soc_unregister_dais(sh4_ssi_dai, ARRAY_SIZE(sh4_ssi_dai));
404}
405module_exit(sh4_ssi_exit);
406
395MODULE_LICENSE("GPL"); 407MODULE_LICENSE("GPL");
396MODULE_DESCRIPTION("SuperH onchip SSI (I2S) audio driver"); 408MODULE_DESCRIPTION("SuperH onchip SSI (I2S) audio driver");
397MODULE_AUTHOR("Manuel Lauss <mano@roarinelk.homelinux.net>"); 409MODULE_AUTHOR("Manuel Lauss <mano@roarinelk.homelinux.net>");