/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ULTRASOUND_H_ #define _ULTRASOUND_H_ /* * ultrasound.h - Macros for programming the Gravis Ultrasound * These macros are extremely device dependent * and not portable. */ /* * Copyright (C) by Hannu Savolainen 1993-1997 * * OSS/Free for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL) * Version 2 (June 1991). See the "COPYING" file distributed with this software * for more info. */ /* * Private events for Gravis Ultrasound (GUS) * * Format: * byte 0 - SEQ_PRIVATE (0xfe) * byte 1 - Synthesizer device number (0-N) * byte 2 - Command (see below) * byte 3 - Voice number (0-31) * bytes 4 and 5 - parameter P1 (unsigned short) * bytes 6 and 7 - parameter P2 (unsigned short) * * Commands: * Each command affects one voice defined in byte 3. * Unused parameters (P1 and/or P2 *MUST* be initialized to zero). * _GUS_NUMVOICES - Sets max. number of concurrent voices (P1=14-31, default 16) * _GUS_VOICESAMPLE- ************ OBSOLETE ************* * _GUS_VOICEON - Starts voice (P1=voice mode) * _GUS_VOICEOFF - Stops voice (no parameters) * _GUS_VOICEFADE - Stops the voice smoothly. * _GUS_VOICEMODE - Alters the voice mode, don't start or stop voice (P1=voice mode) * _GUS_VOICEBALA - Sets voice balance (P1, 0=left, 7=middle and 15=right, default 7) * _GUS_VOICEFREQ - Sets voice (sample) playback frequency (P1=Hz) * _GUS_VOICEVOL - Sets voice volume (P1=volume, 0xfff=max, 0xeff=half, 0x000=off) * _GUS_VOICEVOL2 - Sets voice volume (P1=volume, 0xfff=max, 0xeff=half, 0x000=off) * (Like GUS_VOICEVOL but doesn't change the hw * volume. It just updates volume in the voice table). * * _GUS_RAMPRANGE - Sets limits for volume ramping (P1=low volume, P2=high volume) * _GUS_RAMPRATE - Sets the speed for volume ramping (P1=scale, P2=rate) * _GUS_RAMPMODE - Sets the volume ramping mode (P1=ramping mode) * _GUS_RAMPON - Starts volume ramping (no parameters) * _GUS_RAMPOFF - Stops volume ramping (no parameters) * _GUS_VOLUME_SCALE - Changes the volume calculation constants * for all voices. */ #define _GUS_NUMVOICES … #define _GUS_VOICESAMPLE … #define _GUS_VOICEON … #define _GUS_VOICEOFF … #define _GUS_VOICEMODE … #define _GUS_VOICEBALA … #define _GUS_VOICEFREQ … #define _GUS_VOICEVOL … #define _GUS_RAMPRANGE … #define _GUS_RAMPRATE … #define _GUS_RAMPMODE … #define _GUS_RAMPON … #define _GUS_RAMPOFF … #define _GUS_VOICEFADE … #define _GUS_VOLUME_SCALE … #define _GUS_VOICEVOL2 … #define _GUS_VOICE_POS … /* * GUS API macros */ #define _GUS_CMD(chn, voice, cmd, p1, p2) … #define GUS_NUMVOICES(chn, p1) … #define GUS_VOICESAMPLE(chn, voice, p1) … #define GUS_VOICEON(chn, voice, p1) … #define GUS_VOICEOFF(chn, voice) … #define GUS_VOICEFADE(chn, voice) … #define GUS_VOICEMODE(chn, voice, p1) … #define GUS_VOICEBALA(chn, voice, p1) … #define GUS_VOICEFREQ(chn, voice, p) … #define GUS_VOICEVOL(chn, voice, p1) … #define GUS_VOICEVOL2(chn, voice, p1) … #define GUS_RAMPRANGE(chn, voice, low, high) … #define GUS_RAMPRATE(chn, voice, p1, p2) … #define GUS_RAMPMODE(chn, voice, p1) … #define GUS_RAMPON(chn, voice, p1) … #define GUS_RAMPOFF(chn, voice) … #define GUS_VOLUME_SCALE(chn, voice, p1, p2) … #define GUS_VOICE_POS(chn, voice, p) … #endif