linux/sound/isa/sb/emu8000.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *  Copyright (c) by Jaroslav Kysela <[email protected]>
 *     and (c) 1999 Steve Ratcliffe <[email protected]>
 *  Copyright (C) 1999-2000 Takashi Iwai <[email protected]>
 *
 *  Routines for control of EMU8000 chip
 */

#include <linux/wait.h>
#include <linux/sched/signal.h>
#include <linux/slab.h>
#include <linux/ioport.h>
#include <linux/export.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <sound/core.h>
#include <sound/emu8000.h>
#include <sound/emu8000_reg.h>
#include <linux/uaccess.h>
#include <linux/init.h>
#include <sound/control.h>
#include <sound/initval.h>

/*
 * emu8000 register controls
 */

/*
 * The following routines read and write registers on the emu8000.  They
 * should always be called via the EMU8000*READ/WRITE macros and never
 * directly.  The macros handle the port number and command word.
 */
/* Write a word */
void snd_emu8000_poke(struct snd_emu8000 *emu, unsigned int port, unsigned int reg, unsigned int val)
{}

/* Read a word */
unsigned short snd_emu8000_peek(struct snd_emu8000 *emu, unsigned int port, unsigned int reg)
{}

/* Write a double word */
void snd_emu8000_poke_dw(struct snd_emu8000 *emu, unsigned int port, unsigned int reg, unsigned int val)
{}

/* Read a double word */
unsigned int snd_emu8000_peek_dw(struct snd_emu8000 *emu, unsigned int port, unsigned int reg)
{}

/*
 * Set up / close a channel to be used for DMA.
 */
/*exported*/ void
snd_emu8000_dma_chan(struct snd_emu8000 *emu, int ch, int mode)
{}

/*
 */
static void
snd_emu8000_read_wait(struct snd_emu8000 *emu)
{}

/*
 */
static void
snd_emu8000_write_wait(struct snd_emu8000 *emu)
{}

/*
 * detect a card at the given port
 */
static int
snd_emu8000_detect(struct snd_emu8000 *emu)
{}


/*
 * intiailize audio channels
 */
static void
init_audio(struct snd_emu8000 *emu)
{}


/*
 * initialize DMA address
 */
static void
init_dma(struct snd_emu8000 *emu)
{}

/*
 * initialization arrays; from ADIP
 */
static const unsigned short init1[128] =;

static const unsigned short init2[128] =;

static const unsigned short init3[128] =;

static const unsigned short init4[128] =;

/* send an initialization array
 * Taken from the oss driver, not obvious from the doc how this
 * is meant to work
 */
static void
send_array(struct snd_emu8000 *emu, const unsigned short *data, int size)
{}


/*
 * Send initialization arrays to start up, this just follows the
 * initialisation sequence in the adip.
 */
static void
init_arrays(struct snd_emu8000 *emu)
{}


#define UNIQUE_ID1
#define UNIQUE_ID2

/*
 * Size the onboard memory.
 * This is written so as not to need arbitrary delays after the write. It
 * seems that the only way to do this is to use the one channel and keep
 * reallocating between read and write.
 */
static void
size_dram(struct snd_emu8000 *emu)
{}


/*
 * Initiailise the FM section.  You have to do this to use sample RAM
 * and therefore lose 2 voices.
 */
/*exported*/ void
snd_emu8000_init_fm(struct snd_emu8000 *emu)
{}


/*
 * The main initialization routine.
 */
static void
snd_emu8000_init_hw(struct snd_emu8000 *emu)
{}


/*----------------------------------------------------------------
 * Bass/Treble Equalizer
 *----------------------------------------------------------------*/

static const unsigned short bass_parm[12][3] =;

static const unsigned short treble_parm[12][9] =;


/*
 * set Emu8000 digital equalizer; from 0 to 11 [-12dB - 12dB]
 */
/*exported*/ void
snd_emu8000_update_equalizer(struct snd_emu8000 *emu)
{}


/*----------------------------------------------------------------
 * Chorus mode control
 *----------------------------------------------------------------*/

/*
 * chorus mode parameters
 */
#define SNDRV_EMU8000_CHORUS_1
#define SNDRV_EMU8000_CHORUS_2
#define SNDRV_EMU8000_CHORUS_3
#define SNDRV_EMU8000_CHORUS_4
#define SNDRV_EMU8000_CHORUS_FEEDBACK
#define SNDRV_EMU8000_CHORUS_FLANGER
#define SNDRV_EMU8000_CHORUS_SHORTDELAY
#define SNDRV_EMU8000_CHORUS_SHORTDELAY2
#define SNDRV_EMU8000_CHORUS_PREDEFINED
/* user can define chorus modes up to 32 */
#define SNDRV_EMU8000_CHORUS_NUMBERS

