Skip to content

Commit

Permalink
[ALSA] Merge ad1816a-lib module to ad1816a
Browse files Browse the repository at this point in the history
Modules: AD1816A driver

Merge ad1816a-lib module to ad1816.
There is no more reason to split.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed Jan 3, 2006
1 parent 5fe76e4 commit 00a4e3d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 40 deletions.
5 changes: 2 additions & 3 deletions sound/isa/ad1816a/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
# Copyright (c) 2001 by Jaroslav Kysela <perex@suse.cz>
#

snd-ad1816a-lib-objs := ad1816a_lib.o
snd-ad1816a-objs := ad1816a.o
snd-ad1816a-objs := ad1816a.o ad1816a_lib.o

# Toplevel Module Dependency
obj-$(CONFIG_SND_AD1816A) += snd-ad1816a.o snd-ad1816a-lib.o
obj-$(CONFIG_SND_AD1816A) += snd-ad1816a.o
47 changes: 10 additions & 37 deletions sound/isa/ad1816a/ad1816a_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@
#include <asm/io.h>
#include <asm/dma.h>

MODULE_AUTHOR("Massimo Piccioni <dafastidio@libero.it>");
MODULE_DESCRIPTION("lowlevel code for Analog Devices AD1816A chip");
MODULE_LICENSE("GPL");

static inline int snd_ad1816a_busy_wait(struct snd_ad1816a *chip)
{
int timeout;
Expand Down Expand Up @@ -496,7 +492,7 @@ static int snd_ad1816a_capture_close(struct snd_pcm_substream *substream)
}


static void snd_ad1816a_init(struct snd_ad1816a *chip)
static void __devinit snd_ad1816a_init(struct snd_ad1816a *chip)
{
unsigned long flags;

Expand All @@ -516,7 +512,7 @@ static void snd_ad1816a_init(struct snd_ad1816a *chip)
spin_unlock_irqrestore(&chip->lock, flags);
}

static int snd_ad1816a_probe(struct snd_ad1816a *chip)
static int __devinit snd_ad1816a_probe(struct snd_ad1816a *chip)
{
unsigned long flags;

Expand Down Expand Up @@ -563,7 +559,7 @@ static int snd_ad1816a_dev_free(struct snd_device *device)
return snd_ad1816a_free(chip);
}

static const char *snd_ad1816a_chip_id(struct snd_ad1816a *chip)
static const char __devinit *snd_ad1816a_chip_id(struct snd_ad1816a *chip)
{
switch (chip->hardware) {
case AD1816A_HW_AD1816A: return "AD1816A";
Expand All @@ -576,9 +572,9 @@ static const char *snd_ad1816a_chip_id(struct snd_ad1816a *chip)
}
}

int snd_ad1816a_create(struct snd_card *card,
unsigned long port, int irq, int dma1, int dma2,
struct snd_ad1816a **rchip)
int __devinit snd_ad1816a_create(struct snd_card *card,
unsigned long port, int irq, int dma1, int dma2,
struct snd_ad1816a **rchip)
{
static struct snd_device_ops ops = {
.dev_free = snd_ad1816a_dev_free,
Expand Down Expand Up @@ -662,7 +658,7 @@ static struct snd_pcm_ops snd_ad1816a_capture_ops = {
.pointer = snd_ad1816a_capture_pointer,
};

int snd_ad1816a_pcm(struct snd_ad1816a *chip, int device, struct snd_pcm **rpcm)
int __devinit snd_ad1816a_pcm(struct snd_ad1816a *chip, int device, struct snd_pcm **rpcm)
{
int error;
struct snd_pcm *pcm;
Expand Down Expand Up @@ -690,13 +686,7 @@ int snd_ad1816a_pcm(struct snd_ad1816a *chip, int device, struct snd_pcm **rpcm)
}

#if 0 /* not used now */
static void snd_ad1816a_timer_free(struct snd_timer *timer)
{
struct snd_ad1816a *chip = timer->private_data;
chip->timer = NULL;
}

int snd_ad1816a_timer(struct snd_ad1816a *chip, int device, struct snd_timer **rtimer)
int __devinit snd_ad1816a_timer(struct snd_ad1816a *chip, int device, struct snd_timer **rtimer)
{
struct snd_timer *timer;
struct snd_timer_id tid;
Expand All @@ -711,7 +701,6 @@ int snd_ad1816a_timer(struct snd_ad1816a *chip, int device, struct snd_timer **r
return error;
strcpy(timer->name, snd_ad1816a_chip_id(chip));
timer->private_data = chip;
timer->private_free = snd_ad1816a_timer_free;
chip->timer = timer;
timer->hw = snd_ad1816a_timer_table;
if (rtimer)
Expand Down Expand Up @@ -898,7 +887,7 @@ static int snd_ad1816a_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_
return change;
}

static struct snd_kcontrol_new snd_ad1816a_controls[] = {
static struct snd_kcontrol_new snd_ad1816a_controls[] __devinitdata = {
AD1816A_DOUBLE("Master Playback Switch", AD1816A_MASTER_ATT, 15, 7, 1, 1),
AD1816A_DOUBLE("Master Playback Volume", AD1816A_MASTER_ATT, 8, 0, 31, 1),
AD1816A_DOUBLE("PCM Playback Switch", AD1816A_VOICE_ATT, 15, 7, 1, 1),
Expand Down Expand Up @@ -933,7 +922,7 @@ AD1816A_SINGLE("3D Control - Switch", AD1816A_3D_PHAT_CTRL, 15, 1, 1),
AD1816A_SINGLE("3D Control - Level", AD1816A_3D_PHAT_CTRL, 0, 15, 0),
};

int snd_ad1816a_mixer(struct snd_ad1816a *chip)
int __devinit snd_ad1816a_mixer(struct snd_ad1816a *chip)
{
struct snd_card *card;
unsigned int idx;
Expand All @@ -951,19 +940,3 @@ int snd_ad1816a_mixer(struct snd_ad1816a *chip)
}
return 0;
}

EXPORT_SYMBOL(snd_ad1816a_create);
EXPORT_SYMBOL(snd_ad1816a_pcm);
EXPORT_SYMBOL(snd_ad1816a_mixer);

static int __init alsa_ad1816a_init(void)
{
return 0;
}

static void __exit alsa_ad1816a_exit(void)
{
}

module_init(alsa_ad1816a_init)
module_exit(alsa_ad1816a_exit)

0 comments on commit 00a4e3d

Please sign in to comment.