162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 262306a36Sopenharmony_ci/* -*- linux-c -*- * 362306a36Sopenharmony_ci * 462306a36Sopenharmony_ci * ALSA driver for the digigram lx6464es interface 562306a36Sopenharmony_ci * adapted upstream headers 662306a36Sopenharmony_ci * 762306a36Sopenharmony_ci * Copyright (c) 2009 Tim Blechmann <tim@klingt.org> 862306a36Sopenharmony_ci */ 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci#ifndef LX_DEFS_H 1162306a36Sopenharmony_ci#define LX_DEFS_H 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ci/* code adapted from ethersound.h */ 1462306a36Sopenharmony_ci#define XES_FREQ_COUNT8_MASK 0x00001FFF /* compteur 25MHz entre 8 ech. */ 1562306a36Sopenharmony_ci#define XES_FREQ_COUNT8_44_MIN 0x00001288 /* 25M / 1662306a36Sopenharmony_ci * [ 44k - ( 44.1k + 48k ) / 2 ] 1762306a36Sopenharmony_ci * * 8 */ 1862306a36Sopenharmony_ci#define XES_FREQ_COUNT8_44_MAX 0x000010F0 /* 25M / [ ( 44.1k + 48k ) / 2 ] 1962306a36Sopenharmony_ci * * 8 */ 2062306a36Sopenharmony_ci#define XES_FREQ_COUNT8_48_MAX 0x00000F08 /* 25M / 2162306a36Sopenharmony_ci * [ 48k + ( 44.1k + 48k ) / 2 ] 2262306a36Sopenharmony_ci * * 8 */ 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ci/* code adapted from LXES_registers.h */ 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ci#define IOCR_OUTPUTS_OFFSET 0 /* (rw) offset for the number of OUTs in the 2762306a36Sopenharmony_ci * ConfES register. */ 2862306a36Sopenharmony_ci#define IOCR_INPUTS_OFFSET 8 /* (rw) offset for the number of INs in the 2962306a36Sopenharmony_ci * ConfES register. */ 3062306a36Sopenharmony_ci#define FREQ_RATIO_OFFSET 19 /* (rw) offset for frequency ratio in the 3162306a36Sopenharmony_ci * ConfES register. */ 3262306a36Sopenharmony_ci#define FREQ_RATIO_SINGLE_MODE 0x01 /* value for single mode frequency ratio: 3362306a36Sopenharmony_ci * sample rate = frequency rate. */ 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ci#define CONFES_READ_PART_MASK 0x00070000 3662306a36Sopenharmony_ci#define CONFES_WRITE_PART_MASK 0x00F80000 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ci/* code adapted from if_drv_mb.h */ 3962306a36Sopenharmony_ci 4062306a36Sopenharmony_ci#define MASK_SYS_STATUS_ERROR (1L << 31) /* events that lead to a PCI irq if 4162306a36Sopenharmony_ci * not yet pending */ 4262306a36Sopenharmony_ci#define MASK_SYS_STATUS_URUN (1L << 30) 4362306a36Sopenharmony_ci#define MASK_SYS_STATUS_ORUN (1L << 29) 4462306a36Sopenharmony_ci#define MASK_SYS_STATUS_EOBO (1L << 28) 4562306a36Sopenharmony_ci#define MASK_SYS_STATUS_EOBI (1L << 27) 4662306a36Sopenharmony_ci#define MASK_SYS_STATUS_FREQ (1L << 26) 4762306a36Sopenharmony_ci#define MASK_SYS_STATUS_ESA (1L << 25) /* reserved, this is set by the 4862306a36Sopenharmony_ci * XES */ 4962306a36Sopenharmony_ci#define MASK_SYS_STATUS_TIMER (1L << 24) 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ci#define MASK_SYS_ASYNC_EVENTS (MASK_SYS_STATUS_ERROR | \ 5262306a36Sopenharmony_ci MASK_SYS_STATUS_URUN | \ 5362306a36Sopenharmony_ci MASK_SYS_STATUS_ORUN | \ 5462306a36Sopenharmony_ci MASK_SYS_STATUS_EOBO | \ 5562306a36Sopenharmony_ci MASK_SYS_STATUS_EOBI | \ 5662306a36Sopenharmony_ci MASK_SYS_STATUS_FREQ | \ 5762306a36Sopenharmony_ci MASK_SYS_STATUS_ESA) 5862306a36Sopenharmony_ci 5962306a36Sopenharmony_ci#define MASK_SYS_PCI_EVENTS (MASK_SYS_ASYNC_EVENTS | \ 6062306a36Sopenharmony_ci MASK_SYS_STATUS_TIMER) 6162306a36Sopenharmony_ci 6262306a36Sopenharmony_ci#define MASK_SYS_TIMER_COUNT 0x0000FFFF 6362306a36Sopenharmony_ci 6462306a36Sopenharmony_ci#define MASK_SYS_STATUS_EOT_PLX (1L << 22) /* event that remains 6562306a36Sopenharmony_ci * internal: reserved fo end 6662306a36Sopenharmony_ci * of plx dma */ 6762306a36Sopenharmony_ci#define MASK_SYS_STATUS_XES (1L << 21) /* event that remains 6862306a36Sopenharmony_ci * internal: pending XES 6962306a36Sopenharmony_ci * IRQ */ 7062306a36Sopenharmony_ci#define MASK_SYS_STATUS_CMD_DONE (1L << 20) /* alternate command 7162306a36Sopenharmony_ci * management: notify driver 7262306a36Sopenharmony_ci * instead of polling */ 7362306a36Sopenharmony_ci 7462306a36Sopenharmony_ci 7562306a36Sopenharmony_ci#define MAX_STREAM_BUFFER 5 /* max amount of stream buffers. */ 7662306a36Sopenharmony_ci 7762306a36Sopenharmony_ci#define MICROBLAZE_IBL_MIN 32 7862306a36Sopenharmony_ci#define MICROBLAZE_IBL_DEFAULT 128 7962306a36Sopenharmony_ci#define MICROBLAZE_IBL_MAX 512 8062306a36Sopenharmony_ci/* #define MASK_GRANULARITY (2*MICROBLAZE_IBL_MAX-1) */ 8162306a36Sopenharmony_ci 8262306a36Sopenharmony_ci 8362306a36Sopenharmony_ci 8462306a36Sopenharmony_ci/* command opcodes, see reference for details */ 8562306a36Sopenharmony_ci 8662306a36Sopenharmony_ci/* 8762306a36Sopenharmony_ci the capture bit position in the object_id field in driver commands 8862306a36Sopenharmony_ci depends upon the number of managed channels. For now, 64 IN + 64 OUT are 8962306a36Sopenharmony_ci supported. HOwever, the communication protocol forsees 1024 channels, hence 9062306a36Sopenharmony_ci bit 10 indicates a capture (input) object). 9162306a36Sopenharmony_ci*/ 9262306a36Sopenharmony_ci#define ID_IS_CAPTURE (1L << 10) 9362306a36Sopenharmony_ci#define ID_OFFSET 13 /* object ID is at the 13th bit in the 9462306a36Sopenharmony_ci * 1st command word.*/ 9562306a36Sopenharmony_ci#define ID_CH_MASK 0x3F 9662306a36Sopenharmony_ci#define OPCODE_OFFSET 24 /* offset of the command opcode in the first 9762306a36Sopenharmony_ci * command word.*/ 9862306a36Sopenharmony_ci 9962306a36Sopenharmony_cienum cmd_mb_opcodes { 10062306a36Sopenharmony_ci CMD_00_INFO_DEBUG = 0x00, 10162306a36Sopenharmony_ci CMD_01_GET_SYS_CFG = 0x01, 10262306a36Sopenharmony_ci CMD_02_SET_GRANULARITY = 0x02, 10362306a36Sopenharmony_ci CMD_03_SET_TIMER_IRQ = 0x03, 10462306a36Sopenharmony_ci CMD_04_GET_EVENT = 0x04, 10562306a36Sopenharmony_ci CMD_05_GET_PIPES = 0x05, 10662306a36Sopenharmony_ci 10762306a36Sopenharmony_ci CMD_06_ALLOCATE_PIPE = 0x06, 10862306a36Sopenharmony_ci CMD_07_RELEASE_PIPE = 0x07, 10962306a36Sopenharmony_ci CMD_08_ASK_BUFFERS = 0x08, 11062306a36Sopenharmony_ci CMD_09_STOP_PIPE = 0x09, 11162306a36Sopenharmony_ci CMD_0A_GET_PIPE_SPL_COUNT = 0x0a, 11262306a36Sopenharmony_ci CMD_0B_TOGGLE_PIPE_STATE = 0x0b, 11362306a36Sopenharmony_ci 11462306a36Sopenharmony_ci CMD_0C_DEF_STREAM = 0x0c, 11562306a36Sopenharmony_ci CMD_0D_SET_MUTE = 0x0d, 11662306a36Sopenharmony_ci CMD_0E_GET_STREAM_SPL_COUNT = 0x0e, 11762306a36Sopenharmony_ci CMD_0F_UPDATE_BUFFER = 0x0f, 11862306a36Sopenharmony_ci CMD_10_GET_BUFFER = 0x10, 11962306a36Sopenharmony_ci CMD_11_CANCEL_BUFFER = 0x11, 12062306a36Sopenharmony_ci CMD_12_GET_PEAK = 0x12, 12162306a36Sopenharmony_ci CMD_13_SET_STREAM_STATE = 0x13, 12262306a36Sopenharmony_ci CMD_14_INVALID = 0x14, 12362306a36Sopenharmony_ci}; 12462306a36Sopenharmony_ci 12562306a36Sopenharmony_ci/* pipe states */ 12662306a36Sopenharmony_cienum pipe_state_t { 12762306a36Sopenharmony_ci PSTATE_IDLE = 0, /* the pipe is not processed in the XES_IRQ 12862306a36Sopenharmony_ci * (free or stopped, or paused). */ 12962306a36Sopenharmony_ci PSTATE_RUN = 1, /* sustained play/record state. */ 13062306a36Sopenharmony_ci PSTATE_PURGE = 2, /* the ES channels are now off, render pipes do 13162306a36Sopenharmony_ci * not DMA, record pipe do a last DMA. */ 13262306a36Sopenharmony_ci PSTATE_ACQUIRE = 3, /* the ES channels are now on, render pipes do 13362306a36Sopenharmony_ci * not yet increase their sample count, record 13462306a36Sopenharmony_ci * pipes do not DMA. */ 13562306a36Sopenharmony_ci PSTATE_CLOSING = 4, /* the pipe is releasing, and may not yet 13662306a36Sopenharmony_ci * receive an "alloc" command. */ 13762306a36Sopenharmony_ci}; 13862306a36Sopenharmony_ci 13962306a36Sopenharmony_ci/* stream states */ 14062306a36Sopenharmony_cienum stream_state_t { 14162306a36Sopenharmony_ci SSTATE_STOP = 0x00, /* setting to stop resets the stream spl 14262306a36Sopenharmony_ci * count.*/ 14362306a36Sopenharmony_ci SSTATE_RUN = (0x01 << 0), /* start DMA and spl count handling. */ 14462306a36Sopenharmony_ci SSTATE_PAUSE = (0x01 << 1), /* pause DMA and spl count handling. */ 14562306a36Sopenharmony_ci}; 14662306a36Sopenharmony_ci 14762306a36Sopenharmony_ci/* buffer flags */ 14862306a36Sopenharmony_cienum buffer_flags { 14962306a36Sopenharmony_ci BF_VALID = 0x80, /* set if the buffer is valid, clear if free.*/ 15062306a36Sopenharmony_ci BF_CURRENT = 0x40, /* set if this is the current buffer (there is 15162306a36Sopenharmony_ci * always a current buffer).*/ 15262306a36Sopenharmony_ci BF_NOTIFY_EOB = 0x20, /* set if this buffer must cause a PCI event 15362306a36Sopenharmony_ci * when finished.*/ 15462306a36Sopenharmony_ci BF_CIRCULAR = 0x10, /* set if buffer[1] must be copied to buffer[0] 15562306a36Sopenharmony_ci * by the end of this buffer.*/ 15662306a36Sopenharmony_ci BF_64BITS_ADR = 0x08, /* set if the hi part of the address is valid.*/ 15762306a36Sopenharmony_ci BF_xx = 0x04, /* future extension.*/ 15862306a36Sopenharmony_ci BF_EOB = 0x02, /* set if finished, but not yet free.*/ 15962306a36Sopenharmony_ci BF_PAUSE = 0x01, /* pause stream at buffer end.*/ 16062306a36Sopenharmony_ci BF_ZERO = 0x00, /* no flags (init).*/ 16162306a36Sopenharmony_ci}; 16262306a36Sopenharmony_ci 16362306a36Sopenharmony_ci/* 16462306a36Sopenharmony_ci* Stream Flags definitions 16562306a36Sopenharmony_ci*/ 16662306a36Sopenharmony_cienum stream_flags { 16762306a36Sopenharmony_ci SF_ZERO = 0x00000000, /* no flags (stream invalid). */ 16862306a36Sopenharmony_ci SF_VALID = 0x10000000, /* the stream has a valid DMA_conf 16962306a36Sopenharmony_ci * info (setstreamformat). */ 17062306a36Sopenharmony_ci SF_XRUN = 0x20000000, /* the stream is un x-run state. */ 17162306a36Sopenharmony_ci SF_START = 0x40000000, /* the DMA is running.*/ 17262306a36Sopenharmony_ci SF_ASIO = 0x80000000, /* ASIO.*/ 17362306a36Sopenharmony_ci}; 17462306a36Sopenharmony_ci 17562306a36Sopenharmony_ci 17662306a36Sopenharmony_ci#define MASK_SPL_COUNT_HI 0x00FFFFFF /* 4 MSBits are status bits */ 17762306a36Sopenharmony_ci#define PSTATE_OFFSET 28 /* 4 MSBits are status bits */ 17862306a36Sopenharmony_ci 17962306a36Sopenharmony_ci 18062306a36Sopenharmony_ci#define MASK_STREAM_HAS_MAPPING (1L << 12) 18162306a36Sopenharmony_ci#define MASK_STREAM_IS_ASIO (1L << 9) 18262306a36Sopenharmony_ci#define STREAM_FMT_OFFSET 10 /* the stream fmt bits start at the 10th 18362306a36Sopenharmony_ci * bit in the command word. */ 18462306a36Sopenharmony_ci 18562306a36Sopenharmony_ci#define STREAM_FMT_16b 0x02 18662306a36Sopenharmony_ci#define STREAM_FMT_intel 0x01 18762306a36Sopenharmony_ci 18862306a36Sopenharmony_ci#define FREQ_FIELD_OFFSET 15 /* offset of the freq field in the response 18962306a36Sopenharmony_ci * word */ 19062306a36Sopenharmony_ci 19162306a36Sopenharmony_ci#define BUFF_FLAGS_OFFSET 24 /* offset of the buffer flags in the 19262306a36Sopenharmony_ci * response word. */ 19362306a36Sopenharmony_ci#define MASK_DATA_SIZE 0x00FFFFFF /* this must match the field size of 19462306a36Sopenharmony_ci * datasize in the buffer_t structure. */ 19562306a36Sopenharmony_ci 19662306a36Sopenharmony_ci#define MASK_BUFFER_ID 0xFF /* the cancel command awaits a buffer ID, 19762306a36Sopenharmony_ci * may be 0xFF for "current". */ 19862306a36Sopenharmony_ci 19962306a36Sopenharmony_ci 20062306a36Sopenharmony_ci/* code adapted from PcxErr_e.h */ 20162306a36Sopenharmony_ci 20262306a36Sopenharmony_ci/* Bits masks */ 20362306a36Sopenharmony_ci 20462306a36Sopenharmony_ci#define ERROR_MASK 0x8000 20562306a36Sopenharmony_ci 20662306a36Sopenharmony_ci#define SOURCE_MASK 0x7800 20762306a36Sopenharmony_ci 20862306a36Sopenharmony_ci#define E_SOURCE_BOARD 0x4000 /* 8 >> 1 */ 20962306a36Sopenharmony_ci#define E_SOURCE_DRV 0x2000 /* 4 >> 1 */ 21062306a36Sopenharmony_ci#define E_SOURCE_API 0x1000 /* 2 >> 1 */ 21162306a36Sopenharmony_ci/* Error tools */ 21262306a36Sopenharmony_ci#define E_SOURCE_TOOLS 0x0800 /* 1 >> 1 */ 21362306a36Sopenharmony_ci/* Error pcxaudio */ 21462306a36Sopenharmony_ci#define E_SOURCE_AUDIO 0x1800 /* 3 >> 1 */ 21562306a36Sopenharmony_ci/* Error virtual pcx */ 21662306a36Sopenharmony_ci#define E_SOURCE_VPCX 0x2800 /* 5 >> 1 */ 21762306a36Sopenharmony_ci/* Error dispatcher */ 21862306a36Sopenharmony_ci#define E_SOURCE_DISPATCHER 0x3000 /* 6 >> 1 */ 21962306a36Sopenharmony_ci/* Error from CobraNet firmware */ 22062306a36Sopenharmony_ci#define E_SOURCE_COBRANET 0x3800 /* 7 >> 1 */ 22162306a36Sopenharmony_ci 22262306a36Sopenharmony_ci#define E_SOURCE_USER 0x7800 22362306a36Sopenharmony_ci 22462306a36Sopenharmony_ci#define CLASS_MASK 0x0700 22562306a36Sopenharmony_ci 22662306a36Sopenharmony_ci#define CODE_MASK 0x00FF 22762306a36Sopenharmony_ci 22862306a36Sopenharmony_ci/* Bits values */ 22962306a36Sopenharmony_ci 23062306a36Sopenharmony_ci/* Values for the error/warning bit */ 23162306a36Sopenharmony_ci#define ERROR_VALUE 0x8000 23262306a36Sopenharmony_ci#define WARNING_VALUE 0x0000 23362306a36Sopenharmony_ci 23462306a36Sopenharmony_ci/* Class values */ 23562306a36Sopenharmony_ci#define E_CLASS_GENERAL 0x0000 23662306a36Sopenharmony_ci#define E_CLASS_INVALID_CMD 0x0100 23762306a36Sopenharmony_ci#define E_CLASS_INVALID_STD_OBJECT 0x0200 23862306a36Sopenharmony_ci#define E_CLASS_RSRC_IMPOSSIBLE 0x0300 23962306a36Sopenharmony_ci#define E_CLASS_WRONG_CONTEXT 0x0400 24062306a36Sopenharmony_ci#define E_CLASS_BAD_SPECIFIC_PARAMETER 0x0500 24162306a36Sopenharmony_ci#define E_CLASS_REAL_TIME_ERROR 0x0600 24262306a36Sopenharmony_ci#define E_CLASS_DIRECTSHOW 0x0700 24362306a36Sopenharmony_ci#define E_CLASS_FREE 0x0700 24462306a36Sopenharmony_ci 24562306a36Sopenharmony_ci 24662306a36Sopenharmony_ci/* Complete DRV error code for the general class */ 24762306a36Sopenharmony_ci#define ED_GN (ERROR_VALUE | E_SOURCE_DRV | E_CLASS_GENERAL) 24862306a36Sopenharmony_ci#define ED_CONCURRENCY (ED_GN | 0x01) 24962306a36Sopenharmony_ci#define ED_DSP_CRASHED (ED_GN | 0x02) 25062306a36Sopenharmony_ci#define ED_UNKNOWN_BOARD (ED_GN | 0x03) 25162306a36Sopenharmony_ci#define ED_NOT_INSTALLED (ED_GN | 0x04) 25262306a36Sopenharmony_ci#define ED_CANNOT_OPEN_SVC_MANAGER (ED_GN | 0x05) 25362306a36Sopenharmony_ci#define ED_CANNOT_READ_REGISTRY (ED_GN | 0x06) 25462306a36Sopenharmony_ci#define ED_DSP_VERSION_MISMATCH (ED_GN | 0x07) 25562306a36Sopenharmony_ci#define ED_UNAVAILABLE_FEATURE (ED_GN | 0x08) 25662306a36Sopenharmony_ci#define ED_CANCELLED (ED_GN | 0x09) 25762306a36Sopenharmony_ci#define ED_NO_RESPONSE_AT_IRQA (ED_GN | 0x10) 25862306a36Sopenharmony_ci#define ED_INVALID_ADDRESS (ED_GN | 0x11) 25962306a36Sopenharmony_ci#define ED_DSP_CORRUPTED (ED_GN | 0x12) 26062306a36Sopenharmony_ci#define ED_PENDING_OPERATION (ED_GN | 0x13) 26162306a36Sopenharmony_ci#define ED_NET_ALLOCATE_MEMORY_IMPOSSIBLE (ED_GN | 0x14) 26262306a36Sopenharmony_ci#define ED_NET_REGISTER_ERROR (ED_GN | 0x15) 26362306a36Sopenharmony_ci#define ED_NET_THREAD_ERROR (ED_GN | 0x16) 26462306a36Sopenharmony_ci#define ED_NET_OPEN_ERROR (ED_GN | 0x17) 26562306a36Sopenharmony_ci#define ED_NET_CLOSE_ERROR (ED_GN | 0x18) 26662306a36Sopenharmony_ci#define ED_NET_NO_MORE_PACKET (ED_GN | 0x19) 26762306a36Sopenharmony_ci#define ED_NET_NO_MORE_BUFFER (ED_GN | 0x1A) 26862306a36Sopenharmony_ci#define ED_NET_SEND_ERROR (ED_GN | 0x1B) 26962306a36Sopenharmony_ci#define ED_NET_RECEIVE_ERROR (ED_GN | 0x1C) 27062306a36Sopenharmony_ci#define ED_NET_WRONG_MSG_SIZE (ED_GN | 0x1D) 27162306a36Sopenharmony_ci#define ED_NET_WAIT_ERROR (ED_GN | 0x1E) 27262306a36Sopenharmony_ci#define ED_NET_EEPROM_ERROR (ED_GN | 0x1F) 27362306a36Sopenharmony_ci#define ED_INVALID_RS232_COM_NUMBER (ED_GN | 0x20) 27462306a36Sopenharmony_ci#define ED_INVALID_RS232_INIT (ED_GN | 0x21) 27562306a36Sopenharmony_ci#define ED_FILE_ERROR (ED_GN | 0x22) 27662306a36Sopenharmony_ci#define ED_INVALID_GPIO_CMD (ED_GN | 0x23) 27762306a36Sopenharmony_ci#define ED_RS232_ALREADY_OPENED (ED_GN | 0x24) 27862306a36Sopenharmony_ci#define ED_RS232_NOT_OPENED (ED_GN | 0x25) 27962306a36Sopenharmony_ci#define ED_GPIO_ALREADY_OPENED (ED_GN | 0x26) 28062306a36Sopenharmony_ci#define ED_GPIO_NOT_OPENED (ED_GN | 0x27) 28162306a36Sopenharmony_ci#define ED_REGISTRY_ERROR (ED_GN | 0x28) /* <- NCX */ 28262306a36Sopenharmony_ci#define ED_INVALID_SERVICE (ED_GN | 0x29) /* <- NCX */ 28362306a36Sopenharmony_ci 28462306a36Sopenharmony_ci#define ED_READ_FILE_ALREADY_OPENED (ED_GN | 0x2a) /* <- Decalage 28562306a36Sopenharmony_ci * pour RCX 28662306a36Sopenharmony_ci * (old 0x28) 28762306a36Sopenharmony_ci * */ 28862306a36Sopenharmony_ci#define ED_READ_FILE_INVALID_COMMAND (ED_GN | 0x2b) /* ~ */ 28962306a36Sopenharmony_ci#define ED_READ_FILE_INVALID_PARAMETER (ED_GN | 0x2c) /* ~ */ 29062306a36Sopenharmony_ci#define ED_READ_FILE_ALREADY_CLOSED (ED_GN | 0x2d) /* ~ */ 29162306a36Sopenharmony_ci#define ED_READ_FILE_NO_INFORMATION (ED_GN | 0x2e) /* ~ */ 29262306a36Sopenharmony_ci#define ED_READ_FILE_INVALID_HANDLE (ED_GN | 0x2f) /* ~ */ 29362306a36Sopenharmony_ci#define ED_READ_FILE_END_OF_FILE (ED_GN | 0x30) /* ~ */ 29462306a36Sopenharmony_ci#define ED_READ_FILE_ERROR (ED_GN | 0x31) /* ~ */ 29562306a36Sopenharmony_ci 29662306a36Sopenharmony_ci#define ED_DSP_CRASHED_EXC_DSPSTACK_OVERFLOW (ED_GN | 0x32) /* <- Decalage pour 29762306a36Sopenharmony_ci * PCX (old 0x14) */ 29862306a36Sopenharmony_ci#define ED_DSP_CRASHED_EXC_SYSSTACK_OVERFLOW (ED_GN | 0x33) /* ~ */ 29962306a36Sopenharmony_ci#define ED_DSP_CRASHED_EXC_ILLEGAL (ED_GN | 0x34) /* ~ */ 30062306a36Sopenharmony_ci#define ED_DSP_CRASHED_EXC_TIMER_REENTRY (ED_GN | 0x35) /* ~ */ 30162306a36Sopenharmony_ci#define ED_DSP_CRASHED_EXC_FATAL_ERROR (ED_GN | 0x36) /* ~ */ 30262306a36Sopenharmony_ci 30362306a36Sopenharmony_ci#define ED_FLASH_PCCARD_NOT_PRESENT (ED_GN | 0x37) 30462306a36Sopenharmony_ci 30562306a36Sopenharmony_ci#define ED_NO_CURRENT_CLOCK (ED_GN | 0x38) 30662306a36Sopenharmony_ci 30762306a36Sopenharmony_ci/* Complete DRV error code for real time class */ 30862306a36Sopenharmony_ci#define ED_RT (ERROR_VALUE | E_SOURCE_DRV | E_CLASS_REAL_TIME_ERROR) 30962306a36Sopenharmony_ci#define ED_DSP_TIMED_OUT (ED_RT | 0x01) 31062306a36Sopenharmony_ci#define ED_DSP_CHK_TIMED_OUT (ED_RT | 0x02) 31162306a36Sopenharmony_ci#define ED_STREAM_OVERRUN (ED_RT | 0x03) 31262306a36Sopenharmony_ci#define ED_DSP_BUSY (ED_RT | 0x04) 31362306a36Sopenharmony_ci#define ED_DSP_SEMAPHORE_TIME_OUT (ED_RT | 0x05) 31462306a36Sopenharmony_ci#define ED_BOARD_TIME_OUT (ED_RT | 0x06) 31562306a36Sopenharmony_ci#define ED_XILINX_ERROR (ED_RT | 0x07) 31662306a36Sopenharmony_ci#define ED_COBRANET_ITF_NOT_RESPONDING (ED_RT | 0x08) 31762306a36Sopenharmony_ci 31862306a36Sopenharmony_ci/* Complete BOARD error code for the invaid standard object class */ 31962306a36Sopenharmony_ci#define EB_ISO (ERROR_VALUE | E_SOURCE_BOARD | \ 32062306a36Sopenharmony_ci E_CLASS_INVALID_STD_OBJECT) 32162306a36Sopenharmony_ci#define EB_INVALID_EFFECT (EB_ISO | 0x00) 32262306a36Sopenharmony_ci#define EB_INVALID_PIPE (EB_ISO | 0x40) 32362306a36Sopenharmony_ci#define EB_INVALID_STREAM (EB_ISO | 0x80) 32462306a36Sopenharmony_ci#define EB_INVALID_AUDIO (EB_ISO | 0xC0) 32562306a36Sopenharmony_ci 32662306a36Sopenharmony_ci/* Complete BOARD error code for impossible resource allocation class */ 32762306a36Sopenharmony_ci#define EB_RI (ERROR_VALUE | E_SOURCE_BOARD | E_CLASS_RSRC_IMPOSSIBLE) 32862306a36Sopenharmony_ci#define EB_ALLOCATE_ALL_STREAM_TRANSFERT_BUFFERS_IMPOSSIBLE (EB_RI | 0x01) 32962306a36Sopenharmony_ci#define EB_ALLOCATE_PIPE_SAMPLE_BUFFER_IMPOSSIBLE (EB_RI | 0x02) 33062306a36Sopenharmony_ci 33162306a36Sopenharmony_ci#define EB_ALLOCATE_MEM_STREAM_IMPOSSIBLE \ 33262306a36Sopenharmony_ci EB_ALLOCATE_ALL_STREAM_TRANSFERT_BUFFERS_IMPOSSIBLE 33362306a36Sopenharmony_ci#define EB_ALLOCATE_MEM_PIPE_IMPOSSIBLE \ 33462306a36Sopenharmony_ci EB_ALLOCATE_PIPE_SAMPLE_BUFFER_IMPOSSIBLE 33562306a36Sopenharmony_ci 33662306a36Sopenharmony_ci#define EB_ALLOCATE_DIFFERED_CMD_IMPOSSIBLE (EB_RI | 0x03) 33762306a36Sopenharmony_ci#define EB_TOO_MANY_DIFFERED_CMD (EB_RI | 0x04) 33862306a36Sopenharmony_ci#define EB_RBUFFERS_TABLE_OVERFLOW (EB_RI | 0x05) 33962306a36Sopenharmony_ci#define EB_ALLOCATE_EFFECTS_IMPOSSIBLE (EB_RI | 0x08) 34062306a36Sopenharmony_ci#define EB_ALLOCATE_EFFECT_POS_IMPOSSIBLE (EB_RI | 0x09) 34162306a36Sopenharmony_ci#define EB_RBUFFER_NOT_AVAILABLE (EB_RI | 0x0A) 34262306a36Sopenharmony_ci#define EB_ALLOCATE_CONTEXT_LIII_IMPOSSIBLE (EB_RI | 0x0B) 34362306a36Sopenharmony_ci#define EB_STATUS_DIALOG_IMPOSSIBLE (EB_RI | 0x1D) 34462306a36Sopenharmony_ci#define EB_CONTROL_CMD_IMPOSSIBLE (EB_RI | 0x1E) 34562306a36Sopenharmony_ci#define EB_STATUS_SEND_IMPOSSIBLE (EB_RI | 0x1F) 34662306a36Sopenharmony_ci#define EB_ALLOCATE_PIPE_IMPOSSIBLE (EB_RI | 0x40) 34762306a36Sopenharmony_ci#define EB_ALLOCATE_STREAM_IMPOSSIBLE (EB_RI | 0x80) 34862306a36Sopenharmony_ci#define EB_ALLOCATE_AUDIO_IMPOSSIBLE (EB_RI | 0xC0) 34962306a36Sopenharmony_ci 35062306a36Sopenharmony_ci/* Complete BOARD error code for wrong call context class */ 35162306a36Sopenharmony_ci#define EB_WCC (ERROR_VALUE | E_SOURCE_BOARD | E_CLASS_WRONG_CONTEXT) 35262306a36Sopenharmony_ci#define EB_CMD_REFUSED (EB_WCC | 0x00) 35362306a36Sopenharmony_ci#define EB_START_STREAM_REFUSED (EB_WCC | 0xFC) 35462306a36Sopenharmony_ci#define EB_SPC_REFUSED (EB_WCC | 0xFD) 35562306a36Sopenharmony_ci#define EB_CSN_REFUSED (EB_WCC | 0xFE) 35662306a36Sopenharmony_ci#define EB_CSE_REFUSED (EB_WCC | 0xFF) 35762306a36Sopenharmony_ci 35862306a36Sopenharmony_ci 35962306a36Sopenharmony_ci 36062306a36Sopenharmony_ci 36162306a36Sopenharmony_ci#endif /* LX_DEFS_H */ 362