aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/ad1816a
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 11:41:08 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:28:57 -0500
commit00a4e3d9f8df8a90966b75d517154718b4a2242a (patch)
treeaa67a476ecb418679c9e5a5cec89d6a31269dd42 /sound/isa/ad1816a
parent5fe76e4dc60a2c3ff9b1143f5275a953db685e26 (diff)
[ALSA] Merge ad1816a-lib module to ad1816a
Modules: AD1816A driver Merge ad1816a-lib module to ad1816. There is no more reason to split. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa/ad1816a')
-rw-r--r--sound/isa/ad1816a/Makefile5
-rw-r--r--sound/isa/ad1816a/ad1816a_lib.c47
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
6snd-ad1816a-lib-objs := ad1816a_lib.o 6snd-ad1816a-objs := ad1816a.o ad1816a_lib.o
7snd-ad1816a-objs := ad1816a.o
8 7
9# Toplevel Module Dependency 8# Toplevel Module Dependency
10obj-$(CONFIG_SND_AD1816A) += snd-ad1816a.o snd-ad1816a-lib.o 9obj-$(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
33MODULE_AUTHOR("Massimo Piccioni <dafastidio@libero.it>");
34MODULE_DESCRIPTION("lowlevel code for Analog Devices AD1816A chip");
35MODULE_LICENSE("GPL");
36
37static inline int snd_ad1816a_busy_wait(struct snd_ad1816a *chip) 33static 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
499static void snd_ad1816a_init(struct snd_ad1816a *chip) 495static 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
519static int snd_ad1816a_probe(struct snd_ad1816a *chip) 515static 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
566static const char *snd_ad1816a_chip_id(struct snd_ad1816a *chip) 562static 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
579int snd_ad1816a_create(struct snd_card *card, 575int __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
665int snd_ad1816a_pcm(struct snd_ad1816a *chip, int device, struct snd_pcm **rpcm) 661int __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 */
693static void snd_ad1816a_timer_free(struct snd_timer *timer) 689int __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
699int 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
901static struct snd_kcontrol_new snd_ad1816a_controls[] = { 890static struct snd_kcontrol_new snd_ad1816a_controls[] __devinitdata = {
902AD1816A_DOUBLE("Master Playback Switch", AD1816A_MASTER_ATT, 15, 7, 1, 1), 891AD1816A_DOUBLE("Master Playback Switch", AD1816A_MASTER_ATT, 15, 7, 1, 1),
903AD1816A_DOUBLE("Master Playback Volume", AD1816A_MASTER_ATT, 8, 0, 31, 1), 892AD1816A_DOUBLE("Master Playback Volume", AD1816A_MASTER_ATT, 8, 0, 31, 1),
904AD1816A_DOUBLE("PCM Playback Switch", AD1816A_VOICE_ATT, 15, 7, 1, 1), 893AD1816A_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),
933AD1816A_SINGLE("3D Control - Level", AD1816A_3D_PHAT_CTRL, 0, 15, 0), 922AD1816A_SINGLE("3D Control - Level", AD1816A_3D_PHAT_CTRL, 0, 15, 0),
934}; 923};
935 924
936int snd_ad1816a_mixer(struct snd_ad1816a *chip) 925int __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
955EXPORT_SYMBOL(snd_ad1816a_create);
956EXPORT_SYMBOL(snd_ad1816a_pcm);
957EXPORT_SYMBOL(snd_ad1816a_mixer);
958
959static int __init alsa_ad1816a_init(void)
960{
961 return 0;
962}
963
964static void __exit alsa_ad1816a_exit(void)
965{
966}
967
968module_init(alsa_ad1816a_init)
969module_exit(alsa_ad1816a_exit)