linux/sound/drivers/opl4/opl4_synth.c

/*
 * OPL4 MIDI synthesizer functions
 *
 * Copyright (c) 2003 by Clemens Ladisch <[email protected]>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions, and the following disclaimer,
 *    without modification.
 * 2. The name of the author may not be used to endorse or promote products
 *    derived from this software without specific prior written permission.
 *
 * Alternatively, this software may be distributed and/or modified under the
 * terms of the GNU General Public License as published by the Free Software
 * Foundation; either version 2 of the License, or (at your option) any later
 * version.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#include "opl4_local.h"
#include <linux/delay.h>
#include <linux/io.h>
#include <sound/asoundef.h>

/* GM2 controllers */
#ifndef MIDI_CTL_RELEASE_TIME
#define MIDI_CTL_RELEASE_TIME
#define MIDI_CTL_ATTACK_TIME
#define MIDI_CTL_DECAY_TIME
#define MIDI_CTL_VIBRATO_RATE
#define MIDI_CTL_VIBRATO_DEPTH
#define MIDI_CTL_VIBRATO_DELAY
#endif

/*
 * This table maps 100/128 cents to F_NUMBER.
 */
static const s16 snd_opl4_pitch_map[0x600] =;

/*
 * Attenuation according to GM recommendations, in -0.375 dB units.
 * table[v] = 40 * log(v / 127) / -0.375
 */
static const unsigned char snd_opl4_volume_table[128] =;

/*
 * Initializes all voices.
 */
void snd_opl4_synth_reset(struct snd_opl4 *opl4)
{}

/*
 * Shuts down all voices.
 */
void snd_opl4_synth_shutdown(struct snd_opl4 *opl4)
{}

/*
 * Executes the callback for all voices playing the specified note.
 */
static void snd_opl4_do_for_note(struct snd_opl4 *opl4, int note, struct snd_midi_channel *chan,
				 void (*func)(struct snd_opl4 *opl4, struct opl4_voice *voice))
{}

/*
 * Executes the callback for all voices of to the specified channel.
 */
static void snd_opl4_do_for_channel(struct snd_opl4 *opl4,
				    struct snd_midi_channel *chan,
				    void (*func)(struct snd_opl4 *opl4, struct opl4_voice *voice))
{}

/*
 * Executes the callback for all active voices.
 */
static void snd_opl4_do_for_all(struct snd_opl4 *opl4,
				void (*func)(struct snd_opl4 *opl4, struct opl4_voice *voice))
{}

static void snd_opl4_update_volume(struct snd_opl4 *opl4, struct opl4_voice *voice)
{}

static void snd_opl4_update_pan(struct snd_opl4 *opl4, struct opl4_voice *voice)
{}

static void snd_opl4_update_vibrato_depth(struct snd_opl4 *opl4,
					  struct opl4_voice *voice)
{}

static void snd_opl4_update_pitch(struct snd_opl4 *opl4,
				  struct opl4_voice *voice)
{}

static void snd_opl4_update_tone_parameters(struct snd_opl4 *opl4,
					    struct opl4_voice *voice)
{}

/* allocate one voice */
static struct opl4_voice *snd_opl4_get_voice(struct snd_opl4 *opl4)
{}

static void snd_opl4_wait_for_wave_headers(struct snd_opl4 *opl4)
{}

void snd_opl4_note_on(void *private_data, int note, int vel, struct snd_midi_channel *chan)
{}

static void snd_opl4_voice_off(struct snd_opl4 *opl4, struct opl4_voice *voice)
{}

void snd_opl4_note_off(void *private_data, int note, int vel, struct snd_midi_channel *chan)
{}

static void snd_opl4_terminate_voice(struct snd_opl4 *opl4, struct opl4_voice *voice)
{}

void snd_opl4_terminate_note(void *private_data, int note, struct snd_midi_channel *chan)
{}

void snd_opl4_control(void *private_data, int type, struct snd_midi_channel *chan)
{}

void snd_opl4_sysex(void *private_data, unsigned char *buf, int len,
		    int parsed, struct snd_midi_channel_set *chset)
{}