struct soundfont_chorus_fx {};

/* 5 parameters for each chorus mode; 3 x 16bit, 2 x 32bit */
static char chorus_defined[SNDRV_EMU8000_CHORUS_NUMBERS];
static struct soundfont_chorus_fx chorus_parm[SNDRV_EMU8000_CHORUS_NUMBERS] =;

/*exported*/ int
snd_emu8000_load_chorus_fx(struct snd_emu8000 *emu, int mode, const void __user *buf, long len)
{}

/*exported*/ void
snd_emu8000_update_chorus_mode(struct snd_emu8000 *emu)
{}

/*----------------------------------------------------------------
 * Reverb mode control
 *----------------------------------------------------------------*/

/*
 * reverb mode parameters
 */
#define SNDRV_EMU8000_REVERB_ROOM1
#define SNDRV_EMU8000_REVERB_ROOM2
#define SNDRV_EMU8000_REVERB_ROOM3
#define SNDRV_EMU8000_REVERB_HALL1
#define SNDRV_EMU8000_REVERB_HALL2
#define SNDRV_EMU8000_REVERB_PLATE
#define SNDRV_EMU8000_REVERB_DELAY
#define SNDRV_EMU8000_REVERB_PANNINGDELAY
#define SNDRV_EMU8000_REVERB_PREDEFINED
/* user can define reverb modes up to 32 */
#define SNDRV_EMU8000_REVERB_NUMBERS

struct soundfont_reverb_fx {};

/* reverb mode settings; write the following 28 data of 16 bit length
 *   on the corresponding ports in the reverb_cmds array
 */
static char reverb_defined[SNDRV_EMU8000_CHORUS_NUMBERS];
static struct soundfont_reverb_fx reverb_parm[SNDRV_EMU8000_REVERB_NUMBERS] =;

enum {};
#define AWE_INIT1(c)
#define AWE_INIT2(c)
#define AWE_INIT3(c)
#define AWE_INIT4(c)

static struct reverb_cmd_pair {} reverb_cmds[28] =;

/*exported*/ int
snd_emu8000_load_reverb_fx(struct snd_emu8000 *emu, int mode, const void __user *buf, long len)
{}

/*exported*/ void
snd_emu8000_update_reverb_mode(struct snd_emu8000 *emu)
{}


/*----------------------------------------------------------------
 * mixer interface
 *----------------------------------------------------------------*/

/*
 * bass/treble
 */
static int mixer_bass_treble_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{}

static int mixer_bass_treble_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{}

static int mixer_bass_treble_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{}

static const struct snd_kcontrol_new mixer_bass_control =;

static const struct snd_kcontrol_new mixer_treble_control =;

/*
 * chorus/reverb mode
 */
static int mixer_chorus_reverb_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{}

static int mixer_chorus_reverb_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{}

static int mixer_chorus_reverb_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{}

static const struct snd_kcontrol_new mixer_chorus_mode_control =;

static const struct snd_kcontrol_new mixer_reverb_mode_control =;

/*
 * FM OPL3 chorus/reverb depth
 */
static int mixer_fm_depth_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{}

static int mixer_fm_depth_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{}

static int mixer_fm_depth_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{}

static const struct snd_kcontrol_new mixer_fm_chorus_depth_control =;

static const struct snd_kcontrol_new mixer_fm_reverb_depth_control =;


static const struct snd_kcontrol_new *mixer_defs[EMU8000_NUM_CONTROLS] =;

/*
 * create and attach mixer elements for WaveTable treble/bass controls
 */
static int
snd_emu8000_create_mixer(struct snd_card *card, struct snd_emu8000 *emu)
{}

/*
 * initialize and register emu8000 synth device.
 */
int
snd_emu8000_new(struct snd_card *card, int index, long port, int seq_ports,
		struct snd_seq_device **awe_ret)
{}


/*
 * exported stuff
 */

EXPORT_SYMBOL();
EXPORT_SYMBOL();
EXPORT_SYMBOL();
EXPORT_SYMBOL();
EXPORT_SYMBOL();
EXPORT_SYMBOL();
EXPORT_SYMBOL();
EXPORT_SYMBOL();
EXPORT_SYMBOL();
EXPORT_SYMBOL();
EXPORT_SYMBOL();