diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /sound/sh | |
parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) |
Patched in Tegra support.
Diffstat (limited to 'sound/sh')
-rw-r--r-- | sound/sh/aica.c | 21 | ||||
-rw-r--r-- | sound/sh/sh_dac_audio.c | 27 |
2 files changed, 28 insertions, 20 deletions
diff --git a/sound/sh/aica.c b/sound/sh/aica.c index e59a73a9bc4..94c6ea7fa7c 100644 --- a/sound/sh/aica.c +++ b/sound/sh/aica.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include <linux/slab.h> | 29 | #include <linux/slab.h> |
30 | #include <linux/time.h> | 30 | #include <linux/time.h> |
31 | #include <linux/wait.h> | 31 | #include <linux/wait.h> |
32 | #include <linux/module.h> | 32 | #include <linux/moduleparam.h> |
33 | #include <linux/platform_device.h> | 33 | #include <linux/platform_device.h> |
34 | #include <linux/firmware.h> | 34 | #include <linux/firmware.h> |
35 | #include <linux/timer.h> | 35 | #include <linux/timer.h> |
@@ -55,7 +55,7 @@ MODULE_FIRMWARE("aica_firmware.bin"); | |||
55 | #define CARD_NAME "AICA" | 55 | #define CARD_NAME "AICA" |
56 | static int index = -1; | 56 | static int index = -1; |
57 | static char *id; | 57 | static char *id; |
58 | static bool enable = 1; | 58 | static int enable = 1; |
59 | module_param(index, int, 0444); | 59 | module_param(index, int, 0444); |
60 | MODULE_PARM_DESC(index, "Index value for " CARD_NAME " soundcard."); | 60 | MODULE_PARM_DESC(index, "Index value for " CARD_NAME " soundcard."); |
61 | module_param(id, charp, 0444); | 61 | module_param(id, charp, 0444); |
@@ -540,7 +540,7 @@ static int aica_pcmvolume_put(struct snd_kcontrol *kcontrol, | |||
540 | return 1; | 540 | return 1; |
541 | } | 541 | } |
542 | 542 | ||
543 | static struct snd_kcontrol_new snd_aica_pcmswitch_control = { | 543 | static struct snd_kcontrol_new snd_aica_pcmswitch_control __devinitdata = { |
544 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 544 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
545 | .name = "PCM Playback Switch", | 545 | .name = "PCM Playback Switch", |
546 | .index = 0, | 546 | .index = 0, |
@@ -549,7 +549,7 @@ static struct snd_kcontrol_new snd_aica_pcmswitch_control = { | |||
549 | .put = aica_pcmswitch_put | 549 | .put = aica_pcmswitch_put |
550 | }; | 550 | }; |
551 | 551 | ||
552 | static struct snd_kcontrol_new snd_aica_pcmvolume_control = { | 552 | static struct snd_kcontrol_new snd_aica_pcmvolume_control __devinitdata = { |
553 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | 553 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, |
554 | .name = "PCM Playback Volume", | 554 | .name = "PCM Playback Volume", |
555 | .index = 0, | 555 | .index = 0, |
@@ -574,7 +574,8 @@ static int load_aica_firmware(void) | |||
574 | return err; | 574 | return err; |
575 | } | 575 | } |
576 | 576 | ||
577 | static int add_aicamixer_controls(struct snd_card_aica *dreamcastcard) | 577 | static int __devinit add_aicamixer_controls(struct snd_card_aica |
578 | *dreamcastcard) | ||
578 | { | 579 | { |
579 | int err; | 580 | int err; |
580 | err = snd_ctl_add | 581 | err = snd_ctl_add |
@@ -590,7 +591,7 @@ static int add_aicamixer_controls(struct snd_card_aica *dreamcastcard) | |||
590 | return 0; | 591 | return 0; |
591 | } | 592 | } |
592 | 593 | ||
593 | static int snd_aica_remove(struct platform_device *devptr) | 594 | static int __devexit snd_aica_remove(struct platform_device *devptr) |
594 | { | 595 | { |
595 | struct snd_card_aica *dreamcastcard; | 596 | struct snd_card_aica *dreamcastcard; |
596 | dreamcastcard = platform_get_drvdata(devptr); | 597 | dreamcastcard = platform_get_drvdata(devptr); |
@@ -602,7 +603,7 @@ static int snd_aica_remove(struct platform_device *devptr) | |||
602 | return 0; | 603 | return 0; |
603 | } | 604 | } |
604 | 605 | ||
605 | static int snd_aica_probe(struct platform_device *devptr) | 606 | static int __devinit snd_aica_probe(struct platform_device *devptr) |
606 | { | 607 | { |
607 | int err; | 608 | int err; |
608 | struct snd_card_aica *dreamcastcard; | 609 | struct snd_card_aica *dreamcastcard; |
@@ -651,11 +652,9 @@ static int snd_aica_probe(struct platform_device *devptr) | |||
651 | 652 | ||
652 | static struct platform_driver snd_aica_driver = { | 653 | static struct platform_driver snd_aica_driver = { |
653 | .probe = snd_aica_probe, | 654 | .probe = snd_aica_probe, |
654 | .remove = snd_aica_remove, | 655 | .remove = __devexit_p(snd_aica_remove), |
655 | .driver = { | 656 | .driver = { |
656 | .name = SND_AICA_DRIVER, | 657 | .name = SND_AICA_DRIVER}, |
657 | .owner = THIS_MODULE, | ||
658 | }, | ||
659 | }; | 658 | }; |
660 | 659 | ||
661 | static int __init aica_init(void) | 660 | static int __init aica_init(void) |
diff --git a/sound/sh/sh_dac_audio.c b/sound/sh/sh_dac_audio.c index e68c4fc91a0..68e0dee4ff0 100644 --- a/sound/sh/sh_dac_audio.c +++ b/sound/sh/sh_dac_audio.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/io.h> | 27 | #include <linux/io.h> |
28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
29 | #include <linux/slab.h> | 29 | #include <linux/slab.h> |
30 | #include <linux/module.h> | ||
31 | #include <sound/core.h> | 30 | #include <sound/core.h> |
32 | #include <sound/initval.h> | 31 | #include <sound/initval.h> |
33 | #include <sound/pcm.h> | 32 | #include <sound/pcm.h> |
@@ -261,7 +260,7 @@ static struct snd_pcm_ops snd_sh_dac_pcm_ops = { | |||
261 | .mmap = snd_pcm_lib_mmap_iomem, | 260 | .mmap = snd_pcm_lib_mmap_iomem, |
262 | }; | 261 | }; |
263 | 262 | ||
264 | static int snd_sh_dac_pcm(struct snd_sh_dac *chip, int device) | 263 | static int __devinit snd_sh_dac_pcm(struct snd_sh_dac *chip, int device) |
265 | { | 264 | { |
266 | int err; | 265 | int err; |
267 | struct snd_pcm *pcm; | 266 | struct snd_pcm *pcm; |
@@ -346,9 +345,9 @@ static enum hrtimer_restart sh_dac_audio_timer(struct hrtimer *handle) | |||
346 | } | 345 | } |
347 | 346 | ||
348 | /* create -- chip-specific constructor for the cards components */ | 347 | /* create -- chip-specific constructor for the cards components */ |
349 | static int snd_sh_dac_create(struct snd_card *card, | 348 | static int __devinit snd_sh_dac_create(struct snd_card *card, |
350 | struct platform_device *devptr, | 349 | struct platform_device *devptr, |
351 | struct snd_sh_dac **rchip) | 350 | struct snd_sh_dac **rchip) |
352 | { | 351 | { |
353 | struct snd_sh_dac *chip; | 352 | struct snd_sh_dac *chip; |
354 | int err; | 353 | int err; |
@@ -392,7 +391,7 @@ static int snd_sh_dac_create(struct snd_card *card, | |||
392 | } | 391 | } |
393 | 392 | ||
394 | /* driver .probe -- constructor */ | 393 | /* driver .probe -- constructor */ |
395 | static int snd_sh_dac_probe(struct platform_device *devptr) | 394 | static int __devinit snd_sh_dac_probe(struct platform_device *devptr) |
396 | { | 395 | { |
397 | struct snd_sh_dac *chip; | 396 | struct snd_sh_dac *chip; |
398 | struct snd_card *card; | 397 | struct snd_card *card; |
@@ -433,13 +432,23 @@ probe_error: | |||
433 | /* | 432 | /* |
434 | * "driver" definition | 433 | * "driver" definition |
435 | */ | 434 | */ |
436 | static struct platform_driver sh_dac_driver = { | 435 | static struct platform_driver driver = { |
437 | .probe = snd_sh_dac_probe, | 436 | .probe = snd_sh_dac_probe, |
438 | .remove = snd_sh_dac_remove, | 437 | .remove = snd_sh_dac_remove, |
439 | .driver = { | 438 | .driver = { |
440 | .name = "dac_audio", | 439 | .name = "dac_audio", |
441 | .owner = THIS_MODULE, | ||
442 | }, | 440 | }, |
443 | }; | 441 | }; |
444 | 442 | ||
445 | module_platform_driver(sh_dac_driver); | 443 | static int __init sh_dac_init(void) |
444 | { | ||
445 | return platform_driver_register(&driver); | ||
446 | } | ||
447 | |||
448 | static void __exit sh_dac_exit(void) | ||
449 | { | ||
450 | platform_driver_unregister(&driver); | ||
451 | } | ||
452 | |||
453 | module_init(sh_dac_init); | ||
454 | module_exit(sh_dac_exit); | ||