#include <linux/slab.h>
#include <linux/export.h>
#include <linux/nospec.h>
#include <sound/opl3.h>
#include <sound/asound_fm.h>
#include "opl3_voice.h"
#if IS_ENABLED(CONFIG_SND_SEQUENCER)
#define OPL3_SUPPORT_SYNTH
#endif
char snd_opl3_regmap[MAX_OPL2_VOICES][4] = …;
EXPORT_SYMBOL(…);
static int snd_opl3_play_note(struct snd_opl3 * opl3, struct snd_dm_fm_note * note);
static int snd_opl3_set_voice(struct snd_opl3 * opl3, struct snd_dm_fm_voice * voice);
static int snd_opl3_set_params(struct snd_opl3 * opl3, struct snd_dm_fm_params * params);
static int snd_opl3_set_mode(struct snd_opl3 * opl3, int mode);
static int snd_opl3_set_connection(struct snd_opl3 * opl3, int connection);
int snd_opl3_open(struct snd_hwdep * hw, struct file *file)
{ … }
int snd_opl3_ioctl(struct snd_hwdep * hw, struct file *file,
unsigned int cmd, unsigned long arg)
{ … }
int snd_opl3_release(struct snd_hwdep * hw, struct file *file)
{ … }
#ifdef OPL3_SUPPORT_SYNTH
long snd_opl3_write(struct snd_hwdep *hw, const char __user *buf, long count,
loff_t *offset)
{ … }
#define AM_VIB …
#define KSL_LEVEL …
#define ATTACK_DECAY …
#define SUSTAIN_RELEASE …
#define WAVE_SELECT …
#define CONNECTION …
#define OFFSET_4OP …
int snd_opl3_load_patch(struct snd_opl3 *opl3,
int prog, int bank, int type,
const char *name,
const unsigned char *ext,
const unsigned char *data)
{ … }
EXPORT_SYMBOL(…);
struct fm_patch *snd_opl3_find_patch(struct snd_opl3 *opl3, int prog, int bank,
int create_patch)
{ … }
EXPORT_SYMBOL(…);
void snd_opl3_clear_patches(struct snd_opl3 *opl3)
{ … }
#endif
void snd_opl3_reset(struct snd_opl3 * opl3)
{ … }
EXPORT_SYMBOL(…);
static int snd_opl3_play_note(struct snd_opl3 * opl3, struct snd_dm_fm_note * note)
{ … }
static int snd_opl3_set_voice(struct snd_opl3 * opl3, struct snd_dm_fm_voice * voice)
{ … }
static int snd_opl3_set_params(struct snd_opl3 * opl3, struct snd_dm_fm_params * params)
{ … }
static int snd_opl3_set_mode(struct snd_opl3 * opl3, int mode)
{ … }
static int snd_opl3_set_connection(struct snd_opl3 * opl3, int connection)
{ … }