#include <linux/init.h>
#include <linux/err.h>
#include <linux/isa.h>
#include <linux/interrupt.h>
#include <linux/pm.h>
#include <linux/pnp.h>
#include <linux/module.h>
#include <linux/io.h>
#include <sound/core.h>
#include <sound/wss.h>
#include <sound/mpu401.h>
#include <sound/opl3.h>
#include <sound/initval.h>
#include <sound/tlv.h>
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
static int index[SNDRV_CARDS] = …;
static char *id[SNDRV_CARDS] = …;
static bool enable[SNDRV_CARDS] = …;
#ifdef CONFIG_PNP
static bool isapnp[SNDRV_CARDS] = …;
#endif
static long port[SNDRV_CARDS] = …;
static long sb_port[SNDRV_CARDS] = …;
static long wss_port[SNDRV_CARDS] = …;
static long fm_port[SNDRV_CARDS] = …;
static long midi_port[SNDRV_CARDS] = …;
static int irq[SNDRV_CARDS] = …;
static int dma1[SNDRV_CARDS] = …;
static int dma2[SNDRV_CARDS] = …;
static int opl3sa3_ymode[SNDRV_CARDS];
module_param_array(…);
MODULE_PARM_DESC(…) …;
module_param_array(…);
MODULE_PARM_DESC(…) …;
module_param_array(…);
MODULE_PARM_DESC(…) …;
#ifdef CONFIG_PNP
module_param_array(…);
MODULE_PARM_DESC(…) …;
#endif
module_param_hw_array(port, long, ioport, NULL, 0444);
MODULE_PARM_DESC(…) …;
module_param_hw_array(sb_port, long, ioport, NULL, 0444);
MODULE_PARM_DESC(…) …;
module_param_hw_array(wss_port, long, ioport, NULL, 0444);
MODULE_PARM_DESC(…) …;
module_param_hw_array(fm_port, long, ioport, NULL, 0444);
MODULE_PARM_DESC(…) …;
module_param_hw_array(midi_port, long, ioport, NULL, 0444);
MODULE_PARM_DESC(…) …;
module_param_hw_array(irq, int, irq, NULL, 0444);
MODULE_PARM_DESC(…) …;
module_param_hw_array(dma1, int, dma, NULL, 0444);
MODULE_PARM_DESC(…) …;
module_param_hw_array(dma2, int, dma, NULL, 0444);
MODULE_PARM_DESC(…) …;
module_param_array(…);
MODULE_PARM_DESC(…) …;
#ifdef CONFIG_PNP
static int isa_registered;
static int pnp_registered;
static int pnpc_registered;
#endif
#define OPL3SA2_PM_CTRL …
#define OPL3SA2_SYS_CTRL …
#define OPL3SA2_IRQ_CONFIG …
#define OPL3SA2_IRQ_STATUS …
#define OPL3SA2_DMA_CONFIG …
#define OPL3SA2_MASTER_LEFT …
#define OPL3SA2_MASTER_RIGHT …
#define OPL3SA2_MIC …
#define OPL3SA2_MISC …
#define OPL3SA3_DGTL_DOWN …
#define OPL3SA3_ANLG_DOWN …
#define OPL3SA3_WIDE …
#define OPL3SA3_BASS …
#define OPL3SA3_TREBLE …
#define OPL3SA2_PM_ADOWN …
#define OPL3SA2_PM_PSV …
#define OPL3SA2_PM_PDN …
#define OPL3SA2_PM_PDX …
#define OPL3SA2_PM_D0 …
#define OPL3SA2_PM_D3 …
struct snd_opl3sa2 { … };
#define PFX …
#ifdef CONFIG_PNP
static const struct pnp_device_id snd_opl3sa2_pnpbiosids[] = …;
MODULE_DEVICE_TABLE(pnp, snd_opl3sa2_pnpbiosids);
static const struct pnp_card_device_id snd_opl3sa2_pnpids[] = …;
MODULE_DEVICE_TABLE(pnp_card, snd_opl3sa2_pnpids);
#endif
static unsigned char __snd_opl3sa2_read(struct snd_opl3sa2 *chip, unsigned char reg)
{ … }
static unsigned char snd_opl3sa2_read(struct snd_opl3sa2 *chip, unsigned char reg)
{ … }
static void __snd_opl3sa2_write(struct snd_opl3sa2 *chip, unsigned char reg, unsigned char value)
{ … }
static void snd_opl3sa2_write(struct snd_opl3sa2 *chip, unsigned char reg, unsigned char value)
{ … }
static int snd_opl3sa2_detect(struct snd_card *card)
{ … }
static irqreturn_t snd_opl3sa2_interrupt(int irq, void *dev_id)
{ … }
#define OPL3SA2_SINGLE(xname, xindex, reg, shift, mask, invert) …
#define OPL3SA2_SINGLE_TLV(xname, xindex, reg, shift, mask, invert, xtlv) …
static int snd_opl3sa2_get_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_opl3sa2_put_single(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
#define OPL3SA2_DOUBLE(xname, xindex, left_reg, right_reg, shift_left, shift_right, mask, invert) …
#define OPL3SA2_DOUBLE_TLV(xname, xindex, left_reg, right_reg, shift_left, shift_right, mask, invert, xtlv) …
static int snd_opl3sa2_get_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_opl3sa2_put_double(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static const DECLARE_TLV_DB_SCALE(db_scale_master, -3000, 200, 0);
static const DECLARE_TLV_DB_SCALE(db_scale_5bit_12db_max, -3450, 150, 0);
static const struct snd_kcontrol_new snd_opl3sa2_controls[] = …;
static const struct snd_kcontrol_new snd_opl3sa2_tone_controls[] = …;
static void snd_opl3sa2_master_free(struct snd_kcontrol *kcontrol)
{ … }
static int snd_opl3sa2_mixer(struct snd_card *card)
{ … }
#ifdef CONFIG_PM
static int snd_opl3sa2_suspend(struct snd_card *card, pm_message_t state)
{ … }
static int snd_opl3sa2_resume(struct snd_card *card)
{ … }
#endif
#ifdef CONFIG_PNP
static int snd_opl3sa2_pnp(int dev, struct snd_opl3sa2 *chip,
struct pnp_dev *pdev)
{ … }
#endif
static int snd_opl3sa2_card_new(struct device *pdev, int dev,
struct snd_card **cardp)
{ … }
static int snd_opl3sa2_probe(struct snd_card *card, int dev)
{ … }
#ifdef CONFIG_PNP
static int snd_opl3sa2_pnp_detect(struct pnp_dev *pdev,
const struct pnp_device_id *id)
{ … }
#ifdef CONFIG_PM
static int snd_opl3sa2_pnp_suspend(struct pnp_dev *pdev, pm_message_t state)
{ … }
static int snd_opl3sa2_pnp_resume(struct pnp_dev *pdev)
{ … }
#endif
static struct pnp_driver opl3sa2_pnp_driver = …;
static int snd_opl3sa2_pnp_cdetect(struct pnp_card_link *pcard,
const struct pnp_card_device_id *id)
{ … }
#ifdef CONFIG_PM
static int snd_opl3sa2_pnp_csuspend(struct pnp_card_link *pcard, pm_message_t state)
{ … }
static int snd_opl3sa2_pnp_cresume(struct pnp_card_link *pcard)
{ … }
#endif
static struct pnp_card_driver opl3sa2_pnpc_driver = …;
#endif
static int snd_opl3sa2_isa_match(struct device *pdev,
unsigned int dev)
{ … }
static int snd_opl3sa2_isa_probe(struct device *pdev,
unsigned int dev)
{ … }
#ifdef CONFIG_PM
static int snd_opl3sa2_isa_suspend(struct device *dev, unsigned int n,
pm_message_t state)
{ … }
static int snd_opl3sa2_isa_resume(struct device *dev, unsigned int n)
{ … }
#endif
#define DEV_NAME …
static struct isa_driver snd_opl3sa2_isa_driver = …;
static int __init alsa_card_opl3sa2_init(void)
{ … }
static void __exit alsa_card_opl3sa2_exit(void)
{ … }
module_init(…) …
module_exit(…)