diff options
-rw-r--r-- | sound/isa/ad1816a/Makefile | 5 | ||||
-rw-r--r-- | sound/isa/ad1816a/ad1816a_lib.c | 47 |
2 files changed, 12 insertions, 40 deletions
diff --git a/sound/isa/ad1816a/Makefile b/sound/isa/ad1816a/Makefile index a42b29cf8549..90e00e842e49 100644 --- a/sound/isa/ad1816a/Makefile +++ b/sound/isa/ad1816a/Makefile | |||
@@ -3,8 +3,7 @@ | |||
3 | # Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz> | 3 | # Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz> |
4 | # | 4 | # |
5 | 5 | ||
6 | snd-ad1816a-lib-objs := ad1816a_lib.o | 6 | snd-ad1816a-objs := ad1816a.o ad1816a_lib.o |
7 | snd-ad1816a-objs := ad1816a.o | ||
8 | 7 | ||
9 | # Toplevel Module Dependency | 8 | # Toplevel Module Dependency |
10 | obj-$(CONFIG_SND_AD1816A) += snd-ad1816a.o snd-ad1816a-lib.o | 9 | obj-$(CONFIG_SND_AD1816A) += snd-ad1816a.o |
diff --git a/sound/isa/ad1816a/ad1816a_lib.c b/sound/isa/ad1816a/ad1816a_lib.c index 89d11af33340..ac0d808fff57 100644 --- a/sound/isa/ad1816a/ad1816a_lib.c +++ b/sound/isa/ad1816a/ad1816a_lib.c | |||
@@ -30,10 +30,6 @@ | |||
30 | #include <asm/io.h> | 30 | #include <asm/io.h> |
31 | #include <asm/dma.h> | 31 | #include <asm/dma.h> |
32 | 32 | ||
33 | MODULE_AUTHOR("Massimo Piccioni <dafastidio@libero.it>"); | ||
34 | MODULE_DESCRIPTION("lowlevel code for Analog Devices AD1816A chip"); | ||
35 | MODULE_LICENSE("GPL"); | ||
36 | |||
37 | static inline int snd_ad1816a_busy_wait(struct snd_ad1816a *chip) | 33 | static inline int snd_ad1816a_busy_wait(struct snd_ad1816a *chip) |
38 | { | 34 | { |
39 | int timeout; | 35 | int timeout; |
@@ -496,7 +492,7 @@ static int snd_ad1816a_capture_close(struct snd_pcm_substream *substream) | |||
496 | } | 492 | } |
497 | 493 | ||
498 | 494 | ||
499 | static void snd_ad1816a_init(struct snd_ad1816a *chip) | 495 | static void __devinit snd_ad1816a_init(struct snd_ad1816a *chip) |
500 | { | 496 | { |
501 | unsigned long flags; | 497 | unsigned long flags; |
502 | 498 | ||
@@ -516,7 +512,7 @@ static void snd_ad1816a_init(struct snd_ad1816a *chip) | |||
516 | spin_unlock_irqrestore(&chip->lock, flags); | 512 | spin_unlock_irqrestore(&chip->lock, flags); |
517 | } | 513 | } |
518 | 514 | ||
519 | static int snd_ad1816a_probe(struct snd_ad1816a *chip) | 515 | static int __devinit snd_ad1816a_probe(struct snd_ad1816a *chip) |
520 | { | 516 | { |
521 | unsigned long flags; | 517 | unsigned long flags; |
522 | 518 | ||
@@ -563,7 +559,7 @@ static int snd_ad1816a_dev_free(struct snd_device *device) | |||
563 | return snd_ad1816a_free(chip); | 559 | return snd_ad1816a_free(chip); |
564 | } | 560 | } |
565 | 561 | ||
566 | static const char *snd_ad1816a_chip_id(struct snd_ad1816a *chip) | 562 | static const char __devinit *snd_ad1816a_chip_id(struct snd_ad1816a *chip) |
567 | { | 563 | { |
568 | switch (chip->hardware) { | 564 | switch (chip->hardware) { |
569 | case AD1816A_HW_AD1816A: return "AD1816A"; | 565 | case AD1816A_HW_AD1816A: return "AD1816A"; |
@@ -576,9 +572,9 @@ static const char *snd_ad1816a_chip_id(struct snd_ad1816a *chip) | |||
576 | } | 572 | } |
577 | } | 573 | } |
578 | 574 | ||
579 | int snd_ad1816a_create(struct snd_card *card, | 575 | int __devinit snd_ad1816a_create(struct snd_card *card, |
580 | unsigned long port, int irq, int dma1, int dma2, | 576 | unsigned long port, int irq, int dma1, int dma2, |
581 | struct snd_ad1816a **rchip) | 577 | struct snd_ad1816a **rchip) |
582 | { | 578 | { |
583 | static struct snd_device_ops ops = { | 579 | static struct snd_device_ops ops = { |
584 | .dev_free = snd_ad1816a_dev_free, | 580 | .dev_free = snd_ad1816a_dev_free, |
@@ -662,7 +658,7 @@ static struct snd_pcm_ops snd_ad1816a_capture_ops = { | |||
662 | .pointer = snd_ad1816a_capture_pointer, | 658 | .pointer = snd_ad1816a_capture_pointer, |
663 | }; | 659 | }; |
664 | 660 | ||
665 | int snd_ad1816a_pcm(struct snd_ad1816a *chip, int device, struct snd_pcm **rpcm) | 661 | int __devinit snd_ad1816a_pcm(struct snd_ad1816a *chip, int device, struct snd_pcm **rpcm) |
666 | { | 662 | { |
667 | int error; | 663 | int error; |
668 | struct snd_pcm *pcm; | 664 | struct snd_pcm *pcm; |
@@ -690,13 +686,7 @@ int snd_ad1816a_pcm(struct snd_ad1816a *chip, int device, struct snd_pcm **rpcm) | |||
690 | } | 686 | } |
691 | 687 | ||
692 | #if 0 /* not used now */ | 688 | #if 0 /* not used now */ |
693 | static void snd_ad1816a_timer_free(struct snd_timer *timer) | 689 | int __devinit snd_ad1816a_timer(struct snd_ad1816a *chip, int device, struct snd_timer **rtimer) |
694 | { | ||
695 | struct snd_ad1816a *chip = timer->private_data; | ||
696 | chip->timer = NULL; | ||
697 | } | ||
698 | |||
699 | int snd_ad1816a_timer(struct snd_ad1816a *chip, int device, struct snd_timer **rtimer) | ||
700 | { | 690 | { |
701 | struct snd_timer *timer; | 691 | struct snd_timer *timer; |
702 | struct snd_timer_id tid; | 692 | struct snd_timer_id tid; |
@@ -711,7 +701,6 @@ int snd_ad1816a_timer(struct snd_ad1816a *chip, int device, struct snd_timer **r | |||
711 | return error; | 701 | return error; |
712 | strcpy(timer->name, snd_ad1816a_chip_id(chip)); | 702 | strcpy(timer->name, snd_ad1816a_chip_id(chip)); |
713 | timer->private_data = chip; | 703 | timer->private_data = chip; |
714 | timer->private_free = snd_ad1816a_timer_free; | ||
715 | chip->timer = timer; | 704 | chip->timer = timer; |
716 | timer->hw = snd_ad1816a_timer_table; | 705 | timer->hw = snd_ad1816a_timer_table; |
717 | if (rtimer) | 706 | if (rtimer) |
@@ -898,7 +887,7 @@ static int snd_ad1816a_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_ | |||
898 | return change; | 887 | return change; |
899 | } | 888 | } |
900 | 889 | ||
901 | static struct snd_kcontrol_new snd_ad1816a_controls[] = { | 890 | static struct snd_kcontrol_new snd_ad1816a_controls[] __devinitdata = { |
902 | AD1816A_DOUBLE("Master Playback Switch", AD1816A_MASTER_ATT, 15, 7, 1, 1), | 891 | AD1816A_DOUBLE("Master Playback Switch", AD1816A_MASTER_ATT, 15, 7, 1, 1), |
903 | AD1816A_DOUBLE("Master Playback Volume", AD1816A_MASTER_ATT, 8, 0, 31, 1), | 892 | AD1816A_DOUBLE("Master Playback Volume", AD1816A_MASTER_ATT, 8, 0, 31, 1), |
904 | AD1816A_DOUBLE("PCM Playback Switch", AD1816A_VOICE_ATT, 15, 7, 1, 1), | 893 | AD1816A_DOUBLE("PCM Playback Switch", AD1816A_VOICE_ATT, 15, 7, 1, 1), |
@@ -933,7 +922,7 @@ AD1816A_SINGLE("3D Control - Switch", AD1816A_3D_PHAT_CTRL, 15, 1, 1), | |||
933 | AD1816A_SINGLE("3D Control - Level", AD1816A_3D_PHAT_CTRL, 0, 15, 0), | 922 | AD1816A_SINGLE("3D Control - Level", AD1816A_3D_PHAT_CTRL, 0, 15, 0), |
934 | }; | 923 | }; |
935 | 924 | ||
936 | int snd_ad1816a_mixer(struct snd_ad1816a *chip) | 925 | int __devinit snd_ad1816a_mixer(struct snd_ad1816a *chip) |
937 | { | 926 | { |
938 | struct snd_card *card; | 927 | struct snd_card *card; |
939 | unsigned int idx; | 928 | unsigned int idx; |
@@ -951,19 +940,3 @@ int snd_ad1816a_mixer(struct snd_ad1816a *chip) | |||
951 | } | 940 | } |
952 | return 0; | 941 | return 0; |
953 | } | 942 | } |
954 | |||
955 | EXPORT_SYMBOL(snd_ad1816a_create); | ||
956 | EXPORT_SYMBOL(snd_ad1816a_pcm); | ||
957 | EXPORT_SYMBOL(snd_ad1816a_mixer); | ||
958 | |||
959 | static int __init alsa_ad1816a_init(void) | ||
960 | { | ||
961 | return 0; | ||
962 | } | ||
963 | |||
964 | static void __exit alsa_ad1816a_exit(void) | ||
965 | { | ||
966 | } | ||
967 | |||
968 | module_init(alsa_ad1816a_init) | ||
969 | module_exit(alsa_ad1816a_exit) | ||