162306a36Sopenharmony_ci/**************************************************************************** 262306a36Sopenharmony_ci 362306a36Sopenharmony_ci Copyright Echo Digital Audio Corporation (c) 1998 - 2004 462306a36Sopenharmony_ci All rights reserved 562306a36Sopenharmony_ci www.echoaudio.com 662306a36Sopenharmony_ci 762306a36Sopenharmony_ci This file is part of Echo Digital Audio's generic driver library. 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci Echo Digital Audio's generic driver library is free software; 1062306a36Sopenharmony_ci you can redistribute it and/or modify it under the terms of 1162306a36Sopenharmony_ci the GNU General Public License as published by the Free Software 1262306a36Sopenharmony_ci Foundation. 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ci This program is distributed in the hope that it will be useful, 1562306a36Sopenharmony_ci but WITHOUT ANY WARRANTY; without even the implied warranty of 1662306a36Sopenharmony_ci MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1762306a36Sopenharmony_ci GNU General Public License for more details. 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ci You should have received a copy of the GNU General Public License 2062306a36Sopenharmony_ci along with this program; if not, write to the Free Software 2162306a36Sopenharmony_ci Foundation, Inc., 59 Temple Place - Suite 330, Boston, 2262306a36Sopenharmony_ci MA 02111-1307, USA. 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ci ************************************************************************* 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ci Translation from C++ and adaptation for use in ALSA-Driver 2762306a36Sopenharmony_ci were made by Giuliano Pochini <pochini@shiny.it> 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ci****************************************************************************/ 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ci#ifndef _ECHO_DSP_ 3262306a36Sopenharmony_ci#define _ECHO_DSP_ 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ci/**** Echogals: Darla20, Gina20, Layla20, and Darla24 ****/ 3662306a36Sopenharmony_ci#if defined(ECHOGALS_FAMILY) 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ci#define NUM_ASIC_TESTS 5 3962306a36Sopenharmony_ci#define READ_DSP_TIMEOUT 1000000L /* one second */ 4062306a36Sopenharmony_ci 4162306a36Sopenharmony_ci/**** Echo24: Gina24, Layla24, Mona, Mia, Mia-midi ****/ 4262306a36Sopenharmony_ci#elif defined(ECHO24_FAMILY) 4362306a36Sopenharmony_ci 4462306a36Sopenharmony_ci#define DSP_56361 /* Some Echo24 cards use the 56361 DSP */ 4562306a36Sopenharmony_ci#define READ_DSP_TIMEOUT 100000L /* .1 second */ 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ci/**** 3G: Gina3G, Layla3G ****/ 4862306a36Sopenharmony_ci#elif defined(ECHO3G_FAMILY) 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_ci#define DSP_56361 5162306a36Sopenharmony_ci#define READ_DSP_TIMEOUT 100000L /* .1 second */ 5262306a36Sopenharmony_ci#define MIN_MTC_1X_RATE 32000 5362306a36Sopenharmony_ci 5462306a36Sopenharmony_ci/**** Indigo: Indigo, Indigo IO, Indigo DJ ****/ 5562306a36Sopenharmony_ci#elif defined(INDIGO_FAMILY) 5662306a36Sopenharmony_ci 5762306a36Sopenharmony_ci#define DSP_56361 5862306a36Sopenharmony_ci#define READ_DSP_TIMEOUT 100000L /* .1 second */ 5962306a36Sopenharmony_ci 6062306a36Sopenharmony_ci#else 6162306a36Sopenharmony_ci 6262306a36Sopenharmony_ci#error No family is defined 6362306a36Sopenharmony_ci 6462306a36Sopenharmony_ci#endif 6562306a36Sopenharmony_ci 6662306a36Sopenharmony_ci 6762306a36Sopenharmony_ci 6862306a36Sopenharmony_ci/* 6962306a36Sopenharmony_ci * 7062306a36Sopenharmony_ci * Max inputs and outputs 7162306a36Sopenharmony_ci * 7262306a36Sopenharmony_ci */ 7362306a36Sopenharmony_ci 7462306a36Sopenharmony_ci#define DSP_MAXAUDIOINPUTS 16 /* Max audio input channels */ 7562306a36Sopenharmony_ci#define DSP_MAXAUDIOOUTPUTS 16 /* Max audio output channels */ 7662306a36Sopenharmony_ci#define DSP_MAXPIPES 32 /* Max total pipes (input + output) */ 7762306a36Sopenharmony_ci 7862306a36Sopenharmony_ci 7962306a36Sopenharmony_ci/* 8062306a36Sopenharmony_ci * 8162306a36Sopenharmony_ci * These are the offsets for the memory-mapped DSP registers; the DSP base 8262306a36Sopenharmony_ci * address is treated as the start of a u32 array. 8362306a36Sopenharmony_ci */ 8462306a36Sopenharmony_ci 8562306a36Sopenharmony_ci#define CHI32_CONTROL_REG 4 8662306a36Sopenharmony_ci#define CHI32_STATUS_REG 5 8762306a36Sopenharmony_ci#define CHI32_VECTOR_REG 6 8862306a36Sopenharmony_ci#define CHI32_DATA_REG 7 8962306a36Sopenharmony_ci 9062306a36Sopenharmony_ci 9162306a36Sopenharmony_ci/* 9262306a36Sopenharmony_ci * 9362306a36Sopenharmony_ci * Interesting bits within the DSP registers 9462306a36Sopenharmony_ci * 9562306a36Sopenharmony_ci */ 9662306a36Sopenharmony_ci 9762306a36Sopenharmony_ci#define CHI32_VECTOR_BUSY 0x00000001 9862306a36Sopenharmony_ci#define CHI32_STATUS_REG_HF3 0x00000008 9962306a36Sopenharmony_ci#define CHI32_STATUS_REG_HF4 0x00000010 10062306a36Sopenharmony_ci#define CHI32_STATUS_REG_HF5 0x00000020 10162306a36Sopenharmony_ci#define CHI32_STATUS_HOST_READ_FULL 0x00000004 10262306a36Sopenharmony_ci#define CHI32_STATUS_HOST_WRITE_EMPTY 0x00000002 10362306a36Sopenharmony_ci#define CHI32_STATUS_IRQ 0x00000040 10462306a36Sopenharmony_ci 10562306a36Sopenharmony_ci 10662306a36Sopenharmony_ci/* 10762306a36Sopenharmony_ci * 10862306a36Sopenharmony_ci * DSP commands sent via slave mode; these are sent to the DSP by write_dsp() 10962306a36Sopenharmony_ci * 11062306a36Sopenharmony_ci */ 11162306a36Sopenharmony_ci 11262306a36Sopenharmony_ci#define DSP_FNC_SET_COMMPAGE_ADDR 0x02 11362306a36Sopenharmony_ci#define DSP_FNC_LOAD_LAYLA_ASIC 0xa0 11462306a36Sopenharmony_ci#define DSP_FNC_LOAD_GINA24_ASIC 0xa0 11562306a36Sopenharmony_ci#define DSP_FNC_LOAD_MONA_PCI_CARD_ASIC 0xa0 11662306a36Sopenharmony_ci#define DSP_FNC_LOAD_LAYLA24_PCI_CARD_ASIC 0xa0 11762306a36Sopenharmony_ci#define DSP_FNC_LOAD_MONA_EXTERNAL_ASIC 0xa1 11862306a36Sopenharmony_ci#define DSP_FNC_LOAD_LAYLA24_EXTERNAL_ASIC 0xa1 11962306a36Sopenharmony_ci#define DSP_FNC_LOAD_3G_ASIC 0xa0 12062306a36Sopenharmony_ci 12162306a36Sopenharmony_ci 12262306a36Sopenharmony_ci/* 12362306a36Sopenharmony_ci * 12462306a36Sopenharmony_ci * Defines to handle the MIDI input state engine; these are used to properly 12562306a36Sopenharmony_ci * extract MIDI time code bytes and their timestamps from the MIDI input stream. 12662306a36Sopenharmony_ci * 12762306a36Sopenharmony_ci */ 12862306a36Sopenharmony_ci 12962306a36Sopenharmony_ci#define MIDI_IN_STATE_NORMAL 0 13062306a36Sopenharmony_ci#define MIDI_IN_STATE_TS_HIGH 1 13162306a36Sopenharmony_ci#define MIDI_IN_STATE_TS_LOW 2 13262306a36Sopenharmony_ci#define MIDI_IN_STATE_F1_DATA 3 13362306a36Sopenharmony_ci#define MIDI_IN_SKIP_DATA (-1) 13462306a36Sopenharmony_ci 13562306a36Sopenharmony_ci 13662306a36Sopenharmony_ci/*---------------------------------------------------------------------------- 13762306a36Sopenharmony_ci 13862306a36Sopenharmony_ciSetting the sample rates on Layla24 is somewhat schizophrenic. 13962306a36Sopenharmony_ci 14062306a36Sopenharmony_ciFor standard rates, it works exactly like Mona and Gina24. That is, for 14162306a36Sopenharmony_ci8, 11.025, 16, 22.05, 32, 44.1, 48, 88.2, and 96 kHz, you just set the 14262306a36Sopenharmony_ciappropriate bits in the control register and write the control register. 14362306a36Sopenharmony_ci 14462306a36Sopenharmony_ciIn order to support MIDI time code sync (and possibly SMPTE LTC sync in 14562306a36Sopenharmony_cithe future), Layla24 also has "continuous sample rate mode". In this mode, 14662306a36Sopenharmony_ciLayla24 can generate any sample rate between 25 and 50 kHz inclusive, or 14762306a36Sopenharmony_ci50 to 100 kHz inclusive for double speed mode. 14862306a36Sopenharmony_ci 14962306a36Sopenharmony_ciTo use continuous mode: 15062306a36Sopenharmony_ci 15162306a36Sopenharmony_ci-Set the clock select bits in the control register to 0xe (see the #define 15262306a36Sopenharmony_ci below) 15362306a36Sopenharmony_ci 15462306a36Sopenharmony_ci-Set double-speed mode if you want to use sample rates above 50 kHz 15562306a36Sopenharmony_ci 15662306a36Sopenharmony_ci-Write the control register as you would normally 15762306a36Sopenharmony_ci 15862306a36Sopenharmony_ci-Now, you need to set the frequency register. First, you need to determine the 15962306a36Sopenharmony_ci value for the frequency register. This is given by the following formula: 16062306a36Sopenharmony_ci 16162306a36Sopenharmony_cifrequency_reg = (LAYLA24_MAGIC_NUMBER / sample_rate) - 2 16262306a36Sopenharmony_ci 16362306a36Sopenharmony_ciNote the #define below for the magic number 16462306a36Sopenharmony_ci 16562306a36Sopenharmony_ci-Wait for the DSP handshake 16662306a36Sopenharmony_ci-Write the frequency_reg value to the .SampleRate field of the comm page 16762306a36Sopenharmony_ci-Send the vector command SET_LAYLA24_FREQUENCY_REG (see vmonkey.h) 16862306a36Sopenharmony_ci 16962306a36Sopenharmony_ciOnce you have set the control register up for continuous mode, you can just 17062306a36Sopenharmony_ciwrite the frequency register to change the sample rate. This could be 17162306a36Sopenharmony_ciused for MIDI time code sync. For MTC sync, the control register is set for 17262306a36Sopenharmony_cicontinuous mode. The driver then just keeps writing the 17362306a36Sopenharmony_ciSET_LAYLA24_FREQUENCY_REG command. 17462306a36Sopenharmony_ci 17562306a36Sopenharmony_ci-----------------------------------------------------------------------------*/ 17662306a36Sopenharmony_ci 17762306a36Sopenharmony_ci#define LAYLA24_MAGIC_NUMBER 677376000 17862306a36Sopenharmony_ci#define LAYLA24_CONTINUOUS_CLOCK 0x000e 17962306a36Sopenharmony_ci 18062306a36Sopenharmony_ci 18162306a36Sopenharmony_ci/* 18262306a36Sopenharmony_ci * 18362306a36Sopenharmony_ci * DSP vector commands 18462306a36Sopenharmony_ci * 18562306a36Sopenharmony_ci */ 18662306a36Sopenharmony_ci 18762306a36Sopenharmony_ci#define DSP_VC_RESET 0x80ff 18862306a36Sopenharmony_ci 18962306a36Sopenharmony_ci#ifndef DSP_56361 19062306a36Sopenharmony_ci 19162306a36Sopenharmony_ci#define DSP_VC_ACK_INT 0x8073 19262306a36Sopenharmony_ci#define DSP_VC_SET_VMIXER_GAIN 0x0000 /* Not used, only for compile */ 19362306a36Sopenharmony_ci#define DSP_VC_START_TRANSFER 0x0075 /* Handshke rqd. */ 19462306a36Sopenharmony_ci#define DSP_VC_METERS_ON 0x0079 19562306a36Sopenharmony_ci#define DSP_VC_METERS_OFF 0x007b 19662306a36Sopenharmony_ci#define DSP_VC_UPDATE_OUTVOL 0x007d /* Handshke rqd. */ 19762306a36Sopenharmony_ci#define DSP_VC_UPDATE_INGAIN 0x007f /* Handshke rqd. */ 19862306a36Sopenharmony_ci#define DSP_VC_ADD_AUDIO_BUFFER 0x0081 /* Handshke rqd. */ 19962306a36Sopenharmony_ci#define DSP_VC_TEST_ASIC 0x00eb 20062306a36Sopenharmony_ci#define DSP_VC_UPDATE_CLOCKS 0x00ef /* Handshke rqd. */ 20162306a36Sopenharmony_ci#define DSP_VC_SET_LAYLA_SAMPLE_RATE 0x00f1 /* Handshke rqd. */ 20262306a36Sopenharmony_ci#define DSP_VC_SET_GD_AUDIO_STATE 0x00f1 /* Handshke rqd. */ 20362306a36Sopenharmony_ci#define DSP_VC_WRITE_CONTROL_REG 0x00f1 /* Handshke rqd. */ 20462306a36Sopenharmony_ci#define DSP_VC_MIDI_WRITE 0x00f5 /* Handshke rqd. */ 20562306a36Sopenharmony_ci#define DSP_VC_STOP_TRANSFER 0x00f7 /* Handshke rqd. */ 20662306a36Sopenharmony_ci#define DSP_VC_UPDATE_FLAGS 0x00fd /* Handshke rqd. */ 20762306a36Sopenharmony_ci#define DSP_VC_GO_COMATOSE 0x00f9 20862306a36Sopenharmony_ci 20962306a36Sopenharmony_ci#else /* !DSP_56361 */ 21062306a36Sopenharmony_ci 21162306a36Sopenharmony_ci/* Vector commands for families that use either the 56301 or 56361 */ 21262306a36Sopenharmony_ci#define DSP_VC_ACK_INT 0x80F5 21362306a36Sopenharmony_ci#define DSP_VC_SET_VMIXER_GAIN 0x00DB /* Handshke rqd. */ 21462306a36Sopenharmony_ci#define DSP_VC_START_TRANSFER 0x00DD /* Handshke rqd. */ 21562306a36Sopenharmony_ci#define DSP_VC_METERS_ON 0x00EF 21662306a36Sopenharmony_ci#define DSP_VC_METERS_OFF 0x00F1 21762306a36Sopenharmony_ci#define DSP_VC_UPDATE_OUTVOL 0x00E3 /* Handshke rqd. */ 21862306a36Sopenharmony_ci#define DSP_VC_UPDATE_INGAIN 0x00E5 /* Handshke rqd. */ 21962306a36Sopenharmony_ci#define DSP_VC_ADD_AUDIO_BUFFER 0x00E1 /* Handshke rqd. */ 22062306a36Sopenharmony_ci#define DSP_VC_TEST_ASIC 0x00ED 22162306a36Sopenharmony_ci#define DSP_VC_UPDATE_CLOCKS 0x00E9 /* Handshke rqd. */ 22262306a36Sopenharmony_ci#define DSP_VC_SET_LAYLA24_FREQUENCY_REG 0x00E9 /* Handshke rqd. */ 22362306a36Sopenharmony_ci#define DSP_VC_SET_LAYLA_SAMPLE_RATE 0x00EB /* Handshke rqd. */ 22462306a36Sopenharmony_ci#define DSP_VC_SET_GD_AUDIO_STATE 0x00EB /* Handshke rqd. */ 22562306a36Sopenharmony_ci#define DSP_VC_WRITE_CONTROL_REG 0x00EB /* Handshke rqd. */ 22662306a36Sopenharmony_ci#define DSP_VC_MIDI_WRITE 0x00E7 /* Handshke rqd. */ 22762306a36Sopenharmony_ci#define DSP_VC_STOP_TRANSFER 0x00DF /* Handshke rqd. */ 22862306a36Sopenharmony_ci#define DSP_VC_UPDATE_FLAGS 0x00FB /* Handshke rqd. */ 22962306a36Sopenharmony_ci#define DSP_VC_GO_COMATOSE 0x00d9 23062306a36Sopenharmony_ci 23162306a36Sopenharmony_ci#endif /* !DSP_56361 */ 23262306a36Sopenharmony_ci 23362306a36Sopenharmony_ci 23462306a36Sopenharmony_ci/* 23562306a36Sopenharmony_ci * 23662306a36Sopenharmony_ci * Timeouts 23762306a36Sopenharmony_ci * 23862306a36Sopenharmony_ci */ 23962306a36Sopenharmony_ci 24062306a36Sopenharmony_ci#define HANDSHAKE_TIMEOUT 20000 /* send_vector command timeout (20ms) */ 24162306a36Sopenharmony_ci#define VECTOR_BUSY_TIMEOUT 100000 /* 100ms */ 24262306a36Sopenharmony_ci#define MIDI_OUT_DELAY_USEC 2000 /* How long to wait after MIDI fills up */ 24362306a36Sopenharmony_ci 24462306a36Sopenharmony_ci 24562306a36Sopenharmony_ci/* 24662306a36Sopenharmony_ci * 24762306a36Sopenharmony_ci * Flags for .Flags field in the comm page 24862306a36Sopenharmony_ci * 24962306a36Sopenharmony_ci */ 25062306a36Sopenharmony_ci 25162306a36Sopenharmony_ci#define DSP_FLAG_MIDI_INPUT 0x0001 /* Enable MIDI input */ 25262306a36Sopenharmony_ci#define DSP_FLAG_SPDIF_NONAUDIO 0x0002 /* Sets the "non-audio" bit 25362306a36Sopenharmony_ci * in the S/PDIF out status 25462306a36Sopenharmony_ci * bits. Clear this flag for 25562306a36Sopenharmony_ci * audio data; 25662306a36Sopenharmony_ci * set it for AC3 or WMA or 25762306a36Sopenharmony_ci * some such */ 25862306a36Sopenharmony_ci#define DSP_FLAG_PROFESSIONAL_SPDIF 0x0008 /* 1 Professional, 0 Consumer */ 25962306a36Sopenharmony_ci 26062306a36Sopenharmony_ci 26162306a36Sopenharmony_ci/* 26262306a36Sopenharmony_ci * 26362306a36Sopenharmony_ci * Clock detect bits reported by the DSP for Gina20, Layla20, Darla24, and Mia 26462306a36Sopenharmony_ci * 26562306a36Sopenharmony_ci */ 26662306a36Sopenharmony_ci 26762306a36Sopenharmony_ci#define GLDM_CLOCK_DETECT_BIT_WORD 0x0002 26862306a36Sopenharmony_ci#define GLDM_CLOCK_DETECT_BIT_SUPER 0x0004 26962306a36Sopenharmony_ci#define GLDM_CLOCK_DETECT_BIT_SPDIF 0x0008 27062306a36Sopenharmony_ci#define GLDM_CLOCK_DETECT_BIT_ESYNC 0x0010 27162306a36Sopenharmony_ci 27262306a36Sopenharmony_ci 27362306a36Sopenharmony_ci/* 27462306a36Sopenharmony_ci * 27562306a36Sopenharmony_ci * Clock detect bits reported by the DSP for Gina24, Mona, and Layla24 27662306a36Sopenharmony_ci * 27762306a36Sopenharmony_ci */ 27862306a36Sopenharmony_ci 27962306a36Sopenharmony_ci#define GML_CLOCK_DETECT_BIT_WORD96 0x0002 28062306a36Sopenharmony_ci#define GML_CLOCK_DETECT_BIT_WORD48 0x0004 28162306a36Sopenharmony_ci#define GML_CLOCK_DETECT_BIT_SPDIF48 0x0008 28262306a36Sopenharmony_ci#define GML_CLOCK_DETECT_BIT_SPDIF96 0x0010 28362306a36Sopenharmony_ci#define GML_CLOCK_DETECT_BIT_WORD (GML_CLOCK_DETECT_BIT_WORD96 | GML_CLOCK_DETECT_BIT_WORD48) 28462306a36Sopenharmony_ci#define GML_CLOCK_DETECT_BIT_SPDIF (GML_CLOCK_DETECT_BIT_SPDIF48 | GML_CLOCK_DETECT_BIT_SPDIF96) 28562306a36Sopenharmony_ci#define GML_CLOCK_DETECT_BIT_ESYNC 0x0020 28662306a36Sopenharmony_ci#define GML_CLOCK_DETECT_BIT_ADAT 0x0040 28762306a36Sopenharmony_ci 28862306a36Sopenharmony_ci 28962306a36Sopenharmony_ci/* 29062306a36Sopenharmony_ci * 29162306a36Sopenharmony_ci * Layla clock numbers to send to DSP 29262306a36Sopenharmony_ci * 29362306a36Sopenharmony_ci */ 29462306a36Sopenharmony_ci 29562306a36Sopenharmony_ci#define LAYLA20_CLOCK_INTERNAL 0 29662306a36Sopenharmony_ci#define LAYLA20_CLOCK_SPDIF 1 29762306a36Sopenharmony_ci#define LAYLA20_CLOCK_WORD 2 29862306a36Sopenharmony_ci#define LAYLA20_CLOCK_SUPER 3 29962306a36Sopenharmony_ci 30062306a36Sopenharmony_ci 30162306a36Sopenharmony_ci/* 30262306a36Sopenharmony_ci * 30362306a36Sopenharmony_ci * Gina/Darla clock states 30462306a36Sopenharmony_ci * 30562306a36Sopenharmony_ci */ 30662306a36Sopenharmony_ci 30762306a36Sopenharmony_ci#define GD_CLOCK_NOCHANGE 0 30862306a36Sopenharmony_ci#define GD_CLOCK_44 1 30962306a36Sopenharmony_ci#define GD_CLOCK_48 2 31062306a36Sopenharmony_ci#define GD_CLOCK_SPDIFIN 3 31162306a36Sopenharmony_ci#define GD_CLOCK_UNDEF 0xff 31262306a36Sopenharmony_ci 31362306a36Sopenharmony_ci 31462306a36Sopenharmony_ci/* 31562306a36Sopenharmony_ci * 31662306a36Sopenharmony_ci * Gina/Darla S/PDIF status bits 31762306a36Sopenharmony_ci * 31862306a36Sopenharmony_ci */ 31962306a36Sopenharmony_ci 32062306a36Sopenharmony_ci#define GD_SPDIF_STATUS_NOCHANGE 0 32162306a36Sopenharmony_ci#define GD_SPDIF_STATUS_44 1 32262306a36Sopenharmony_ci#define GD_SPDIF_STATUS_48 2 32362306a36Sopenharmony_ci#define GD_SPDIF_STATUS_UNDEF 0xff 32462306a36Sopenharmony_ci 32562306a36Sopenharmony_ci 32662306a36Sopenharmony_ci/* 32762306a36Sopenharmony_ci * 32862306a36Sopenharmony_ci * Layla20 output clocks 32962306a36Sopenharmony_ci * 33062306a36Sopenharmony_ci */ 33162306a36Sopenharmony_ci 33262306a36Sopenharmony_ci#define LAYLA20_OUTPUT_CLOCK_SUPER 0 33362306a36Sopenharmony_ci#define LAYLA20_OUTPUT_CLOCK_WORD 1 33462306a36Sopenharmony_ci 33562306a36Sopenharmony_ci 33662306a36Sopenharmony_ci/**************************************************************************** 33762306a36Sopenharmony_ci 33862306a36Sopenharmony_ci Magic constants for the Darla24 hardware 33962306a36Sopenharmony_ci 34062306a36Sopenharmony_ci ****************************************************************************/ 34162306a36Sopenharmony_ci 34262306a36Sopenharmony_ci#define GD24_96000 0x0 34362306a36Sopenharmony_ci#define GD24_48000 0x1 34462306a36Sopenharmony_ci#define GD24_44100 0x2 34562306a36Sopenharmony_ci#define GD24_32000 0x3 34662306a36Sopenharmony_ci#define GD24_22050 0x4 34762306a36Sopenharmony_ci#define GD24_16000 0x5 34862306a36Sopenharmony_ci#define GD24_11025 0x6 34962306a36Sopenharmony_ci#define GD24_8000 0x7 35062306a36Sopenharmony_ci#define GD24_88200 0x8 35162306a36Sopenharmony_ci#define GD24_EXT_SYNC 0x9 35262306a36Sopenharmony_ci 35362306a36Sopenharmony_ci 35462306a36Sopenharmony_ci/* 35562306a36Sopenharmony_ci * 35662306a36Sopenharmony_ci * Return values from the DSP when ASIC is loaded 35762306a36Sopenharmony_ci * 35862306a36Sopenharmony_ci */ 35962306a36Sopenharmony_ci 36062306a36Sopenharmony_ci#define ASIC_ALREADY_LOADED 0x1 36162306a36Sopenharmony_ci#define ASIC_NOT_LOADED 0x0 36262306a36Sopenharmony_ci 36362306a36Sopenharmony_ci 36462306a36Sopenharmony_ci/* 36562306a36Sopenharmony_ci * 36662306a36Sopenharmony_ci * DSP Audio formats 36762306a36Sopenharmony_ci * 36862306a36Sopenharmony_ci * These are the audio formats that the DSP can transfer 36962306a36Sopenharmony_ci * via input and output pipes. LE means little-endian, 37062306a36Sopenharmony_ci * BE means big-endian. 37162306a36Sopenharmony_ci * 37262306a36Sopenharmony_ci * DSP_AUDIOFORM_MS_8 37362306a36Sopenharmony_ci * 37462306a36Sopenharmony_ci * 8-bit mono unsigned samples. For playback, 37562306a36Sopenharmony_ci * mono data is duplicated out the left and right channels 37662306a36Sopenharmony_ci * of the output bus. The "MS" part of the name 37762306a36Sopenharmony_ci * means mono->stereo. 37862306a36Sopenharmony_ci * 37962306a36Sopenharmony_ci * DSP_AUDIOFORM_MS_16LE 38062306a36Sopenharmony_ci * 38162306a36Sopenharmony_ci * 16-bit signed little-endian mono samples. Playback works 38262306a36Sopenharmony_ci * like the previous code. 38362306a36Sopenharmony_ci * 38462306a36Sopenharmony_ci * DSP_AUDIOFORM_MS_24LE 38562306a36Sopenharmony_ci * 38662306a36Sopenharmony_ci * 24-bit signed little-endian mono samples. Data is packed 38762306a36Sopenharmony_ci * three bytes per sample; if you had two samples 0x112233 and 0x445566 38862306a36Sopenharmony_ci * they would be stored in memory like this: 33 22 11 66 55 44. 38962306a36Sopenharmony_ci * 39062306a36Sopenharmony_ci * DSP_AUDIOFORM_MS_32LE 39162306a36Sopenharmony_ci * 39262306a36Sopenharmony_ci * 24-bit signed little-endian mono samples in a 32-bit 39362306a36Sopenharmony_ci * container. In other words, each sample is a 32-bit signed 39462306a36Sopenharmony_ci * integer, where the actual audio data is left-justified 39562306a36Sopenharmony_ci * in the 32 bits and only the 24 most significant bits are valid. 39662306a36Sopenharmony_ci * 39762306a36Sopenharmony_ci * DSP_AUDIOFORM_SS_8 39862306a36Sopenharmony_ci * DSP_AUDIOFORM_SS_16LE 39962306a36Sopenharmony_ci * DSP_AUDIOFORM_SS_24LE 40062306a36Sopenharmony_ci * DSP_AUDIOFORM_SS_32LE 40162306a36Sopenharmony_ci * 40262306a36Sopenharmony_ci * Like the previous ones, except now with stereo interleaved 40362306a36Sopenharmony_ci * data. "SS" means stereo->stereo. 40462306a36Sopenharmony_ci * 40562306a36Sopenharmony_ci * DSP_AUDIOFORM_MM_32LE 40662306a36Sopenharmony_ci * 40762306a36Sopenharmony_ci * Similar to DSP_AUDIOFORM_MS_32LE, except that the mono 40862306a36Sopenharmony_ci * data is not duplicated out both the left and right outputs. 40962306a36Sopenharmony_ci * This mode is used by the ASIO driver. Here, "MM" means 41062306a36Sopenharmony_ci * mono->mono. 41162306a36Sopenharmony_ci * 41262306a36Sopenharmony_ci * DSP_AUDIOFORM_MM_32BE 41362306a36Sopenharmony_ci * 41462306a36Sopenharmony_ci * Just like DSP_AUDIOFORM_MM_32LE, but now the data is 41562306a36Sopenharmony_ci * in big-endian format. 41662306a36Sopenharmony_ci * 41762306a36Sopenharmony_ci */ 41862306a36Sopenharmony_ci 41962306a36Sopenharmony_ci#define DSP_AUDIOFORM_MS_8 0 /* 8 bit mono */ 42062306a36Sopenharmony_ci#define DSP_AUDIOFORM_MS_16LE 1 /* 16 bit mono */ 42162306a36Sopenharmony_ci#define DSP_AUDIOFORM_MS_24LE 2 /* 24 bit mono */ 42262306a36Sopenharmony_ci#define DSP_AUDIOFORM_MS_32LE 3 /* 32 bit mono */ 42362306a36Sopenharmony_ci#define DSP_AUDIOFORM_SS_8 4 /* 8 bit stereo */ 42462306a36Sopenharmony_ci#define DSP_AUDIOFORM_SS_16LE 5 /* 16 bit stereo */ 42562306a36Sopenharmony_ci#define DSP_AUDIOFORM_SS_24LE 6 /* 24 bit stereo */ 42662306a36Sopenharmony_ci#define DSP_AUDIOFORM_SS_32LE 7 /* 32 bit stereo */ 42762306a36Sopenharmony_ci#define DSP_AUDIOFORM_MM_32LE 8 /* 32 bit mono->mono little-endian */ 42862306a36Sopenharmony_ci#define DSP_AUDIOFORM_MM_32BE 9 /* 32 bit mono->mono big-endian */ 42962306a36Sopenharmony_ci#define DSP_AUDIOFORM_SS_32BE 10 /* 32 bit stereo big endian */ 43062306a36Sopenharmony_ci#define DSP_AUDIOFORM_INVALID 0xFF /* Invalid audio format */ 43162306a36Sopenharmony_ci 43262306a36Sopenharmony_ci 43362306a36Sopenharmony_ci/* 43462306a36Sopenharmony_ci * 43562306a36Sopenharmony_ci * Super-interleave is defined as interleaving by 4 or more. Darla20 and Gina20 43662306a36Sopenharmony_ci * do not support super interleave. 43762306a36Sopenharmony_ci * 43862306a36Sopenharmony_ci * 16 bit, 24 bit, and 32 bit little endian samples are supported for super 43962306a36Sopenharmony_ci * interleave. The interleave factor must be even. 16 - way interleave is the 44062306a36Sopenharmony_ci * current maximum, so you can interleave by 4, 6, 8, 10, 12, 14, and 16. 44162306a36Sopenharmony_ci * 44262306a36Sopenharmony_ci * The actual format code is derived by taking the define below and or-ing with 44362306a36Sopenharmony_ci * the interleave factor. So, 32 bit interleave by 6 is 0x86 and 44462306a36Sopenharmony_ci * 16 bit interleave by 16 is (0x40 | 0x10) = 0x50. 44562306a36Sopenharmony_ci * 44662306a36Sopenharmony_ci */ 44762306a36Sopenharmony_ci 44862306a36Sopenharmony_ci#define DSP_AUDIOFORM_SUPER_INTERLEAVE_16LE 0x40 44962306a36Sopenharmony_ci#define DSP_AUDIOFORM_SUPER_INTERLEAVE_24LE 0xc0 45062306a36Sopenharmony_ci#define DSP_AUDIOFORM_SUPER_INTERLEAVE_32LE 0x80 45162306a36Sopenharmony_ci 45262306a36Sopenharmony_ci 45362306a36Sopenharmony_ci/* 45462306a36Sopenharmony_ci * 45562306a36Sopenharmony_ci * Gina24, Mona, and Layla24 control register defines 45662306a36Sopenharmony_ci * 45762306a36Sopenharmony_ci */ 45862306a36Sopenharmony_ci 45962306a36Sopenharmony_ci#define GML_CONVERTER_ENABLE 0x0010 46062306a36Sopenharmony_ci#define GML_SPDIF_PRO_MODE 0x0020 /* Professional S/PDIF == 1, 46162306a36Sopenharmony_ci consumer == 0 */ 46262306a36Sopenharmony_ci#define GML_SPDIF_SAMPLE_RATE0 0x0040 46362306a36Sopenharmony_ci#define GML_SPDIF_SAMPLE_RATE1 0x0080 46462306a36Sopenharmony_ci#define GML_SPDIF_TWO_CHANNEL 0x0100 /* 1 == two channels, 46562306a36Sopenharmony_ci 0 == one channel */ 46662306a36Sopenharmony_ci#define GML_SPDIF_NOT_AUDIO 0x0200 46762306a36Sopenharmony_ci#define GML_SPDIF_COPY_PERMIT 0x0400 46862306a36Sopenharmony_ci#define GML_SPDIF_24_BIT 0x0800 /* 1 == 24 bit, 0 == 20 bit */ 46962306a36Sopenharmony_ci#define GML_ADAT_MODE 0x1000 /* 1 == ADAT mode, 0 == S/PDIF mode */ 47062306a36Sopenharmony_ci#define GML_SPDIF_OPTICAL_MODE 0x2000 /* 1 == optical mode, 0 == RCA mode */ 47162306a36Sopenharmony_ci#define GML_SPDIF_CDROM_MODE 0x3000 /* 1 == CDROM mode, 47262306a36Sopenharmony_ci * 0 == RCA or optical mode */ 47362306a36Sopenharmony_ci#define GML_DOUBLE_SPEED_MODE 0x4000 /* 1 == double speed, 47462306a36Sopenharmony_ci 0 == single speed */ 47562306a36Sopenharmony_ci 47662306a36Sopenharmony_ci#define GML_DIGITAL_IN_AUTO_MUTE 0x800000 47762306a36Sopenharmony_ci 47862306a36Sopenharmony_ci#define GML_96KHZ (0x0 | GML_DOUBLE_SPEED_MODE) 47962306a36Sopenharmony_ci#define GML_88KHZ (0x1 | GML_DOUBLE_SPEED_MODE) 48062306a36Sopenharmony_ci#define GML_48KHZ 0x2 48162306a36Sopenharmony_ci#define GML_44KHZ 0x3 48262306a36Sopenharmony_ci#define GML_32KHZ 0x4 48362306a36Sopenharmony_ci#define GML_22KHZ 0x5 48462306a36Sopenharmony_ci#define GML_16KHZ 0x6 48562306a36Sopenharmony_ci#define GML_11KHZ 0x7 48662306a36Sopenharmony_ci#define GML_8KHZ 0x8 48762306a36Sopenharmony_ci#define GML_SPDIF_CLOCK 0x9 48862306a36Sopenharmony_ci#define GML_ADAT_CLOCK 0xA 48962306a36Sopenharmony_ci#define GML_WORD_CLOCK 0xB 49062306a36Sopenharmony_ci#define GML_ESYNC_CLOCK 0xC 49162306a36Sopenharmony_ci#define GML_ESYNCx2_CLOCK 0xD 49262306a36Sopenharmony_ci 49362306a36Sopenharmony_ci#define GML_CLOCK_CLEAR_MASK 0xffffbff0 49462306a36Sopenharmony_ci#define GML_SPDIF_RATE_CLEAR_MASK (~(GML_SPDIF_SAMPLE_RATE0|GML_SPDIF_SAMPLE_RATE1)) 49562306a36Sopenharmony_ci#define GML_DIGITAL_MODE_CLEAR_MASK 0xffffcfff 49662306a36Sopenharmony_ci#define GML_SPDIF_FORMAT_CLEAR_MASK 0xfffff01f 49762306a36Sopenharmony_ci 49862306a36Sopenharmony_ci 49962306a36Sopenharmony_ci/* 50062306a36Sopenharmony_ci * 50162306a36Sopenharmony_ci * Mia sample rate and clock setting constants 50262306a36Sopenharmony_ci * 50362306a36Sopenharmony_ci */ 50462306a36Sopenharmony_ci 50562306a36Sopenharmony_ci#define MIA_32000 0x0040 50662306a36Sopenharmony_ci#define MIA_44100 0x0042 50762306a36Sopenharmony_ci#define MIA_48000 0x0041 50862306a36Sopenharmony_ci#define MIA_88200 0x0142 50962306a36Sopenharmony_ci#define MIA_96000 0x0141 51062306a36Sopenharmony_ci 51162306a36Sopenharmony_ci#define MIA_SPDIF 0x00000044 51262306a36Sopenharmony_ci#define MIA_SPDIF96 0x00000144 51362306a36Sopenharmony_ci 51462306a36Sopenharmony_ci#define MIA_MIDI_REV 1 /* Must be Mia rev 1 for MIDI support */ 51562306a36Sopenharmony_ci 51662306a36Sopenharmony_ci 51762306a36Sopenharmony_ci/* 51862306a36Sopenharmony_ci * 51962306a36Sopenharmony_ci * 3G register bits 52062306a36Sopenharmony_ci * 52162306a36Sopenharmony_ci */ 52262306a36Sopenharmony_ci 52362306a36Sopenharmony_ci#define E3G_CONVERTER_ENABLE 0x0010 52462306a36Sopenharmony_ci#define E3G_SPDIF_PRO_MODE 0x0020 /* Professional S/PDIF == 1, 52562306a36Sopenharmony_ci consumer == 0 */ 52662306a36Sopenharmony_ci#define E3G_SPDIF_SAMPLE_RATE0 0x0040 52762306a36Sopenharmony_ci#define E3G_SPDIF_SAMPLE_RATE1 0x0080 52862306a36Sopenharmony_ci#define E3G_SPDIF_TWO_CHANNEL 0x0100 /* 1 == two channels, 52962306a36Sopenharmony_ci 0 == one channel */ 53062306a36Sopenharmony_ci#define E3G_SPDIF_NOT_AUDIO 0x0200 53162306a36Sopenharmony_ci#define E3G_SPDIF_COPY_PERMIT 0x0400 53262306a36Sopenharmony_ci#define E3G_SPDIF_24_BIT 0x0800 /* 1 == 24 bit, 0 == 20 bit */ 53362306a36Sopenharmony_ci#define E3G_DOUBLE_SPEED_MODE 0x4000 /* 1 == double speed, 53462306a36Sopenharmony_ci 0 == single speed */ 53562306a36Sopenharmony_ci#define E3G_PHANTOM_POWER 0x8000 /* 1 == phantom power on, 53662306a36Sopenharmony_ci 0 == phantom power off */ 53762306a36Sopenharmony_ci 53862306a36Sopenharmony_ci#define E3G_96KHZ (0x0 | E3G_DOUBLE_SPEED_MODE) 53962306a36Sopenharmony_ci#define E3G_88KHZ (0x1 | E3G_DOUBLE_SPEED_MODE) 54062306a36Sopenharmony_ci#define E3G_48KHZ 0x2 54162306a36Sopenharmony_ci#define E3G_44KHZ 0x3 54262306a36Sopenharmony_ci#define E3G_32KHZ 0x4 54362306a36Sopenharmony_ci#define E3G_22KHZ 0x5 54462306a36Sopenharmony_ci#define E3G_16KHZ 0x6 54562306a36Sopenharmony_ci#define E3G_11KHZ 0x7 54662306a36Sopenharmony_ci#define E3G_8KHZ 0x8 54762306a36Sopenharmony_ci#define E3G_SPDIF_CLOCK 0x9 54862306a36Sopenharmony_ci#define E3G_ADAT_CLOCK 0xA 54962306a36Sopenharmony_ci#define E3G_WORD_CLOCK 0xB 55062306a36Sopenharmony_ci#define E3G_CONTINUOUS_CLOCK 0xE 55162306a36Sopenharmony_ci 55262306a36Sopenharmony_ci#define E3G_ADAT_MODE 0x1000 55362306a36Sopenharmony_ci#define E3G_SPDIF_OPTICAL_MODE 0x2000 55462306a36Sopenharmony_ci 55562306a36Sopenharmony_ci#define E3G_CLOCK_CLEAR_MASK 0xbfffbff0 55662306a36Sopenharmony_ci#define E3G_DIGITAL_MODE_CLEAR_MASK 0xffffcfff 55762306a36Sopenharmony_ci#define E3G_SPDIF_FORMAT_CLEAR_MASK 0xfffff01f 55862306a36Sopenharmony_ci 55962306a36Sopenharmony_ci/* Clock detect bits reported by the DSP */ 56062306a36Sopenharmony_ci#define E3G_CLOCK_DETECT_BIT_WORD96 0x0001 56162306a36Sopenharmony_ci#define E3G_CLOCK_DETECT_BIT_WORD48 0x0002 56262306a36Sopenharmony_ci#define E3G_CLOCK_DETECT_BIT_SPDIF48 0x0004 56362306a36Sopenharmony_ci#define E3G_CLOCK_DETECT_BIT_ADAT 0x0004 56462306a36Sopenharmony_ci#define E3G_CLOCK_DETECT_BIT_SPDIF96 0x0008 56562306a36Sopenharmony_ci#define E3G_CLOCK_DETECT_BIT_WORD (E3G_CLOCK_DETECT_BIT_WORD96|E3G_CLOCK_DETECT_BIT_WORD48) 56662306a36Sopenharmony_ci#define E3G_CLOCK_DETECT_BIT_SPDIF (E3G_CLOCK_DETECT_BIT_SPDIF48|E3G_CLOCK_DETECT_BIT_SPDIF96) 56762306a36Sopenharmony_ci 56862306a36Sopenharmony_ci/* Frequency control register */ 56962306a36Sopenharmony_ci#define E3G_MAGIC_NUMBER 677376000 57062306a36Sopenharmony_ci#define E3G_FREQ_REG_DEFAULT (E3G_MAGIC_NUMBER / 48000 - 2) 57162306a36Sopenharmony_ci#define E3G_FREQ_REG_MAX 0xffff 57262306a36Sopenharmony_ci 57362306a36Sopenharmony_ci/* 3G external box types */ 57462306a36Sopenharmony_ci#define E3G_GINA3G_BOX_TYPE 0x00 57562306a36Sopenharmony_ci#define E3G_LAYLA3G_BOX_TYPE 0x10 57662306a36Sopenharmony_ci#define E3G_ASIC_NOT_LOADED 0xffff 57762306a36Sopenharmony_ci#define E3G_BOX_TYPE_MASK 0xf0 57862306a36Sopenharmony_ci 57962306a36Sopenharmony_ci/* Indigo express control register values */ 58062306a36Sopenharmony_ci#define INDIGO_EXPRESS_32000 0x02 58162306a36Sopenharmony_ci#define INDIGO_EXPRESS_44100 0x01 58262306a36Sopenharmony_ci#define INDIGO_EXPRESS_48000 0x00 58362306a36Sopenharmony_ci#define INDIGO_EXPRESS_DOUBLE_SPEED 0x10 58462306a36Sopenharmony_ci#define INDIGO_EXPRESS_QUAD_SPEED 0x04 58562306a36Sopenharmony_ci#define INDIGO_EXPRESS_CLOCK_MASK 0x17 58662306a36Sopenharmony_ci 58762306a36Sopenharmony_ci 58862306a36Sopenharmony_ci/* 58962306a36Sopenharmony_ci * 59062306a36Sopenharmony_ci * Gina20 & Layla20 have input gain controls for the analog inputs; 59162306a36Sopenharmony_ci * this is the magic number for the hardware that gives you 0 dB at -10. 59262306a36Sopenharmony_ci * 59362306a36Sopenharmony_ci */ 59462306a36Sopenharmony_ci 59562306a36Sopenharmony_ci#define GL20_INPUT_GAIN_MAGIC_NUMBER 0xC8 59662306a36Sopenharmony_ci 59762306a36Sopenharmony_ci 59862306a36Sopenharmony_ci/* 59962306a36Sopenharmony_ci * 60062306a36Sopenharmony_ci * Defines how much time must pass between DSP load attempts 60162306a36Sopenharmony_ci * 60262306a36Sopenharmony_ci */ 60362306a36Sopenharmony_ci 60462306a36Sopenharmony_ci#define DSP_LOAD_ATTEMPT_PERIOD 1000000L /* One second */ 60562306a36Sopenharmony_ci 60662306a36Sopenharmony_ci 60762306a36Sopenharmony_ci/* 60862306a36Sopenharmony_ci * 60962306a36Sopenharmony_ci * Size of arrays for the comm page. MAX_PLAY_TAPS and MAX_REC_TAPS are 61062306a36Sopenharmony_ci * no longer used, but the sizes must still be right for the DSP to see 61162306a36Sopenharmony_ci * the comm page correctly. 61262306a36Sopenharmony_ci * 61362306a36Sopenharmony_ci */ 61462306a36Sopenharmony_ci 61562306a36Sopenharmony_ci#define MONITOR_ARRAY_SIZE 0x180 61662306a36Sopenharmony_ci#define VMIXER_ARRAY_SIZE 0x40 61762306a36Sopenharmony_ci#define MIDI_OUT_BUFFER_SIZE 32 61862306a36Sopenharmony_ci#define MIDI_IN_BUFFER_SIZE 256 61962306a36Sopenharmony_ci#define MAX_PLAY_TAPS 168 62062306a36Sopenharmony_ci#define MAX_REC_TAPS 192 62162306a36Sopenharmony_ci#define DSP_MIDI_OUT_FIFO_SIZE 64 62262306a36Sopenharmony_ci 62362306a36Sopenharmony_ci 62462306a36Sopenharmony_ci/* sg_entry is a single entry for the scatter-gather list. The array of struct 62562306a36Sopenharmony_cisg_entry struct is read by the DSP, so all values must be little-endian. */ 62662306a36Sopenharmony_ci 62762306a36Sopenharmony_ci#define MAX_SGLIST_ENTRIES 512 62862306a36Sopenharmony_ci 62962306a36Sopenharmony_cistruct sg_entry { 63062306a36Sopenharmony_ci __le32 addr; 63162306a36Sopenharmony_ci __le32 size; 63262306a36Sopenharmony_ci}; 63362306a36Sopenharmony_ci 63462306a36Sopenharmony_ci 63562306a36Sopenharmony_ci/**************************************************************************** 63662306a36Sopenharmony_ci 63762306a36Sopenharmony_ci The comm page. This structure is read and written by the DSP; the 63862306a36Sopenharmony_ci DSP code is a firm believer in the byte offsets written in the comments 63962306a36Sopenharmony_ci at the end of each line. This structure should not be changed. 64062306a36Sopenharmony_ci 64162306a36Sopenharmony_ci Any reads from or writes to this structure should be in little-endian format. 64262306a36Sopenharmony_ci 64362306a36Sopenharmony_ci ****************************************************************************/ 64462306a36Sopenharmony_ci 64562306a36Sopenharmony_cistruct comm_page { /* Base Length*/ 64662306a36Sopenharmony_ci __le32 comm_size; /* size of this object 0x000 4 */ 64762306a36Sopenharmony_ci __le32 flags; /* See Appendix A below 0x004 4 */ 64862306a36Sopenharmony_ci __le32 unused; /* Unused entry 0x008 4 */ 64962306a36Sopenharmony_ci __le32 sample_rate; /* Card sample rate in Hz 0x00c 4 */ 65062306a36Sopenharmony_ci __le32 handshake; /* DSP command handshake 0x010 4 */ 65162306a36Sopenharmony_ci __le32 cmd_start; /* Chs. to start mask 0x014 4 */ 65262306a36Sopenharmony_ci __le32 cmd_stop; /* Chs. to stop mask 0x018 4 */ 65362306a36Sopenharmony_ci __le32 cmd_reset; /* Chs. to reset mask 0x01c 4 */ 65462306a36Sopenharmony_ci __le16 audio_format[DSP_MAXPIPES]; /* Chs. audio format 0x020 32*2 */ 65562306a36Sopenharmony_ci struct sg_entry sglist_addr[DSP_MAXPIPES]; 65662306a36Sopenharmony_ci /* Chs. Physical sglist addrs 0x060 32*8 */ 65762306a36Sopenharmony_ci __le32 position[DSP_MAXPIPES]; 65862306a36Sopenharmony_ci /* Positions for ea. ch. 0x160 32*4 */ 65962306a36Sopenharmony_ci s8 vu_meter[DSP_MAXPIPES]; 66062306a36Sopenharmony_ci /* VU meters 0x1e0 32*1 */ 66162306a36Sopenharmony_ci s8 peak_meter[DSP_MAXPIPES]; 66262306a36Sopenharmony_ci /* Peak meters 0x200 32*1 */ 66362306a36Sopenharmony_ci s8 line_out_level[DSP_MAXAUDIOOUTPUTS]; 66462306a36Sopenharmony_ci /* Output gain 0x220 16*1 */ 66562306a36Sopenharmony_ci s8 line_in_level[DSP_MAXAUDIOINPUTS]; 66662306a36Sopenharmony_ci /* Input gain 0x230 16*1 */ 66762306a36Sopenharmony_ci s8 monitors[MONITOR_ARRAY_SIZE]; 66862306a36Sopenharmony_ci /* Monitor map 0x240 0x180 */ 66962306a36Sopenharmony_ci __le32 play_coeff[MAX_PLAY_TAPS]; 67062306a36Sopenharmony_ci /* Gina/Darla play filters - obsolete 0x3c0 168*4 */ 67162306a36Sopenharmony_ci __le32 rec_coeff[MAX_REC_TAPS]; 67262306a36Sopenharmony_ci /* Gina/Darla record filters - obsolete 0x660 192*4 */ 67362306a36Sopenharmony_ci __le16 midi_input[MIDI_IN_BUFFER_SIZE]; 67462306a36Sopenharmony_ci /* MIDI input data transfer buffer 0x960 256*2 */ 67562306a36Sopenharmony_ci u8 gd_clock_state; /* Chg Gina/Darla clock state 0xb60 1 */ 67662306a36Sopenharmony_ci u8 gd_spdif_status; /* Chg. Gina/Darla S/PDIF state 0xb61 1 */ 67762306a36Sopenharmony_ci u8 gd_resampler_state; /* Should always be 3 0xb62 1 */ 67862306a36Sopenharmony_ci u8 filler2; /* 0xb63 1 */ 67962306a36Sopenharmony_ci __le32 nominal_level_mask; /* -10 level enable mask 0xb64 4 */ 68062306a36Sopenharmony_ci __le16 input_clock; /* Chg. Input clock state 0xb68 2 */ 68162306a36Sopenharmony_ci __le16 output_clock; /* Chg. Output clock state 0xb6a 2 */ 68262306a36Sopenharmony_ci __le32 status_clocks; /* Current Input clock state 0xb6c 4 */ 68362306a36Sopenharmony_ci __le32 ext_box_status; /* External box status 0xb70 4 */ 68462306a36Sopenharmony_ci __le32 cmd_add_buffer; /* Pipes to add (obsolete) 0xb74 4 */ 68562306a36Sopenharmony_ci __le32 midi_out_free_count; 68662306a36Sopenharmony_ci /* # of bytes free in MIDI output FIFO 0xb78 4 */ 68762306a36Sopenharmony_ci __le32 unused2; /* Cyclic pipes 0xb7c 4 */ 68862306a36Sopenharmony_ci __le32 control_register; 68962306a36Sopenharmony_ci /* Mona, Gina24, Layla24, 3G ctrl reg 0xb80 4 */ 69062306a36Sopenharmony_ci __le32 e3g_frq_register; /* 3G frequency register 0xb84 4 */ 69162306a36Sopenharmony_ci u8 filler[24]; /* filler 0xb88 24*1 */ 69262306a36Sopenharmony_ci s8 vmixer[VMIXER_ARRAY_SIZE]; 69362306a36Sopenharmony_ci /* Vmixer levels 0xba0 64*1 */ 69462306a36Sopenharmony_ci u8 midi_output[MIDI_OUT_BUFFER_SIZE]; 69562306a36Sopenharmony_ci /* MIDI output data 0xbe0 32*1 */ 69662306a36Sopenharmony_ci}; 69762306a36Sopenharmony_ci 69862306a36Sopenharmony_ci#endif /* _ECHO_DSP_ */ 699