162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
262306a36Sopenharmony_ci#ifndef __OPL3_VOICE_H
362306a36Sopenharmony_ci#define __OPL3_VOICE_H
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci/*
662306a36Sopenharmony_ci *  Copyright (c) 2000 Uros Bizjak <uros@kss-loka.si>
762306a36Sopenharmony_ci */
862306a36Sopenharmony_ci
962306a36Sopenharmony_ci#include <sound/opl3.h>
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ci/* Prototypes for opl3_seq.c */
1262306a36Sopenharmony_ciint snd_opl3_synth_use_inc(struct snd_opl3 * opl3);
1362306a36Sopenharmony_civoid snd_opl3_synth_use_dec(struct snd_opl3 * opl3);
1462306a36Sopenharmony_ciint snd_opl3_synth_setup(struct snd_opl3 * opl3);
1562306a36Sopenharmony_civoid snd_opl3_synth_cleanup(struct snd_opl3 * opl3);
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ci/* Prototypes for opl3_midi.c */
1862306a36Sopenharmony_civoid snd_opl3_note_on(void *p, int note, int vel, struct snd_midi_channel *chan);
1962306a36Sopenharmony_civoid snd_opl3_note_off(void *p, int note, int vel, struct snd_midi_channel *chan);
2062306a36Sopenharmony_civoid snd_opl3_key_press(void *p, int note, int vel, struct snd_midi_channel *chan);
2162306a36Sopenharmony_civoid snd_opl3_terminate_note(void *p, int note, struct snd_midi_channel *chan);
2262306a36Sopenharmony_civoid snd_opl3_control(void *p, int type, struct snd_midi_channel *chan);
2362306a36Sopenharmony_civoid snd_opl3_nrpn(void *p, struct snd_midi_channel *chan, struct snd_midi_channel_set *chset);
2462306a36Sopenharmony_civoid snd_opl3_sysex(void *p, unsigned char *buf, int len, int parsed, struct snd_midi_channel_set *chset);
2562306a36Sopenharmony_ci
2662306a36Sopenharmony_civoid snd_opl3_calc_volume(unsigned char *reg, int vel, struct snd_midi_channel *chan);
2762306a36Sopenharmony_civoid snd_opl3_timer_func(struct timer_list *t);
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_ci/* Prototypes for opl3_drums.c */
3062306a36Sopenharmony_civoid snd_opl3_load_drums(struct snd_opl3 *opl3);
3162306a36Sopenharmony_civoid snd_opl3_drum_switch(struct snd_opl3 *opl3, int note, int vel, int on_off, struct snd_midi_channel *chan);
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_ci/* Prototypes for opl3_oss.c */
3462306a36Sopenharmony_ci#if IS_ENABLED(CONFIG_SND_SEQUENCER_OSS)
3562306a36Sopenharmony_civoid snd_opl3_init_seq_oss(struct snd_opl3 *opl3, char *name);
3662306a36Sopenharmony_civoid snd_opl3_free_seq_oss(struct snd_opl3 *opl3);
3762306a36Sopenharmony_ci#else
3862306a36Sopenharmony_ci#define snd_opl3_init_seq_oss(opl3, name) /* NOP */
3962306a36Sopenharmony_ci#define snd_opl3_free_seq_oss(opl3) /* NOP */
4062306a36Sopenharmony_ci#endif
4162306a36Sopenharmony_ci
4262306a36Sopenharmony_ciextern char snd_opl3_regmap[MAX_OPL2_VOICES][4];
4362306a36Sopenharmony_ciextern bool use_internal_drums;
4462306a36Sopenharmony_ciextern const struct snd_midi_op opl3_ops;
4562306a36Sopenharmony_ci
4662306a36Sopenharmony_ci#endif
47