#include <linux/init.h>
#include <linux/err.h>
#include <linux/isa.h>
#include <linux/pnp.h>
#include <linux/delay.h>
#include <linux/ioport.h>
#include <linux/module.h>
#include <linux/io.h>
#include <asm/dma.h>
#include <sound/core.h>
#include <sound/wss.h>
#include <sound/mpu401.h>
#include <sound/opl4.h>
#include <sound/control.h>
#include <sound/info.h>
#define SNDRV_LEGACY_FIND_FREE_IOPORT
#define SNDRV_LEGACY_FIND_FREE_IRQ
#define SNDRV_LEGACY_FIND_FREE_DMA
#include <sound/initval.h>
#include <sound/aci.h>
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;
static int index = …;
static char *id = …;
static long port = …;
static long mpu_port = …;
static long fm_port = …;
static int irq = …;
static int mpu_irq = …;
static int dma1 = …;
static int dma2 = …;
static int wss;
static int ide;
#ifdef CONFIG_PNP
static bool isapnp = …;
#endif
module_param(index, int, 0444);
MODULE_PARM_DESC(…) …;
module_param(id, charp, 0444);
MODULE_PARM_DESC(…) …;
module_param_hw(port, long, ioport, 0444);
MODULE_PARM_DESC(…) …;
module_param_hw(mpu_port, long, ioport, 0444);
MODULE_PARM_DESC(…) …;
module_param_hw(fm_port, long, ioport, 0444);
MODULE_PARM_DESC(…) …;
module_param_hw(irq, int, irq, 0444);
MODULE_PARM_DESC(…) …;
module_param_hw(mpu_irq, int, irq, 0444);
MODULE_PARM_DESC(…) …;
module_param_hw(dma1, int, dma, 0444);
MODULE_PARM_DESC(…) …;
module_param_hw(dma2, int, dma, 0444);
MODULE_PARM_DESC(…) …;
module_param(wss, int, 0444);
MODULE_PARM_DESC(…) …;
module_param(ide, int, 0444);
MODULE_PARM_DESC(…) …;
#ifdef CONFIG_PNP
module_param(isapnp, bool, 0444);
MODULE_PARM_DESC(…) …;
#endif
#define OPTi9XX_HW_DETECT …
#define OPTi9XX_HW_82C928 …
#define OPTi9XX_HW_82C929 …
#define OPTi9XX_HW_82C924 …
#define OPTi9XX_HW_82C925 …
#define OPTi9XX_HW_82C930 …
#define OPTi9XX_HW_82C931 …
#define OPTi9XX_HW_82C933 …
#define OPTi9XX_HW_LAST …
#define OPTi9XX_MC_REG(n) …
struct snd_miro { … };
static struct snd_miro_aci aci_device;
static const char * const snd_opti9xx_names[] = …;
static int snd_miro_pnp_is_probed;
#ifdef CONFIG_PNP
static const struct pnp_card_device_id snd_miro_pnpids[] = …;
MODULE_DEVICE_TABLE(pnp_card, snd_miro_pnpids);
#endif
static int aci_busy_wait(struct snd_miro_aci *aci)
{ … }
static inline int aci_write(struct snd_miro_aci *aci, unsigned char byte)
{ … }
static inline int aci_read(struct snd_miro_aci *aci)
{ … }
int snd_aci_cmd(struct snd_miro_aci *aci, int write1, int write2, int write3)
{ … }
EXPORT_SYMBOL(…);
static int aci_getvalue(struct snd_miro_aci *aci, unsigned char index)
{ … }
static int aci_setvalue(struct snd_miro_aci *aci, unsigned char index,
int value)
{ … }
struct snd_miro_aci *snd_aci_get_aci(void)
{ … }
EXPORT_SYMBOL(…);
#define snd_miro_info_capture …
static int snd_miro_get_capture(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_miro_put_capture(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_miro_info_preamp(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_miro_get_preamp(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_miro_put_preamp(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
#define snd_miro_info_amp …
static int snd_miro_get_amp(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_miro_put_amp(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
#define MIRO_DOUBLE(ctl_name, ctl_index, get_right_reg, set_right_reg) …
static int snd_miro_info_double(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_miro_get_double(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *uinfo)
{ … }
static int snd_miro_put_double(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const struct snd_kcontrol_new snd_miro_controls[] = …;
static const struct snd_kcontrol_new snd_miro_eq_controls[] = …;
static const struct snd_kcontrol_new snd_miro_radio_control[] = …;
static const struct snd_kcontrol_new snd_miro_line_control[] = …;
static const struct snd_kcontrol_new snd_miro_preamp_control[] = …;
static const struct snd_kcontrol_new snd_miro_amp_control[] = …;
static const struct snd_kcontrol_new snd_miro_capture_control[] = …;
static const unsigned char aci_init_values[][2] = …;
static int snd_set_aci_init_values(struct snd_miro *miro)
{ … }
static int snd_miro_mixer(struct snd_card *card,
struct snd_miro *miro)
{ … }
static int snd_miro_init(struct snd_miro *chip,
unsigned short hardware)
{ … }
static unsigned char snd_miro_read(struct snd_miro *chip,
unsigned char reg)
{ … }
static void snd_miro_write(struct snd_miro *chip, unsigned char reg,
unsigned char value)
{ … }
static inline void snd_miro_write_mask(struct snd_miro *chip,
unsigned char reg, unsigned char value, unsigned char mask)
{ … }
static void snd_miro_proc_read(struct snd_info_entry * entry,
struct snd_info_buffer *buffer)
{ … }
static void snd_miro_proc_init(struct snd_card *card,
struct snd_miro *miro)
{ … }
static int snd_miro_configure(struct snd_miro *chip)
{ … }
static int snd_miro_opti_check(struct snd_card *card, struct snd_miro *chip)
{ … }
static int snd_card_miro_detect(struct snd_card *card,
struct snd_miro *chip)
{ … }
static int snd_card_miro_aci_detect(struct snd_card *card,
struct snd_miro *miro)
{ … }
static int snd_miro_probe(struct snd_card *card)
{ … }
static int snd_miro_isa_match(struct device *devptr, unsigned int n)
{ … }
static int snd_miro_isa_probe(struct device *devptr, unsigned int n)
{ … }
#define DEV_NAME …
static struct isa_driver snd_miro_driver = …;
#ifdef CONFIG_PNP
static int snd_card_miro_pnp(struct snd_miro *chip,
struct pnp_card_link *card,
const struct pnp_card_device_id *pid)
{ … }
static int snd_miro_pnp_probe(struct pnp_card_link *pcard,
const struct pnp_card_device_id *pid)
{ … }
static void snd_miro_pnp_remove(struct pnp_card_link *pcard)
{ … }
static struct pnp_card_driver miro_pnpc_driver = …;
#endif
static int __init alsa_card_miro_init(void)
{ … }
static void __exit alsa_card_miro_exit(void)
{ … }
module_init(…) …
module_exit(…)