18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci/* -*- linux-c -*- * 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * ALSA driver for the digigram lx6464es interface 58c2ecf20Sopenharmony_ci * adapted upstream headers 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * Copyright (c) 2009 Tim Blechmann <tim@klingt.org> 88c2ecf20Sopenharmony_ci */ 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#ifndef LX_DEFS_H 118c2ecf20Sopenharmony_ci#define LX_DEFS_H 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci/* code adapted from ethersound.h */ 148c2ecf20Sopenharmony_ci#define XES_FREQ_COUNT8_MASK 0x00001FFF /* compteur 25MHz entre 8 ech. */ 158c2ecf20Sopenharmony_ci#define XES_FREQ_COUNT8_44_MIN 0x00001288 /* 25M / 168c2ecf20Sopenharmony_ci * [ 44k - ( 44.1k + 48k ) / 2 ] 178c2ecf20Sopenharmony_ci * * 8 */ 188c2ecf20Sopenharmony_ci#define XES_FREQ_COUNT8_44_MAX 0x000010F0 /* 25M / [ ( 44.1k + 48k ) / 2 ] 198c2ecf20Sopenharmony_ci * * 8 */ 208c2ecf20Sopenharmony_ci#define XES_FREQ_COUNT8_48_MAX 0x00000F08 /* 25M / 218c2ecf20Sopenharmony_ci * [ 48k + ( 44.1k + 48k ) / 2 ] 228c2ecf20Sopenharmony_ci * * 8 */ 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci/* code adapted from LXES_registers.h */ 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci#define IOCR_OUTPUTS_OFFSET 0 /* (rw) offset for the number of OUTs in the 278c2ecf20Sopenharmony_ci * ConfES register. */ 288c2ecf20Sopenharmony_ci#define IOCR_INPUTS_OFFSET 8 /* (rw) offset for the number of INs in the 298c2ecf20Sopenharmony_ci * ConfES register. */ 308c2ecf20Sopenharmony_ci#define FREQ_RATIO_OFFSET 19 /* (rw) offset for frequency ratio in the 318c2ecf20Sopenharmony_ci * ConfES register. */ 328c2ecf20Sopenharmony_ci#define FREQ_RATIO_SINGLE_MODE 0x01 /* value for single mode frequency ratio: 338c2ecf20Sopenharmony_ci * sample rate = frequency rate. */ 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci#define CONFES_READ_PART_MASK 0x00070000 368c2ecf20Sopenharmony_ci#define CONFES_WRITE_PART_MASK 0x00F80000 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci/* code adapted from if_drv_mb.h */ 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci#define MASK_SYS_STATUS_ERROR (1L << 31) /* events that lead to a PCI irq if 418c2ecf20Sopenharmony_ci * not yet pending */ 428c2ecf20Sopenharmony_ci#define MASK_SYS_STATUS_URUN (1L << 30) 438c2ecf20Sopenharmony_ci#define MASK_SYS_STATUS_ORUN (1L << 29) 448c2ecf20Sopenharmony_ci#define MASK_SYS_STATUS_EOBO (1L << 28) 458c2ecf20Sopenharmony_ci#define MASK_SYS_STATUS_EOBI (1L << 27) 468c2ecf20Sopenharmony_ci#define MASK_SYS_STATUS_FREQ (1L << 26) 478c2ecf20Sopenharmony_ci#define MASK_SYS_STATUS_ESA (1L << 25) /* reserved, this is set by the 488c2ecf20Sopenharmony_ci * XES */ 498c2ecf20Sopenharmony_ci#define MASK_SYS_STATUS_TIMER (1L << 24) 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ci#define MASK_SYS_ASYNC_EVENTS (MASK_SYS_STATUS_ERROR | \ 528c2ecf20Sopenharmony_ci MASK_SYS_STATUS_URUN | \ 538c2ecf20Sopenharmony_ci MASK_SYS_STATUS_ORUN | \ 548c2ecf20Sopenharmony_ci MASK_SYS_STATUS_EOBO | \ 558c2ecf20Sopenharmony_ci MASK_SYS_STATUS_EOBI | \ 568c2ecf20Sopenharmony_ci MASK_SYS_STATUS_FREQ | \ 578c2ecf20Sopenharmony_ci MASK_SYS_STATUS_ESA) 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_ci#define MASK_SYS_PCI_EVENTS (MASK_SYS_ASYNC_EVENTS | \ 608c2ecf20Sopenharmony_ci MASK_SYS_STATUS_TIMER) 618c2ecf20Sopenharmony_ci 628c2ecf20Sopenharmony_ci#define MASK_SYS_TIMER_COUNT 0x0000FFFF 638c2ecf20Sopenharmony_ci 648c2ecf20Sopenharmony_ci#define MASK_SYS_STATUS_EOT_PLX (1L << 22) /* event that remains 658c2ecf20Sopenharmony_ci * internal: reserved fo end 668c2ecf20Sopenharmony_ci * of plx dma */ 678c2ecf20Sopenharmony_ci#define MASK_SYS_STATUS_XES (1L << 21) /* event that remains 688c2ecf20Sopenharmony_ci * internal: pending XES 698c2ecf20Sopenharmony_ci * IRQ */ 708c2ecf20Sopenharmony_ci#define MASK_SYS_STATUS_CMD_DONE (1L << 20) /* alternate command 718c2ecf20Sopenharmony_ci * management: notify driver 728c2ecf20Sopenharmony_ci * instead of polling */ 738c2ecf20Sopenharmony_ci 748c2ecf20Sopenharmony_ci 758c2ecf20Sopenharmony_ci#define MAX_STREAM_BUFFER 5 /* max amount of stream buffers. */ 768c2ecf20Sopenharmony_ci 778c2ecf20Sopenharmony_ci#define MICROBLAZE_IBL_MIN 32 788c2ecf20Sopenharmony_ci#define MICROBLAZE_IBL_DEFAULT 128 798c2ecf20Sopenharmony_ci#define MICROBLAZE_IBL_MAX 512 808c2ecf20Sopenharmony_ci/* #define MASK_GRANULARITY (2*MICROBLAZE_IBL_MAX-1) */ 818c2ecf20Sopenharmony_ci 828c2ecf20Sopenharmony_ci 838c2ecf20Sopenharmony_ci 848c2ecf20Sopenharmony_ci/* command opcodes, see reference for details */ 858c2ecf20Sopenharmony_ci 868c2ecf20Sopenharmony_ci/* 878c2ecf20Sopenharmony_ci the capture bit position in the object_id field in driver commands 888c2ecf20Sopenharmony_ci depends upon the number of managed channels. For now, 64 IN + 64 OUT are 898c2ecf20Sopenharmony_ci supported. HOwever, the communication protocol forsees 1024 channels, hence 908c2ecf20Sopenharmony_ci bit 10 indicates a capture (input) object). 918c2ecf20Sopenharmony_ci*/ 928c2ecf20Sopenharmony_ci#define ID_IS_CAPTURE (1L << 10) 938c2ecf20Sopenharmony_ci#define ID_OFFSET 13 /* object ID is at the 13th bit in the 948c2ecf20Sopenharmony_ci * 1st command word.*/ 958c2ecf20Sopenharmony_ci#define ID_CH_MASK 0x3F 968c2ecf20Sopenharmony_ci#define OPCODE_OFFSET 24 /* offset of the command opcode in the first 978c2ecf20Sopenharmony_ci * command word.*/ 988c2ecf20Sopenharmony_ci 998c2ecf20Sopenharmony_cienum cmd_mb_opcodes { 1008c2ecf20Sopenharmony_ci CMD_00_INFO_DEBUG = 0x00, 1018c2ecf20Sopenharmony_ci CMD_01_GET_SYS_CFG = 0x01, 1028c2ecf20Sopenharmony_ci CMD_02_SET_GRANULARITY = 0x02, 1038c2ecf20Sopenharmony_ci CMD_03_SET_TIMER_IRQ = 0x03, 1048c2ecf20Sopenharmony_ci CMD_04_GET_EVENT = 0x04, 1058c2ecf20Sopenharmony_ci CMD_05_GET_PIPES = 0x05, 1068c2ecf20Sopenharmony_ci 1078c2ecf20Sopenharmony_ci CMD_06_ALLOCATE_PIPE = 0x06, 1088c2ecf20Sopenharmony_ci CMD_07_RELEASE_PIPE = 0x07, 1098c2ecf20Sopenharmony_ci CMD_08_ASK_BUFFERS = 0x08, 1108c2ecf20Sopenharmony_ci CMD_09_STOP_PIPE = 0x09, 1118c2ecf20Sopenharmony_ci CMD_0A_GET_PIPE_SPL_COUNT = 0x0a, 1128c2ecf20Sopenharmony_ci CMD_0B_TOGGLE_PIPE_STATE = 0x0b, 1138c2ecf20Sopenharmony_ci 1148c2ecf20Sopenharmony_ci CMD_0C_DEF_STREAM = 0x0c, 1158c2ecf20Sopenharmony_ci CMD_0D_SET_MUTE = 0x0d, 1168c2ecf20Sopenharmony_ci CMD_0E_GET_STREAM_SPL_COUNT = 0x0e, 1178c2ecf20Sopenharmony_ci CMD_0F_UPDATE_BUFFER = 0x0f, 1188c2ecf20Sopenharmony_ci CMD_10_GET_BUFFER = 0x10, 1198c2ecf20Sopenharmony_ci CMD_11_CANCEL_BUFFER = 0x11, 1208c2ecf20Sopenharmony_ci CMD_12_GET_PEAK = 0x12, 1218c2ecf20Sopenharmony_ci CMD_13_SET_STREAM_STATE = 0x13, 1228c2ecf20Sopenharmony_ci CMD_14_INVALID = 0x14, 1238c2ecf20Sopenharmony_ci}; 1248c2ecf20Sopenharmony_ci 1258c2ecf20Sopenharmony_ci/* pipe states */ 1268c2ecf20Sopenharmony_cienum pipe_state_t { 1278c2ecf20Sopenharmony_ci PSTATE_IDLE = 0, /* the pipe is not processed in the XES_IRQ 1288c2ecf20Sopenharmony_ci * (free or stopped, or paused). */ 1298c2ecf20Sopenharmony_ci PSTATE_RUN = 1, /* sustained play/record state. */ 1308c2ecf20Sopenharmony_ci PSTATE_PURGE = 2, /* the ES channels are now off, render pipes do 1318c2ecf20Sopenharmony_ci * not DMA, record pipe do a last DMA. */ 1328c2ecf20Sopenharmony_ci PSTATE_ACQUIRE = 3, /* the ES channels are now on, render pipes do 1338c2ecf20Sopenharmony_ci * not yet increase their sample count, record 1348c2ecf20Sopenharmony_ci * pipes do not DMA. */ 1358c2ecf20Sopenharmony_ci PSTATE_CLOSING = 4, /* the pipe is releasing, and may not yet 1368c2ecf20Sopenharmony_ci * receive an "alloc" command. */ 1378c2ecf20Sopenharmony_ci}; 1388c2ecf20Sopenharmony_ci 1398c2ecf20Sopenharmony_ci/* stream states */ 1408c2ecf20Sopenharmony_cienum stream_state_t { 1418c2ecf20Sopenharmony_ci SSTATE_STOP = 0x00, /* setting to stop resets the stream spl 1428c2ecf20Sopenharmony_ci * count.*/ 1438c2ecf20Sopenharmony_ci SSTATE_RUN = (0x01 << 0), /* start DMA and spl count handling. */ 1448c2ecf20Sopenharmony_ci SSTATE_PAUSE = (0x01 << 1), /* pause DMA and spl count handling. */ 1458c2ecf20Sopenharmony_ci}; 1468c2ecf20Sopenharmony_ci 1478c2ecf20Sopenharmony_ci/* buffer flags */ 1488c2ecf20Sopenharmony_cienum buffer_flags { 1498c2ecf20Sopenharmony_ci BF_VALID = 0x80, /* set if the buffer is valid, clear if free.*/ 1508c2ecf20Sopenharmony_ci BF_CURRENT = 0x40, /* set if this is the current buffer (there is 1518c2ecf20Sopenharmony_ci * always a current buffer).*/ 1528c2ecf20Sopenharmony_ci BF_NOTIFY_EOB = 0x20, /* set if this buffer must cause a PCI event 1538c2ecf20Sopenharmony_ci * when finished.*/ 1548c2ecf20Sopenharmony_ci BF_CIRCULAR = 0x10, /* set if buffer[1] must be copied to buffer[0] 1558c2ecf20Sopenharmony_ci * by the end of this buffer.*/ 1568c2ecf20Sopenharmony_ci BF_64BITS_ADR = 0x08, /* set if the hi part of the address is valid.*/ 1578c2ecf20Sopenharmony_ci BF_xx = 0x04, /* future extension.*/ 1588c2ecf20Sopenharmony_ci BF_EOB = 0x02, /* set if finished, but not yet free.*/ 1598c2ecf20Sopenharmony_ci BF_PAUSE = 0x01, /* pause stream at buffer end.*/ 1608c2ecf20Sopenharmony_ci BF_ZERO = 0x00, /* no flags (init).*/ 1618c2ecf20Sopenharmony_ci}; 1628c2ecf20Sopenharmony_ci 1638c2ecf20Sopenharmony_ci/* 1648c2ecf20Sopenharmony_ci* Stream Flags definitions 1658c2ecf20Sopenharmony_ci*/ 1668c2ecf20Sopenharmony_cienum stream_flags { 1678c2ecf20Sopenharmony_ci SF_ZERO = 0x00000000, /* no flags (stream invalid). */ 1688c2ecf20Sopenharmony_ci SF_VALID = 0x10000000, /* the stream has a valid DMA_conf 1698c2ecf20Sopenharmony_ci * info (setstreamformat). */ 1708c2ecf20Sopenharmony_ci SF_XRUN = 0x20000000, /* the stream is un x-run state. */ 1718c2ecf20Sopenharmony_ci SF_START = 0x40000000, /* the DMA is running.*/ 1728c2ecf20Sopenharmony_ci SF_ASIO = 0x80000000, /* ASIO.*/ 1738c2ecf20Sopenharmony_ci}; 1748c2ecf20Sopenharmony_ci 1758c2ecf20Sopenharmony_ci 1768c2ecf20Sopenharmony_ci#define MASK_SPL_COUNT_HI 0x00FFFFFF /* 4 MSBits are status bits */ 1778c2ecf20Sopenharmony_ci#define PSTATE_OFFSET 28 /* 4 MSBits are status bits */ 1788c2ecf20Sopenharmony_ci 1798c2ecf20Sopenharmony_ci 1808c2ecf20Sopenharmony_ci#define MASK_STREAM_HAS_MAPPING (1L << 12) 1818c2ecf20Sopenharmony_ci#define MASK_STREAM_IS_ASIO (1L << 9) 1828c2ecf20Sopenharmony_ci#define STREAM_FMT_OFFSET 10 /* the stream fmt bits start at the 10th 1838c2ecf20Sopenharmony_ci * bit in the command word. */ 1848c2ecf20Sopenharmony_ci 1858c2ecf20Sopenharmony_ci#define STREAM_FMT_16b 0x02 1868c2ecf20Sopenharmony_ci#define STREAM_FMT_intel 0x01 1878c2ecf20Sopenharmony_ci 1888c2ecf20Sopenharmony_ci#define FREQ_FIELD_OFFSET 15 /* offset of the freq field in the response 1898c2ecf20Sopenharmony_ci * word */ 1908c2ecf20Sopenharmony_ci 1918c2ecf20Sopenharmony_ci#define BUFF_FLAGS_OFFSET 24 /* offset of the buffer flags in the 1928c2ecf20Sopenharmony_ci * response word. */ 1938c2ecf20Sopenharmony_ci#define MASK_DATA_SIZE 0x00FFFFFF /* this must match the field size of 1948c2ecf20Sopenharmony_ci * datasize in the buffer_t structure. */ 1958c2ecf20Sopenharmony_ci 1968c2ecf20Sopenharmony_ci#define MASK_BUFFER_ID 0xFF /* the cancel command awaits a buffer ID, 1978c2ecf20Sopenharmony_ci * may be 0xFF for "current". */ 1988c2ecf20Sopenharmony_ci 1998c2ecf20Sopenharmony_ci 2008c2ecf20Sopenharmony_ci/* code adapted from PcxErr_e.h */ 2018c2ecf20Sopenharmony_ci 2028c2ecf20Sopenharmony_ci/* Bits masks */ 2038c2ecf20Sopenharmony_ci 2048c2ecf20Sopenharmony_ci#define ERROR_MASK 0x8000 2058c2ecf20Sopenharmony_ci 2068c2ecf20Sopenharmony_ci#define SOURCE_MASK 0x7800 2078c2ecf20Sopenharmony_ci 2088c2ecf20Sopenharmony_ci#define E_SOURCE_BOARD 0x4000 /* 8 >> 1 */ 2098c2ecf20Sopenharmony_ci#define E_SOURCE_DRV 0x2000 /* 4 >> 1 */ 2108c2ecf20Sopenharmony_ci#define E_SOURCE_API 0x1000 /* 2 >> 1 */ 2118c2ecf20Sopenharmony_ci/* Error tools */ 2128c2ecf20Sopenharmony_ci#define E_SOURCE_TOOLS 0x0800 /* 1 >> 1 */ 2138c2ecf20Sopenharmony_ci/* Error pcxaudio */ 2148c2ecf20Sopenharmony_ci#define E_SOURCE_AUDIO 0x1800 /* 3 >> 1 */ 2158c2ecf20Sopenharmony_ci/* Error virtual pcx */ 2168c2ecf20Sopenharmony_ci#define E_SOURCE_VPCX 0x2800 /* 5 >> 1 */ 2178c2ecf20Sopenharmony_ci/* Error dispatcher */ 2188c2ecf20Sopenharmony_ci#define E_SOURCE_DISPATCHER 0x3000 /* 6 >> 1 */ 2198c2ecf20Sopenharmony_ci/* Error from CobraNet firmware */ 2208c2ecf20Sopenharmony_ci#define E_SOURCE_COBRANET 0x3800 /* 7 >> 1 */ 2218c2ecf20Sopenharmony_ci 2228c2ecf20Sopenharmony_ci#define E_SOURCE_USER 0x7800 2238c2ecf20Sopenharmony_ci 2248c2ecf20Sopenharmony_ci#define CLASS_MASK 0x0700 2258c2ecf20Sopenharmony_ci 2268c2ecf20Sopenharmony_ci#define CODE_MASK 0x00FF 2278c2ecf20Sopenharmony_ci 2288c2ecf20Sopenharmony_ci/* Bits values */ 2298c2ecf20Sopenharmony_ci 2308c2ecf20Sopenharmony_ci/* Values for the error/warning bit */ 2318c2ecf20Sopenharmony_ci#define ERROR_VALUE 0x8000 2328c2ecf20Sopenharmony_ci#define WARNING_VALUE 0x0000 2338c2ecf20Sopenharmony_ci 2348c2ecf20Sopenharmony_ci/* Class values */ 2358c2ecf20Sopenharmony_ci#define E_CLASS_GENERAL 0x0000 2368c2ecf20Sopenharmony_ci#define E_CLASS_INVALID_CMD 0x0100 2378c2ecf20Sopenharmony_ci#define E_CLASS_INVALID_STD_OBJECT 0x0200 2388c2ecf20Sopenharmony_ci#define E_CLASS_RSRC_IMPOSSIBLE 0x0300 2398c2ecf20Sopenharmony_ci#define E_CLASS_WRONG_CONTEXT 0x0400 2408c2ecf20Sopenharmony_ci#define E_CLASS_BAD_SPECIFIC_PARAMETER 0x0500 2418c2ecf20Sopenharmony_ci#define E_CLASS_REAL_TIME_ERROR 0x0600 2428c2ecf20Sopenharmony_ci#define E_CLASS_DIRECTSHOW 0x0700 2438c2ecf20Sopenharmony_ci#define E_CLASS_FREE 0x0700 2448c2ecf20Sopenharmony_ci 2458c2ecf20Sopenharmony_ci 2468c2ecf20Sopenharmony_ci/* Complete DRV error code for the general class */ 2478c2ecf20Sopenharmony_ci#define ED_GN (ERROR_VALUE | E_SOURCE_DRV | E_CLASS_GENERAL) 2488c2ecf20Sopenharmony_ci#define ED_CONCURRENCY (ED_GN | 0x01) 2498c2ecf20Sopenharmony_ci#define ED_DSP_CRASHED (ED_GN | 0x02) 2508c2ecf20Sopenharmony_ci#define ED_UNKNOWN_BOARD (ED_GN | 0x03) 2518c2ecf20Sopenharmony_ci#define ED_NOT_INSTALLED (ED_GN | 0x04) 2528c2ecf20Sopenharmony_ci#define ED_CANNOT_OPEN_SVC_MANAGER (ED_GN | 0x05) 2538c2ecf20Sopenharmony_ci#define ED_CANNOT_READ_REGISTRY (ED_GN | 0x06) 2548c2ecf20Sopenharmony_ci#define ED_DSP_VERSION_MISMATCH (ED_GN | 0x07) 2558c2ecf20Sopenharmony_ci#define ED_UNAVAILABLE_FEATURE (ED_GN | 0x08) 2568c2ecf20Sopenharmony_ci#define ED_CANCELLED (ED_GN | 0x09) 2578c2ecf20Sopenharmony_ci#define ED_NO_RESPONSE_AT_IRQA (ED_GN | 0x10) 2588c2ecf20Sopenharmony_ci#define ED_INVALID_ADDRESS (ED_GN | 0x11) 2598c2ecf20Sopenharmony_ci#define ED_DSP_CORRUPTED (ED_GN | 0x12) 2608c2ecf20Sopenharmony_ci#define ED_PENDING_OPERATION (ED_GN | 0x13) 2618c2ecf20Sopenharmony_ci#define ED_NET_ALLOCATE_MEMORY_IMPOSSIBLE (ED_GN | 0x14) 2628c2ecf20Sopenharmony_ci#define ED_NET_REGISTER_ERROR (ED_GN | 0x15) 2638c2ecf20Sopenharmony_ci#define ED_NET_THREAD_ERROR (ED_GN | 0x16) 2648c2ecf20Sopenharmony_ci#define ED_NET_OPEN_ERROR (ED_GN | 0x17) 2658c2ecf20Sopenharmony_ci#define ED_NET_CLOSE_ERROR (ED_GN | 0x18) 2668c2ecf20Sopenharmony_ci#define ED_NET_NO_MORE_PACKET (ED_GN | 0x19) 2678c2ecf20Sopenharmony_ci#define ED_NET_NO_MORE_BUFFER (ED_GN | 0x1A) 2688c2ecf20Sopenharmony_ci#define ED_NET_SEND_ERROR (ED_GN | 0x1B) 2698c2ecf20Sopenharmony_ci#define ED_NET_RECEIVE_ERROR (ED_GN | 0x1C) 2708c2ecf20Sopenharmony_ci#define ED_NET_WRONG_MSG_SIZE (ED_GN | 0x1D) 2718c2ecf20Sopenharmony_ci#define ED_NET_WAIT_ERROR (ED_GN | 0x1E) 2728c2ecf20Sopenharmony_ci#define ED_NET_EEPROM_ERROR (ED_GN | 0x1F) 2738c2ecf20Sopenharmony_ci#define ED_INVALID_RS232_COM_NUMBER (ED_GN | 0x20) 2748c2ecf20Sopenharmony_ci#define ED_INVALID_RS232_INIT (ED_GN | 0x21) 2758c2ecf20Sopenharmony_ci#define ED_FILE_ERROR (ED_GN | 0x22) 2768c2ecf20Sopenharmony_ci#define ED_INVALID_GPIO_CMD (ED_GN | 0x23) 2778c2ecf20Sopenharmony_ci#define ED_RS232_ALREADY_OPENED (ED_GN | 0x24) 2788c2ecf20Sopenharmony_ci#define ED_RS232_NOT_OPENED (ED_GN | 0x25) 2798c2ecf20Sopenharmony_ci#define ED_GPIO_ALREADY_OPENED (ED_GN | 0x26) 2808c2ecf20Sopenharmony_ci#define ED_GPIO_NOT_OPENED (ED_GN | 0x27) 2818c2ecf20Sopenharmony_ci#define ED_REGISTRY_ERROR (ED_GN | 0x28) /* <- NCX */ 2828c2ecf20Sopenharmony_ci#define ED_INVALID_SERVICE (ED_GN | 0x29) /* <- NCX */ 2838c2ecf20Sopenharmony_ci 2848c2ecf20Sopenharmony_ci#define ED_READ_FILE_ALREADY_OPENED (ED_GN | 0x2a) /* <- Decalage 2858c2ecf20Sopenharmony_ci * pour RCX 2868c2ecf20Sopenharmony_ci * (old 0x28) 2878c2ecf20Sopenharmony_ci * */ 2888c2ecf20Sopenharmony_ci#define ED_READ_FILE_INVALID_COMMAND (ED_GN | 0x2b) /* ~ */ 2898c2ecf20Sopenharmony_ci#define ED_READ_FILE_INVALID_PARAMETER (ED_GN | 0x2c) /* ~ */ 2908c2ecf20Sopenharmony_ci#define ED_READ_FILE_ALREADY_CLOSED (ED_GN | 0x2d) /* ~ */ 2918c2ecf20Sopenharmony_ci#define ED_READ_FILE_NO_INFORMATION (ED_GN | 0x2e) /* ~ */ 2928c2ecf20Sopenharmony_ci#define ED_READ_FILE_INVALID_HANDLE (ED_GN | 0x2f) /* ~ */ 2938c2ecf20Sopenharmony_ci#define ED_READ_FILE_END_OF_FILE (ED_GN | 0x30) /* ~ */ 2948c2ecf20Sopenharmony_ci#define ED_READ_FILE_ERROR (ED_GN | 0x31) /* ~ */ 2958c2ecf20Sopenharmony_ci 2968c2ecf20Sopenharmony_ci#define ED_DSP_CRASHED_EXC_DSPSTACK_OVERFLOW (ED_GN | 0x32) /* <- Decalage pour 2978c2ecf20Sopenharmony_ci * PCX (old 0x14) */ 2988c2ecf20Sopenharmony_ci#define ED_DSP_CRASHED_EXC_SYSSTACK_OVERFLOW (ED_GN | 0x33) /* ~ */ 2998c2ecf20Sopenharmony_ci#define ED_DSP_CRASHED_EXC_ILLEGAL (ED_GN | 0x34) /* ~ */ 3008c2ecf20Sopenharmony_ci#define ED_DSP_CRASHED_EXC_TIMER_REENTRY (ED_GN | 0x35) /* ~ */ 3018c2ecf20Sopenharmony_ci#define ED_DSP_CRASHED_EXC_FATAL_ERROR (ED_GN | 0x36) /* ~ */ 3028c2ecf20Sopenharmony_ci 3038c2ecf20Sopenharmony_ci#define ED_FLASH_PCCARD_NOT_PRESENT (ED_GN | 0x37) 3048c2ecf20Sopenharmony_ci 3058c2ecf20Sopenharmony_ci#define ED_NO_CURRENT_CLOCK (ED_GN | 0x38) 3068c2ecf20Sopenharmony_ci 3078c2ecf20Sopenharmony_ci/* Complete DRV error code for real time class */ 3088c2ecf20Sopenharmony_ci#define ED_RT (ERROR_VALUE | E_SOURCE_DRV | E_CLASS_REAL_TIME_ERROR) 3098c2ecf20Sopenharmony_ci#define ED_DSP_TIMED_OUT (ED_RT | 0x01) 3108c2ecf20Sopenharmony_ci#define ED_DSP_CHK_TIMED_OUT (ED_RT | 0x02) 3118c2ecf20Sopenharmony_ci#define ED_STREAM_OVERRUN (ED_RT | 0x03) 3128c2ecf20Sopenharmony_ci#define ED_DSP_BUSY (ED_RT | 0x04) 3138c2ecf20Sopenharmony_ci#define ED_DSP_SEMAPHORE_TIME_OUT (ED_RT | 0x05) 3148c2ecf20Sopenharmony_ci#define ED_BOARD_TIME_OUT (ED_RT | 0x06) 3158c2ecf20Sopenharmony_ci#define ED_XILINX_ERROR (ED_RT | 0x07) 3168c2ecf20Sopenharmony_ci#define ED_COBRANET_ITF_NOT_RESPONDING (ED_RT | 0x08) 3178c2ecf20Sopenharmony_ci 3188c2ecf20Sopenharmony_ci/* Complete BOARD error code for the invaid standard object class */ 3198c2ecf20Sopenharmony_ci#define EB_ISO (ERROR_VALUE | E_SOURCE_BOARD | \ 3208c2ecf20Sopenharmony_ci E_CLASS_INVALID_STD_OBJECT) 3218c2ecf20Sopenharmony_ci#define EB_INVALID_EFFECT (EB_ISO | 0x00) 3228c2ecf20Sopenharmony_ci#define EB_INVALID_PIPE (EB_ISO | 0x40) 3238c2ecf20Sopenharmony_ci#define EB_INVALID_STREAM (EB_ISO | 0x80) 3248c2ecf20Sopenharmony_ci#define EB_INVALID_AUDIO (EB_ISO | 0xC0) 3258c2ecf20Sopenharmony_ci 3268c2ecf20Sopenharmony_ci/* Complete BOARD error code for impossible resource allocation class */ 3278c2ecf20Sopenharmony_ci#define EB_RI (ERROR_VALUE | E_SOURCE_BOARD | E_CLASS_RSRC_IMPOSSIBLE) 3288c2ecf20Sopenharmony_ci#define EB_ALLOCATE_ALL_STREAM_TRANSFERT_BUFFERS_IMPOSSIBLE (EB_RI | 0x01) 3298c2ecf20Sopenharmony_ci#define EB_ALLOCATE_PIPE_SAMPLE_BUFFER_IMPOSSIBLE (EB_RI | 0x02) 3308c2ecf20Sopenharmony_ci 3318c2ecf20Sopenharmony_ci#define EB_ALLOCATE_MEM_STREAM_IMPOSSIBLE \ 3328c2ecf20Sopenharmony_ci EB_ALLOCATE_ALL_STREAM_TRANSFERT_BUFFERS_IMPOSSIBLE 3338c2ecf20Sopenharmony_ci#define EB_ALLOCATE_MEM_PIPE_IMPOSSIBLE \ 3348c2ecf20Sopenharmony_ci EB_ALLOCATE_PIPE_SAMPLE_BUFFER_IMPOSSIBLE 3358c2ecf20Sopenharmony_ci 3368c2ecf20Sopenharmony_ci#define EB_ALLOCATE_DIFFERED_CMD_IMPOSSIBLE (EB_RI | 0x03) 3378c2ecf20Sopenharmony_ci#define EB_TOO_MANY_DIFFERED_CMD (EB_RI | 0x04) 3388c2ecf20Sopenharmony_ci#define EB_RBUFFERS_TABLE_OVERFLOW (EB_RI | 0x05) 3398c2ecf20Sopenharmony_ci#define EB_ALLOCATE_EFFECTS_IMPOSSIBLE (EB_RI | 0x08) 3408c2ecf20Sopenharmony_ci#define EB_ALLOCATE_EFFECT_POS_IMPOSSIBLE (EB_RI | 0x09) 3418c2ecf20Sopenharmony_ci#define EB_RBUFFER_NOT_AVAILABLE (EB_RI | 0x0A) 3428c2ecf20Sopenharmony_ci#define EB_ALLOCATE_CONTEXT_LIII_IMPOSSIBLE (EB_RI | 0x0B) 3438c2ecf20Sopenharmony_ci#define EB_STATUS_DIALOG_IMPOSSIBLE (EB_RI | 0x1D) 3448c2ecf20Sopenharmony_ci#define EB_CONTROL_CMD_IMPOSSIBLE (EB_RI | 0x1E) 3458c2ecf20Sopenharmony_ci#define EB_STATUS_SEND_IMPOSSIBLE (EB_RI | 0x1F) 3468c2ecf20Sopenharmony_ci#define EB_ALLOCATE_PIPE_IMPOSSIBLE (EB_RI | 0x40) 3478c2ecf20Sopenharmony_ci#define EB_ALLOCATE_STREAM_IMPOSSIBLE (EB_RI | 0x80) 3488c2ecf20Sopenharmony_ci#define EB_ALLOCATE_AUDIO_IMPOSSIBLE (EB_RI | 0xC0) 3498c2ecf20Sopenharmony_ci 3508c2ecf20Sopenharmony_ci/* Complete BOARD error code for wrong call context class */ 3518c2ecf20Sopenharmony_ci#define EB_WCC (ERROR_VALUE | E_SOURCE_BOARD | E_CLASS_WRONG_CONTEXT) 3528c2ecf20Sopenharmony_ci#define EB_CMD_REFUSED (EB_WCC | 0x00) 3538c2ecf20Sopenharmony_ci#define EB_START_STREAM_REFUSED (EB_WCC | 0xFC) 3548c2ecf20Sopenharmony_ci#define EB_SPC_REFUSED (EB_WCC | 0xFD) 3558c2ecf20Sopenharmony_ci#define EB_CSN_REFUSED (EB_WCC | 0xFE) 3568c2ecf20Sopenharmony_ci#define EB_CSE_REFUSED (EB_WCC | 0xFF) 3578c2ecf20Sopenharmony_ci 3588c2ecf20Sopenharmony_ci 3598c2ecf20Sopenharmony_ci 3608c2ecf20Sopenharmony_ci 3618c2ecf20Sopenharmony_ci#endif /* LX_DEFS_H */ 362