Logo Search packages:      
Sourcecode: alsa-lib version File versions  Download package

asoundef.h

Go to the documentation of this file.
/**
 * \file include/asoundef.h
 * \brief Application interface library for the ALSA driver
 * \author Jaroslav Kysela <perex@suse.cz>
 * \author Abramo Bagnara <abramo@alsa-project.org>
 * \author Takashi Iwai <tiwai@suse.de>
 * \date 1998-2001
 *
 * Definitions of constants for the ALSA driver
 */
/*
 *   This library is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU Lesser General Public License as
 *   published by the Free Software Foundation; either version 2.1 of
 *   the License, or (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU Lesser General Public License for more details.
 *
 *   You should have received a copy of the GNU Lesser General Public
 *   License along with this library; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 *
 */

#ifndef __ALSA_ASOUNDEF_H
#define __ALSA_ASOUNDEF_H

#ifdef __cplusplus
extern "C" {
#endif

/**
 * \defgroup Digital_Audio_Interface Constants for Digital Audio Interfaces
 * AES/IEC958 channel status bits.
 * \{
 */

00041 #define IEC958_AES0_PROFESSIONAL    (1<<0)      /**< 0 = consumer, 1 = professional */
00042 #define IEC958_AES0_NONAUDIO        (1<<1)      /**< 0 = audio, 1 = non-audio */
00043 #define IEC958_AES0_PRO_EMPHASIS    (7<<2)      /**< mask - emphasis */
00044 #define IEC958_AES0_PRO_EMPHASIS_NOTID    (0<<2)      /**< emphasis not indicated */
00045 #define IEC958_AES0_PRO_EMPHASIS_NONE     (1<<2)      /**< no emphasis */
00046 #define IEC958_AES0_PRO_EMPHASIS_5015     (3<<2)      /**< 50/15us emphasis */
00047 #define IEC958_AES0_PRO_EMPHASIS_CCITT    (7<<2)      /**< CCITT J.17 emphasis */
00048 #define IEC958_AES0_PRO_FREQ_UNLOCKED     (1<<5)      /**< source sample frequency: 0 = locked, 1 = unlocked */
00049 #define IEC958_AES0_PRO_FS          (3<<6)      /**< mask - sample frequency */
00050 #define IEC958_AES0_PRO_FS_NOTID    (0<<6)      /**< fs not indicated */
00051 #define IEC958_AES0_PRO_FS_44100    (1<<6)      /**< 44.1kHz */
00052 #define IEC958_AES0_PRO_FS_48000    (2<<6)      /**< 48kHz */
00053 #define IEC958_AES0_PRO_FS_32000    (3<<6)      /**< 32kHz */
00054 #define IEC958_AES0_CON_NOT_COPYRIGHT     (1<<2)      /**< 0 = copyright, 1 = not copyright */
00055 #define IEC958_AES0_CON_EMPHASIS    (7<<3)      /**< mask - emphasis */
00056 #define IEC958_AES0_CON_EMPHASIS_NONE     (0<<3)      /**< no emphasis */
00057 #define IEC958_AES0_CON_EMPHASIS_5015     (1<<3)      /**< 50/15us emphasis */
00058 #define IEC958_AES0_CON_MODE        (3<<6)      /**< mask - mode */
00059 #define IEC958_AES1_PRO_MODE        (15<<0)     /**< mask - channel mode */
00060 #define IEC958_AES1_PRO_MODE_NOTID  (0<<0)      /**< mode not indicated */
00061 #define IEC958_AES1_PRO_MODE_STEREOPHONIC (2<<0) /**< stereophonic - ch A is left */
00062 #define IEC958_AES1_PRO_MODE_SINGLE (4<<0)      /**< single channel */
00063 #define IEC958_AES1_PRO_MODE_TWO    (8<<0)      /**< two channels */
00064 #define IEC958_AES1_PRO_MODE_PRIMARY      (12<<0)     /**< primary/secondary */
00065 #define IEC958_AES1_PRO_MODE_BYTE3  (15<<0)     /**< vector to byte 3 */
00066 #define IEC958_AES1_PRO_USERBITS    (15<<4)     /**< mask - user bits */
00067 #define IEC958_AES1_PRO_USERBITS_NOTID    (0<<4)      /**< user bits not indicated */
00068 #define IEC958_AES1_PRO_USERBITS_192      (8<<4)      /**< 192-bit structure */
00069 #define IEC958_AES1_PRO_USERBITS_UDEF     (12<<4)     /**< user defined application */
00070 #define IEC958_AES1_CON_CATEGORY    0x7f  /**< consumer category */
00071 #define IEC958_AES1_CON_GENERAL           0x00  /**< general category */
00072 #define IEC958_AES1_CON_EXPERIMENTAL      0x40  /**< experimental category */
00073 #define IEC958_AES1_CON_SOLIDMEM_MASK     0x0f  /**< ??? */
00074 #define IEC958_AES1_CON_SOLIDMEM_ID 0x08  /**< ??? */
00075 #define IEC958_AES1_CON_BROADCAST1_MASK 0x07    /**< ??? */
00076 #define IEC958_AES1_CON_BROADCAST1_ID     0x04  /**< ??? */
00077 #define IEC958_AES1_CON_DIGDIGCONV_MASK 0x07    /**< digital<->digital converter mask */
00078 #define IEC958_AES1_CON_DIGDIGCONV_ID     0x02  /**< digital<->digital converter id */
00079 #define IEC958_AES1_CON_ADC_COPYRIGHT_MASK 0x1f /**< ADC Copyright mask */
00080 #define IEC958_AES1_CON_ADC_COPYRIGHT_ID 0x06   /**< ADC Copyright ID */
00081 #define IEC958_AES1_CON_ADC_MASK    0x1f  /**< ADC Mask */
00082 #define IEC958_AES1_CON_ADC_ID            0x16  /**< ADC ID */
00083 #define IEC958_AES1_CON_BROADCAST2_MASK 0x0f    /**< Broadcast mask */
00084 #define IEC958_AES1_CON_BROADCAST2_ID     0x0e  /**< Broadcast ID */
00085 #define IEC958_AES1_CON_LASEROPT_MASK     0x07  /**< Laser-optical mask */
00086 #define IEC958_AES1_CON_LASEROPT_ID 0x01  /**< Laser-optical ID */
00087 #define IEC958_AES1_CON_MUSICAL_MASK      0x07  /**< Musical device mask */
00088 #define IEC958_AES1_CON_MUSICAL_ID  0x05  /**< Musical device ID */
00089 #define IEC958_AES1_CON_MAGNETIC_MASK     0x07  /**< Magnetic device mask */
00090 #define IEC958_AES1_CON_MAGNETIC_ID 0x03  /**< Magnetic device ID */
00091 #define IEC958_AES1_CON_IEC908_CD   (IEC958_AES1_CON_LASEROPT_ID|0x00)  /**< IEC958 CD compatible device */
00092 #define IEC958_AES1_CON_NON_IEC908_CD     (IEC958_AES1_CON_LASEROPT_ID|0x08)  /**< non-IEC958 CD compatible device */
00093 #define IEC958_AES1_CON_PCM_CODER   (IEC958_AES1_CON_DIGDIGCONV_ID|0x00)      /**< PCM coder */
00094 #define IEC958_AES1_CON_SAMPLER           (IEC958_AES1_CON_DIGDIGCONV_ID|0x20)      /**< PCM sampler */
00095 #define IEC958_AES1_CON_MIXER       (IEC958_AES1_CON_DIGDIGCONV_ID|0x10)      /**< Mixer */
00096 #define IEC958_AES1_CON_RATE_CONVERTER    (IEC958_AES1_CON_DIGDIGCONV_ID|0x18)      /**< Rate converter */
00097 #define IEC958_AES1_CON_SYNTHESIZER (IEC958_AES1_CON_MUSICAL_ID|0x00)   /**< Synthesizer */
00098 #define IEC958_AES1_CON_MICROPHONE  (IEC958_AES1_CON_MUSICAL_ID|0x08)   /**< Microphone */
00099 #define IEC958_AES1_CON_DAT         (IEC958_AES1_CON_MAGNETIC_ID|0x00)  /**< Digital Audio Tape */
00100 #define IEC958_AES1_CON_VCR         (IEC958_AES1_CON_MAGNETIC_ID|0x08)  /**< Video recorder */
00101 #define IEC958_AES1_CON_ORIGINAL    (1<<7)      /**< this bits depends on the category code */
00102 #define IEC958_AES2_PRO_SBITS       (7<<0)      /**< mask - sample bits */
00103 #define IEC958_AES2_PRO_SBITS_20    (2<<0)      /**< 20-bit - coordination */
00104 #define IEC958_AES2_PRO_SBITS_24    (4<<0)      /**< 24-bit - main audio */
00105 #define IEC958_AES2_PRO_SBITS_UDEF  (6<<0)      /**< user defined application */
00106 #define IEC958_AES2_PRO_WORDLEN           (7<<3)      /**< mask - source word length */
00107 #define IEC958_AES2_PRO_WORDLEN_NOTID     (0<<3)      /**< source word length not indicated */
00108 #define IEC958_AES2_PRO_WORDLEN_22_18     (2<<3)      /**< 22-bit or 18-bit */
00109 #define IEC958_AES2_PRO_WORDLEN_23_19     (4<<3)      /**< 23-bit or 19-bit */
00110 #define IEC958_AES2_PRO_WORDLEN_24_20     (5<<3)      /**< 24-bit or 20-bit */
00111 #define IEC958_AES2_PRO_WORDLEN_20_16     (6<<3)      /**< 20-bit or 16-bit */
00112 #define IEC958_AES2_CON_SOURCE            (15<<0)     /**< mask - source number */
00113 #define IEC958_AES2_CON_SOURCE_UNSPEC     (0<<0)      /**< source number unspecified */
00114 #define IEC958_AES2_CON_CHANNEL           (15<<4)     /**< mask - channel number */
00115 #define IEC958_AES2_CON_CHANNEL_UNSPEC    (0<<4)      /**< channel number unspecified */
00116 #define IEC958_AES3_CON_FS          (15<<0)     /**< mask - sample frequency */
00117 #define IEC958_AES3_CON_FS_44100    (0<<0)      /**< 44.1kHz */
00118 #define IEC958_AES3_CON_FS_48000    (2<<0)      /**< 48kHz */
00119 #define IEC958_AES3_CON_FS_32000    (3<<0)      /**< 32kHz */
00120 #define IEC958_AES3_CON_CLOCK       (3<<4)      /**< mask - clock accuracy */
00121 #define IEC958_AES3_CON_CLOCK_1000PPM     (0<<4)      /**< 1000 ppm */
00122 #define IEC958_AES3_CON_CLOCK_50PPM (1<<4)      /**< 50 ppm */
00123 #define IEC958_AES3_CON_CLOCK_VARIABLE    (2<<4)      /**< variable pitch */

/** \} */

/**
 * \defgroup MIDI_Interface Constants for MIDI v1.0
 * Constants for MIDI v1.0.
 * \{
 */

00133 #define MIDI_CHANNELS               16    /**< Number of channels per port/cable. */
00134 #define MIDI_GM_DRUM_CHANNEL        (10-1)      /**< Channel number for GM drums. */

/**
 * \defgroup MIDI_Commands MIDI Commands
 * MIDI command codes.
 * \{
 */

00142 #define MIDI_CMD_NOTE_OFF           0x80  /**< note off */
00143 #define MIDI_CMD_NOTE_ON            0x90  /**< note on */
00144 #define MIDI_CMD_NOTE_PRESSURE            0xa0  /**< key pressure */
00145 #define MIDI_CMD_CONTROL            0xb0  /**< control change */
00146 #define MIDI_CMD_PGM_CHANGE         0xc0  /**< program change */
00147 #define MIDI_CMD_CHANNEL_PRESSURE   0xd0  /**< channel pressure */
00148 #define MIDI_CMD_BENDER             0xe0  /**< pitch bender */

00150 #define MIDI_CMD_COMMON_SYSEX       0xf0  /**< sysex (system exclusive) begin */
00151 #define MIDI_CMD_COMMON_MTC_QUARTER 0xf1  /**< MTC quarter frame */
00152 #define MIDI_CMD_COMMON_SONG_POS    0xf2  /**< song position */
00153 #define MIDI_CMD_COMMON_SONG_SELECT 0xf3  /**< song select */
00154 #define MIDI_CMD_COMMON_TUNE_REQUEST      0xf6  /**< tune request */
00155 #define MIDI_CMD_COMMON_SYSEX_END   0xf7  /**< end of sysex */
00156 #define MIDI_CMD_COMMON_CLOCK       0xf8  /**< clock */
00157 #define MIDI_CMD_COMMON_START       0xfa  /**< start */
00158 #define MIDI_CMD_COMMON_CONTINUE    0xfb  /**< continue */
00159 #define MIDI_CMD_COMMON_STOP        0xfc  /**< stop */
00160 #define MIDI_CMD_COMMON_SENSING           0xfe  /**< active sensing */
00161 #define MIDI_CMD_COMMON_RESET       0xff  /**< reset */

/** \} */

/**
 * \defgroup MIDI_Controllers MIDI Controllers
 * MIDI controller numbers.
 * \{
 */

00171 #define MIDI_CTL_MSB_BANK           0x00  /**< Bank selection */
00172 #define MIDI_CTL_MSB_MODWHEEL             0x01  /**< Modulation */
00173 #define MIDI_CTL_MSB_BREATH               0x02  /**< Breath */
00174 #define MIDI_CTL_MSB_FOOT                 0x04  /**< Foot */
00175 #define MIDI_CTL_MSB_PORTAMENTO_TIME      0x05  /**< Portamento time */
00176 #define MIDI_CTL_MSB_DATA_ENTRY           0x06  /**< Data entry */
00177 #define MIDI_CTL_MSB_MAIN_VOLUME          0x07  /**< Main volume */
00178 #define MIDI_CTL_MSB_BALANCE              0x08  /**< Balance */
00179 #define MIDI_CTL_MSB_PAN                  0x0a  /**< Panpot */
00180 #define MIDI_CTL_MSB_EXPRESSION           0x0b  /**< Expression */
00181 #define MIDI_CTL_MSB_EFFECT1        0x0c  /**< Effect1 */
00182 #define MIDI_CTL_MSB_EFFECT2        0x0d  /**< Effect2 */
00183 #define MIDI_CTL_MSB_GENERAL_PURPOSE1     0x10  /**< General purpose 1 */
00184 #define MIDI_CTL_MSB_GENERAL_PURPOSE2     0x11  /**< General purpose 2 */
00185 #define MIDI_CTL_MSB_GENERAL_PURPOSE3     0x12  /**< General purpose 3 */
00186 #define MIDI_CTL_MSB_GENERAL_PURPOSE4     0x13  /**< General purpose 4 */
00187 #define MIDI_CTL_LSB_BANK           0x20  /**< Bank selection */
00188 #define MIDI_CTL_LSB_MODWHEEL             0x21  /**< Modulation */
00189 #define MIDI_CTL_LSB_BREATH               0x22  /**< Breath */
00190 #define MIDI_CTL_LSB_FOOT                 0x24  /**< Foot */
00191 #define MIDI_CTL_LSB_PORTAMENTO_TIME      0x25  /**< Portamento time */
00192 #define MIDI_CTL_LSB_DATA_ENTRY           0x26  /**< Data entry */
00193 #define MIDI_CTL_LSB_MAIN_VOLUME          0x27  /**< Main volume */
00194 #define MIDI_CTL_LSB_BALANCE              0x28  /**< Balance */
00195 #define MIDI_CTL_LSB_PAN                  0x2a  /**< Panpot */
00196 #define MIDI_CTL_LSB_EXPRESSION           0x2b  /**< Expression */
00197 #define MIDI_CTL_LSB_EFFECT1        0x2c  /**< Effect1 */
00198 #define MIDI_CTL_LSB_EFFECT2        0x2d  /**< Effect2 */
00199 #define MIDI_CTL_LSB_GENERAL_PURPOSE1     0x30  /**< General purpose 1 */
00200 #define MIDI_CTL_LSB_GENERAL_PURPOSE2     0x31  /**< General purpose 2 */
00201 #define MIDI_CTL_LSB_GENERAL_PURPOSE3     0x32  /**< General purpose 3 */
00202 #define MIDI_CTL_LSB_GENERAL_PURPOSE4     0x33  /**< General purpose 4 */
00203 #define MIDI_CTL_SUSTAIN                  0x40  /**< Sustain pedal */
00204 #define MIDI_CTL_PORTAMENTO               0x41  /**< Portamento */
00205 #define MIDI_CTL_SOSTENUTO                0x42  /**< Sostenuto */
00206 #define MIDI_CTL_SUSTENUTO                0x42  /**< Sostenuto (a typo in the older version) */
00207 #define MIDI_CTL_SOFT_PEDAL               0x43  /**< Soft pedal */
00208 #define MIDI_CTL_LEGATO_FOOTSWITCH  0x44  /**< Legato foot switch */
00209 #define MIDI_CTL_HOLD2                    0x45  /**< Hold2 */
00210 #define MIDI_CTL_SC1_SOUND_VARIATION      0x46  /**< SC1 Sound Variation */
00211 #define MIDI_CTL_SC2_TIMBRE         0x47  /**< SC2 Timbre */
00212 #define MIDI_CTL_SC3_RELEASE_TIME   0x48  /**< SC3 Release Time */
00213 #define MIDI_CTL_SC4_ATTACK_TIME    0x49  /**< SC4 Attack Time */
00214 #define MIDI_CTL_SC5_BRIGHTNESS           0x4a  /**< SC5 Brightness */
00215 #define MIDI_CTL_SC6                0x4b  /**< SC6 */
00216 #define MIDI_CTL_SC7                0x4c  /**< SC7 */
00217 #define MIDI_CTL_SC8                0x4d  /**< SC8 */
00218 #define MIDI_CTL_SC9                0x4e  /**< SC9 */
00219 #define MIDI_CTL_SC10               0x4f  /**< SC10 */
00220 #define MIDI_CTL_GENERAL_PURPOSE5         0x50  /**< General purpose 5 */
00221 #define MIDI_CTL_GENERAL_PURPOSE6         0x51  /**< General purpose 6 */
00222 #define MIDI_CTL_GENERAL_PURPOSE7         0x52  /**< General purpose 7 */
00223 #define MIDI_CTL_GENERAL_PURPOSE8         0x53  /**< General purpose 8 */
00224 #define MIDI_CTL_PORTAMENTO_CONTROL 0x54  /**< Portamento control */
00225 #define MIDI_CTL_E1_REVERB_DEPTH    0x5b  /**< E1 Reverb Depth */
00226 #define MIDI_CTL_E2_TREMOLO_DEPTH   0x5c  /**< E2 Tremolo Depth */
00227 #define MIDI_CTL_E3_CHORUS_DEPTH    0x5d  /**< E3 Chorus Depth */
00228 #define MIDI_CTL_E4_DETUNE_DEPTH    0x5e  /**< E4 Detune Depth */
00229 #define MIDI_CTL_E5_PHASER_DEPTH    0x5f  /**< E5 Phaser Depth */
00230 #define MIDI_CTL_DATA_INCREMENT           0x60  /**< Data Increment */
00231 #define MIDI_CTL_DATA_DECREMENT           0x61  /**< Data Decrement */
00232 #define MIDI_CTL_NONREG_PARM_NUM_LSB      0x62  /**< Non-registered parameter number */
00233 #define MIDI_CTL_NONREG_PARM_NUM_MSB      0x63  /**< Non-registered parameter number */
00234 #define MIDI_CTL_REGIST_PARM_NUM_LSB      0x64  /**< Registered parameter number */
00235 #define MIDI_CTL_REGIST_PARM_NUM_MSB      0x65  /**< Registered parameter number */
00236 #define MIDI_CTL_ALL_SOUNDS_OFF           0x78  /**< All sounds off */
00237 #define MIDI_CTL_RESET_CONTROLLERS  0x79  /**< Reset Controllers */
00238 #define MIDI_CTL_LOCAL_CONTROL_SWITCH     0x7a  /**< Local control switch */
00239 #define MIDI_CTL_ALL_NOTES_OFF            0x7b  /**< All notes off */
00240 #define MIDI_CTL_OMNI_OFF           0x7c  /**< Omni off */
00241 #define MIDI_CTL_OMNI_ON            0x7d  /**< Omni on */
00242 #define MIDI_CTL_MONO1              0x7e  /**< Mono1 */
00243 #define MIDI_CTL_MONO2              0x7f  /**< Mono2 */

/** \} */

/** \} */

#ifdef __cplusplus
}
#endif

#endif /* __ALSA_ASOUNDEF_H */

Generated by  Doxygen 1.6.0   Back to index