#include <linux/init.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/isa.h>
#include <linux/delay.h>
#include <linux/firmware.h>
#include <linux/pnp.h>
#include <linux/spinlock.h>
#include <linux/module.h>
#include <asm/dma.h>
#include <sound/core.h>
#include <sound/wss.h>
#include <sound/mpu401.h>
#include <sound/initval.h>
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
static int index[SNDRV_CARDS] = …;
static char* id[SNDRV_CARDS] = …;
static long port[SNDRV_CARDS] = …;
static long wss_port[SNDRV_CARDS] = …;
static int irq[SNDRV_CARDS] = …;
static int mpu_irq[SNDRV_CARDS] = …;
static int dma[SNDRV_CARDS] = …;
static int dma2[SNDRV_CARDS] = …;
static bool joystick[SNDRV_CARDS];
module_param_array(…);
MODULE_PARM_DESC(…) …;
module_param_array(…);
MODULE_PARM_DESC(…) …;
module_param_hw_array(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(irq, int, irq, NULL, 0444);
MODULE_PARM_DESC(…) …;
module_param_hw_array(mpu_irq, int, irq, NULL, 0444);
MODULE_PARM_DESC(…) …;
module_param_hw_array(dma, 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 const struct pnp_card_device_id sscape_pnpids[] = …;
MODULE_DEVICE_TABLE(pnp_card, sscape_pnpids);
#endif
#define HOST_CTRL_IO(i) …
#define HOST_DATA_IO(i) …
#define ODIE_ADDR_IO(i) …
#define ODIE_DATA_IO(i) …
#define CODEC_IO(i) …
#define IC_ODIE …
#define IC_OPUS …
#define RX_READY …
#define TX_READY …
#define CMD_ACK …
#define CMD_SET_MIDI_VOL …
#define CMD_GET_MIDI_VOL …
#define CMD_XXX_MIDI_VOL …
#define CMD_SET_EXTMIDI …
#define CMD_GET_EXTMIDI …
#define CMD_SET_MT32 …
#define CMD_GET_MT32 …
enum GA_REG { … };
#define DMA_8BIT …
enum card_type { … };
struct soundscape { … };
#define INVALID_IRQ …
static inline struct soundscape *get_card_soundscape(struct snd_card *c)
{ … }
static struct snd_dma_buffer *get_dmabuf(struct soundscape *s,
struct snd_dma_buffer *buf,
unsigned long size)
{ … }
static void free_dmabuf(struct snd_dma_buffer *buf)
{ … }
static inline void sscape_write_unsafe(unsigned io_base, enum GA_REG reg,
unsigned char val)
{ … }
static void sscape_write(struct soundscape *s, enum GA_REG reg,
unsigned char val)
{ … }
static inline unsigned char sscape_read_unsafe(unsigned io_base,
enum GA_REG reg)
{ … }
static inline void set_host_mode_unsafe(unsigned io_base)
{ … }
static inline void set_midi_mode_unsafe(unsigned io_base)
{ … }
static inline int host_read_unsafe(unsigned io_base)
{ … }
static int host_read_ctrl_unsafe(unsigned io_base, unsigned timeout)
{ … }
static inline int host_write_unsafe(unsigned io_base, unsigned char data)
{ … }
static int host_write_ctrl_unsafe(unsigned io_base, unsigned char data,
unsigned timeout)
{ … }
static inline int verify_mpu401(const struct snd_mpu401 *mpu)
{ … }
static inline void initialise_mpu401(const struct snd_mpu401 *mpu)
{ … }
static void activate_ad1845_unsafe(unsigned io_base)
{ … }
static void sscape_start_dma_unsafe(unsigned io_base, enum GA_REG reg)
{ … }
static int sscape_wait_dma_unsafe(unsigned io_base, enum GA_REG reg,
unsigned timeout)
{ … }
static int obp_startup_ack(struct soundscape *s, unsigned timeout)
{ … }
static int host_startup_ack(struct soundscape *s, unsigned timeout)
{ … }
static int upload_dma_data(struct soundscape *s, const unsigned char *data,
size_t size)
{ … }
static int sscape_upload_bootblock(struct snd_card *card)
{ … }
static int sscape_upload_microcode(struct snd_card *card, int version)
{ … }
static int sscape_midi_info(struct snd_kcontrol *ctl,
struct snd_ctl_elem_info *uinfo)
{ … }
static int sscape_midi_get(struct snd_kcontrol *kctl,
struct snd_ctl_elem_value *uctl)
{ … }
static int sscape_midi_put(struct snd_kcontrol *kctl,
struct snd_ctl_elem_value *uctl)
{ … }
static const struct snd_kcontrol_new midi_mixer_ctl = …;
static unsigned get_irq_config(int sscape_type, int irq)
{ … }
static int detect_sscape(struct soundscape *s, long wss_io)
{ … }
static int mpu401_open(struct snd_mpu401 *mpu)
{ … }
static int create_mpu401(struct snd_card *card, int devnum,
unsigned long port, int irq)
{ … }
static int create_ad1845(struct snd_card *card, unsigned port,
int irq, int dma1, int dma2)
{ … }
static int create_sscape(int dev, struct snd_card *card)
{ … }
static int snd_sscape_match(struct device *pdev, unsigned int i)
{ … }
static int snd_sscape_probe(struct device *pdev, unsigned int dev)
{ … }
#define DEV_NAME …
static struct isa_driver snd_sscape_driver = …;
#ifdef CONFIG_PNP
static inline int get_next_autoindex(int i)
{ … }
static int sscape_pnp_detect(struct pnp_card_link *pcard,
const struct pnp_card_device_id *pid)
{ … }
static struct pnp_card_driver sscape_pnpc_driver = …;
#endif
static int __init sscape_init(void)
{ … }
static void __exit sscape_exit(void)
{ … }
module_init(…) …;
module_exit(sscape_exit);