#include <linux/delay.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <sound/core.h>
#include <sound/control.h>
#include <sound/info.h>
#include <sound/sb16_csp.h>
#include <sound/initval.h>
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
#ifdef SNDRV_LITTLE_ENDIAN
#define CSP_HDR_VALUE(a,b,c,d) …
#else
#define CSP_HDR_VALUE …
#endif
#define RIFF_HEADER …
#define CSP__HEADER …
#define LIST_HEADER …
#define FUNC_HEADER …
#define CODE_HEADER …
#define INIT_HEADER …
#define MAIN_HEADER …
struct riff_header { … };
struct desc_header { … };
static void snd_sb_csp_free(struct snd_hwdep *hw);
static int snd_sb_csp_open(struct snd_hwdep * hw, struct file *file);
static int snd_sb_csp_ioctl(struct snd_hwdep * hw, struct file *file, unsigned int cmd, unsigned long arg);
static int snd_sb_csp_release(struct snd_hwdep * hw, struct file *file);
static int csp_detect(struct snd_sb *chip, int *version);
static int set_codec_parameter(struct snd_sb *chip, unsigned char par, unsigned char val);
static int set_register(struct snd_sb *chip, unsigned char reg, unsigned char val);
static int read_register(struct snd_sb *chip, unsigned char reg);
static int set_mode_register(struct snd_sb *chip, unsigned char mode);
static int get_version(struct snd_sb *chip);
static int snd_sb_csp_riff_load(struct snd_sb_csp * p,
struct snd_sb_csp_microcode __user * code);
static int snd_sb_csp_unload(struct snd_sb_csp * p);
static int snd_sb_csp_load_user(struct snd_sb_csp * p, const unsigned char __user *buf, int size, int load_flags);
static int snd_sb_csp_autoload(struct snd_sb_csp * p, snd_pcm_format_t pcm_sfmt, int play_rec_mode);
static int snd_sb_csp_check_version(struct snd_sb_csp * p);
static int snd_sb_csp_use(struct snd_sb_csp * p);
static int snd_sb_csp_unuse(struct snd_sb_csp * p);
static int snd_sb_csp_start(struct snd_sb_csp * p, int sample_width, int channels);
static int snd_sb_csp_stop(struct snd_sb_csp * p);
static int snd_sb_csp_pause(struct snd_sb_csp * p);
static int snd_sb_csp_restart(struct snd_sb_csp * p);
static int snd_sb_qsound_build(struct snd_sb_csp * p);
static void snd_sb_qsound_destroy(struct snd_sb_csp * p);
static int snd_sb_csp_qsound_transfer(struct snd_sb_csp * p);
static int init_proc_entry(struct snd_sb_csp * p, int device);
static void info_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer);
int snd_sb_csp_new(struct snd_sb *chip, int device, struct snd_hwdep ** rhwdep)
{ … }
static void snd_sb_csp_free(struct snd_hwdep *hwdep)
{ … }
static int snd_sb_csp_open(struct snd_hwdep * hw, struct file *file)
{ … }
static int snd_sb_csp_ioctl(struct snd_hwdep * hw, struct file *file, unsigned int cmd, unsigned long arg)
{ … }
static int snd_sb_csp_release(struct snd_hwdep * hw, struct file *file)
{ … }
static int snd_sb_csp_use(struct snd_sb_csp * p)
{ … }
static int snd_sb_csp_unuse(struct snd_sb_csp * p)
{ … }
static int snd_sb_csp_riff_load(struct snd_sb_csp * p,
struct snd_sb_csp_microcode __user * mcode)
{ … }
static int snd_sb_csp_unload(struct snd_sb_csp * p)
{ … }
static inline int command_seq(struct snd_sb *chip, const unsigned char *seq, int size)
{ … }
static int set_codec_parameter(struct snd_sb *chip, unsigned char par, unsigned char val)
{ … }
static int set_register(struct snd_sb *chip, unsigned char reg, unsigned char val)
{ … }
static int read_register(struct snd_sb *chip, unsigned char reg)
{ … }
static int set_mode_register(struct snd_sb *chip, unsigned char mode)
{ … }
static int csp_detect(struct snd_sb *chip, int *version)
{ … }
static int get_version(struct snd_sb *chip)
{ … }
static int snd_sb_csp_check_version(struct snd_sb_csp * p)
{ … }
static int snd_sb_csp_load(struct snd_sb_csp * p, const unsigned char *buf, int size, int load_flags)
{ … }
static int snd_sb_csp_load_user(struct snd_sb_csp * p, const unsigned char __user *buf, int size, int load_flags)
{ … }
static int snd_sb_csp_firmware_load(struct snd_sb_csp *p, int index, int flags)
{ … }
static int snd_sb_csp_autoload(struct snd_sb_csp * p, snd_pcm_format_t pcm_sfmt, int play_rec_mode)
{ … }
static int snd_sb_csp_start(struct snd_sb_csp * p, int sample_width, int channels)
{ … }
static int snd_sb_csp_stop(struct snd_sb_csp * p)
{ … }
static int snd_sb_csp_pause(struct snd_sb_csp * p)
{ … }
static int snd_sb_csp_restart(struct snd_sb_csp * p)
{ … }
#define snd_sb_qsound_switch_info …
static int snd_sb_qsound_switch_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_sb_qsound_switch_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_sb_qsound_space_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_sb_qsound_space_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_sb_qsound_space_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static const struct snd_kcontrol_new snd_sb_qsound_switch = …;
static const struct snd_kcontrol_new snd_sb_qsound_space = …;
static int snd_sb_qsound_build(struct snd_sb_csp * p)
{ … }
static void snd_sb_qsound_destroy(struct snd_sb_csp * p)
{ … }
static int snd_sb_csp_qsound_transfer(struct snd_sb_csp * p)
{ … }
static int init_proc_entry(struct snd_sb_csp * p, int device)
{ … }
static void info_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
{ … }
EXPORT_SYMBOL(…);