ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

cmireg.hpp
Go to the documentation of this file.
00001 /*
00002 Copyright (c) 2006-2007 dogbert <dogber1@gmail.com>
00003 All rights reserved.
00004 
00005 Redistribution and use in source and binary forms, with or without
00006 modification, are permitted provided that the following conditions
00007 are met:
00008 1. Redistributions of source code must retain the above copyright
00009    notice, this list of conditions and the following disclaimer.
00010 2. Redistributions in binary form must reproduce the above copyright
00011    notice, this list of conditions and the following disclaimer in the
00012    documentation and/or other materials provided with the distribution.
00013 3. The name of the author may not be used to endorse or promote products
00014    derived from this software without specific prior written permission.
00015 
00016 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
00017 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
00018 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00019 IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
00020 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
00021 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00022 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00023 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00024 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
00025 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00026 */
00027 
00028 #ifndef _CMIREG_HPP_
00029 #define _CMIREG_HPP_
00030 
00031 // registers (from CMI8738_6ch_series_spec_v18f_registers.pdf)
00032 
00033 #define REG_FUNCTRL0  0x00       // Function Control Register 0 (32bit)
00034 #define ADC_CH0       0x00000001 // enable ADC on channel 0 for recording
00035 #define ADC_CH1       0x00000002 // enable ADC on channel 1 for recording
00036 #define PAUSE_CH0     0x00000004 // pause channel 0
00037 #define PAUSE_CH1     0x00000008 // pause channel 1
00038 #define EN_CH0        0x00010000 // enable channel 0
00039 #define EN_CH1        0x00020000 // enable channel 1
00040 #define RST_CH0       0x00040000 // reset channel 0
00041 #define RST_CH1       0x00080000 // reset channel 1
00042 
00043 #define REG_FUNCTRL1  0x04       // Function Control Register 1 (32bit)
00044 #define EN_ZVPORT     0x00000001 // enable ZVPort
00045 #define EN_GAMEPORT   0x00000002 // enable legacy gameport
00046 #define EN_UART       0x00000004 // enable UART (MIDI interface)
00047 #define BREQ          0x00000010 // enable bus master request
00048 #define INTRM         0x00000020 // enable master control block interrupt
00049 #define SPDO2DAC      0x00000040 // send S/PDIF out through DAC
00050 #define LOOP_SPDF     0x00000080 // loop S/PDIF in to S/PDIF out
00051 #define SPDF_0        0x00000100 // enable S/PDIF out at channel 0
00052 #define SPDF_1        0x00000200 // enable S/PDIF in/out at channel 1
00053 #define SFC_CH0_MASK  0x00001C00 // mask for the sample rate bits of channel 0
00054 #define SFC_44K_CH0   0x00000C00 // 44.1kHz channel 0
00055 #define SFC_48K_CH0   0x00001C00 // 48kHz channel 0
00056 #define SFC_CH1_MASK  0x0000E000 // mask for the sample rate bits of channel 1
00057 #define SFC_44K_CH1   0x00006000 // 44.1kHz channel 1
00058 #define SFC_48K_CH1   0x0000E000 // 48kHz channel 1
00059 
00060 #define REG_CHFORMAT  0x08       // Channel Format Register (32bit)
00061 #define FORMAT_CH0    0x00000003 // enable 16bit stereo format for channel 0
00062 #define FORMAT_CH1    0x0000000C // enable 16bit stereo format for channel 1
00063 #define SPDLOCKED     0x00000010 //
00064 #define POLVALID      0x00000020 // invert S/PDIF in valid bit
00065 #define DBLSPDS       0x00000040 // double S/PDIF sampling rate (44.1 => 88.2, 48 => 96)
00066 #define INV_SPDIFI2   0x00000080 // invert S/PDIF in signal (whatever that means, version >37)
00067 #define SPD88_CH0     0x00000100 // double sample rate from 44.1 to 88.2 kHz on channel 0
00068 #define SPD88_CH1     0x00000200 // double sample rate from 44.1 to 88.2 kHz on channel 1
00069 #define SPD96_CH0     0x00000400 // double sample rate from 48 to 96 kHz on channel 0
00070 #define SPD96_CH1     0x00000800 // double sample rate from 48 to 96 kHz on channel 1
00071 #define SEL_SPDIFI1   0x00080000 // select secondary S/PDIF in (only for versions <=37)
00072 #define EN_SPDO_AC3_3 0x00020000 // undocumented: enable AC3 mode on S/PDIF out (requires hardware support)
00073 #define EN_SPDO_AC3_1 0x00100000 // undocumented: enable AC3 mode on S/PDIF out
00074 #define SPD24SEL      0x00200000 // enable 24bit S/PDIF out
00075 #define VERSION_37    0x01000000 // undocumented: hardware revision 37
00076 #define EN_4CH_CH1    0x20000000 // enable 4 channel mode on channel 1
00077 #define EN_5CH_CH1    0x80000000 // enable 5 channel mode on channel 1
00078 
00079 #define REG_INTHLDCLR 0x0C       // Interrupt Hold/Clear Register (32bit)
00080 #define VERSION_MASK  0xFF000000 // mask for the version number, bits [31:24], highest byte
00081 #define VERSION_68    0x20000000 // undocumented: hardware revision 68 (8768)
00082 #define VERSION_55    0x08000000 // undocumented: hardware revision 55
00083 #define VERSION_39    0x04000000 // undocumented: hardware revision 39
00084 #define VERSION_39_6  0x01000000 // undocumented: 6 channel version of revision 39
00085 #define INT_CLEAR     0x00000001 // clear interrupt
00086 #define INT_HOLD      0x00000002 // hold interrupt
00087 #define EN_CH0_INT    0x00010000 // enable interrupt on channel 0
00088 #define EN_CH1_INT    0x00020000 // enable interrupt on channel 1
00089 
00090 #define REG_INT_STAT  0x10       // Interrupt Register (32bit)
00091 #define INT_CH0       0x00000001 // interrupt on channel 0
00092 #define INT_CH1       0x00000002 // interrupt on channel 1
00093 #define BUSY_CH0      0x00000004 // channel 0 busy
00094 #define BUSY_CH1      0x00000008 // channel 1 busy
00095 #define INT_UART      0x00010000 // interrupt on UART interface
00096 #define INT_PENDING   0x80000000 // interrupt pending
00097 
00098 #define REG_LEGACY    0x14       // Legacy Control Register (32bit)
00099 #define CENTER2LINE   0x00002000 // route center channel to line-in jack
00100 #define BASS2LINE     0x00004000 // route bass channel to line-in jack
00101 #define EN_6CH_CH1    0x00008000 // enable 6 channel mode on channel 1
00102 #define DAC2SPDO      0x00200000 // enable PCM+FM to S/PDIF out
00103 #define EN_SPDCOPYRHT 0x00400000 // enable S/PDIF out copyright bit
00104 #define EN_SPDIF_OUT  0x00800000 // enable S/PDIF out
00105 #define UART_330      0x00000000 // i/o addresses for UART
00106 #define UART_320      0x20000000
00107 #define UART_310      0x40000000
00108 #define UART_300      0x60000000
00109 #define DWORD_MAPPING 0x80000000 // enable DWORD-based position in base register
00110 
00111 #define REG_MISCCTRL  0x18       // Miscellaneous Control Register (32bit)
00112 #define EN_CENTER     0x00000080 // enable center channel
00113 #define SEL_SPDIFI2   0x00000100 // select secondary S/PDIF in
00114 #define EN_SPDIF_48_1 0x00008000 // enable 48kHz sampling rate on S/PDIF out
00115 #define EN_SPDO_AC3_2 0x00040000 // enable AC3 mode on S/PDIF out
00116 #define LOOP_SPDF_I   0x00100000 // loop internal S/PDIF out to internal S/PDIF in
00117 #define SPD32SEL      0x00200000 // enable 32bit S/PDIF out
00118 #define XCHG_DAC      0x00400000 // exchange DACs
00119 #define EN_DBLDAC     0x00800000 // enable double DAC mode
00120 #define EN_SPDIF_48_2 0x01000000 // enable 48kHz sampling rate on S/PDIF out
00121 #define EN_SPDO5V     0x02000000 // enable 5V levels on S/PDIF out
00122 #define RST_CHIP      0x40000000 // reset bus master / DSP engine
00123 #define PWD_CHIP      0x80000000 // enable power down mode (standby mode etc.)
00124 #define EN_SPDIF_48   (EN_SPDIF_48_1 | EN_SPDIF_48_2)
00125 
00126 #define REG_SBDATA    0x22       // SoundBlaster compatible mixer data register (8bit)
00127 #define REG_SBINDEX   0x23       // SoundBlaster compatible mixer index register (8bit)
00128 
00129 #define REG_MIXER1    0x24       // Mixer Register 1 (8bit)
00130 #define EN_SPDI2DAC   0x01       // enable S/PDIF in conversion
00131 #define EN_3DSOUND    0x02       // enable 3D sound
00132 #define EN_WAVEIN_L   0x04       // enable left wave in recording channel
00133 #define EN_WAVEIN_R   0x08       // enable right wave in recording channel
00134 #define REAR2FRONT    0x10       // exchange rear/front jacks
00135 #define REAR2LINE     0x20       // enable rear out on line-in jack
00136 #define MUTE_WAVE     0x40       // disable analog conversion of the wave stream
00137 #define MUTE_FM       0x80       // mute FM
00138 
00139 #define REG_MIXER2    0x25       // Mixer Register 2 (8bit)
00140 #define DIS_MICGAIN   0x01       // disable microphone gain
00141 #define MUTE_AUX_L    0x10       // mute left aux playback channel
00142 #define MUTE_AUX_R    0x20       // mute right aux playback channel
00143 #define MUTE_RAUX_L   0x40       // mute left aux recording channel
00144 #define MUTE_RAUX_R   0x80       // mute right aux recording channel
00145 
00146 #define REG_MIXER3    0x26       // Mixer Register 3 (8bit)
00147 
00148 #define REG_MIXER4    0x27       // Mixer Register 4 (8bit)
00149 #define INV_SPDIFI1   0x04       // invert S/PDIF in signal (version <=37)
00150 #define CENTER2MIC    0x04       // route center to mic-in jack (version >37)
00151 
00152 #define REG_CH0_FRAME1  0x80     // Channel 0 Frame Register 1 (32bit)
00153 #define REG_CH0_FRAME2  0x84     // Channel 0 Frame Register 2 (32bit)
00154 #define REG_CH1_FRAME1  0x88     // Channel 1 Frame Register 1 (32bit)
00155 #define REG_CH1_FRAME2  0x8C     // Channel 1 Frame Register 2 (32bit)
00156 
00157 #define REG_MISCCTRL2 0x92       // Miscellaneous Control Register 2 (16bit)
00158 #define EN_8CH_CH1    0x0020     // enable 8 channel mode on channel 1
00159 
00160 #define SBREG_OUTPUTCTRL  0x3C   // Soundblaster register for output controls (8bit)
00161 #define EN_MIC            0x01   // enable microphone output
00162 #define EN_CD_L           0x02   // enable left channel of CD input
00163 #define EN_CD_R           0x04   // enable right channel of CD input
00164 #define EN_LINEIN_L       0x08   // enable left channel of line-in
00165 #define EN_LINEIN_R       0x10   // enable right channel of line-in
00166 
00167 #define SBREG_IN_CTRL_L   0x3D   // Soundblaster register for left channel recording controls (8bit)
00168 #define SBREG_IN_CTRL_R   0x3E   // Soundblaster register for right channel recording controls (8bit)
00169 
00170 #define SBREG_EXTENSION   0xF0   // Soundblaster Extension Register (8bit)
00171 #define EN_MICBOOST       0x01   // enable microphone boost for recording
00172 
00173 #endif

Generated on Sun May 27 2012 04:28:38 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.