linux/sound/pci/lx6464es/lx_defs.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/* -*- linux-c -*- *
 *
 * ALSA driver for the digigram lx6464es interface
 * adapted upstream headers
 *
 * Copyright (c) 2009 Tim Blechmann <[email protected]>
 */

#ifndef LX_DEFS_H
#define LX_DEFS_H

/* code adapted from ethersound.h */
#define XES_FREQ_COUNT8_MASK
#define XES_FREQ_COUNT8_44_MIN
#define XES_FREQ_COUNT8_44_MAX
#define XES_FREQ_COUNT8_48_MAX

/* code adapted from LXES_registers.h */

#define IOCR_OUTPUTS_OFFSET
#define IOCR_INPUTS_OFFSET
#define FREQ_RATIO_OFFSET
#define FREQ_RATIO_SINGLE_MODE

#define CONFES_READ_PART_MASK
#define CONFES_WRITE_PART_MASK

/* code adapted from if_drv_mb.h */

#define MASK_SYS_STATUS_ERROR
#define MASK_SYS_STATUS_URUN
#define MASK_SYS_STATUS_ORUN
#define MASK_SYS_STATUS_EOBO
#define MASK_SYS_STATUS_EOBI
#define MASK_SYS_STATUS_FREQ
#define MASK_SYS_STATUS_ESA
#define MASK_SYS_STATUS_TIMER

#define MASK_SYS_ASYNC_EVENTS

#define MASK_SYS_PCI_EVENTS

#define MASK_SYS_TIMER_COUNT

#define MASK_SYS_STATUS_EOT_PLX
#define MASK_SYS_STATUS_XES
#define MASK_SYS_STATUS_CMD_DONE


#define MAX_STREAM_BUFFER

#define MICROBLAZE_IBL_MIN
#define MICROBLAZE_IBL_DEFAULT
#define MICROBLAZE_IBL_MAX
/* #define MASK_GRANULARITY		(2*MICROBLAZE_IBL_MAX-1) */



/* command opcodes, see reference for details */

/*
 the capture bit position in the object_id field in driver commands
 depends upon the number of managed channels. For now, 64 IN + 64 OUT are
 supported. HOwever, the communication protocol forsees 1024 channels, hence
 bit 10 indicates a capture (input) object).
*/
#define ID_IS_CAPTURE
#define ID_OFFSET
#define ID_CH_MASK
#define OPCODE_OFFSET

enum cmd_mb_opcodes {};

/* pipe states */
enum pipe_state_t {};

/* stream states */
enum stream_state_t {};

/* buffer flags */
enum buffer_flags {};

/*
*	Stream Flags definitions
*/
enum stream_flags {};


#define MASK_SPL_COUNT_HI
#define PSTATE_OFFSET


#define MASK_STREAM_HAS_MAPPING
#define MASK_STREAM_IS_ASIO
#define STREAM_FMT_OFFSET

#define STREAM_FMT_16b
#define STREAM_FMT_intel

#define FREQ_FIELD_OFFSET

#define BUFF_FLAGS_OFFSET
#define MASK_DATA_SIZE

#define MASK_BUFFER_ID


/* code adapted from PcxErr_e.h */

/* Bits masks */

#define ERROR_MASK

#define SOURCE_MASK

#define E_SOURCE_BOARD
#define E_SOURCE_DRV
#define E_SOURCE_API
/* Error tools */
#define E_SOURCE_TOOLS
/* Error pcxaudio */
#define E_SOURCE_AUDIO
/* Error virtual pcx */
#define E_SOURCE_VPCX
/* Error dispatcher */
#define E_SOURCE_DISPATCHER
/* Error from CobraNet firmware */
#define E_SOURCE_COBRANET

#define E_SOURCE_USER

#define CLASS_MASK

#define CODE_MASK

/* Bits values */

/* Values for the error/warning bit */
#define ERROR_VALUE
#define WARNING_VALUE

/* Class values */
#define E_CLASS_GENERAL
#define E_CLASS_INVALID_CMD
#define E_CLASS_INVALID_STD_OBJECT
#define E_CLASS_RSRC_IMPOSSIBLE
#define E_CLASS_WRONG_CONTEXT
#define E_CLASS_BAD_SPECIFIC_PARAMETER
#define E_CLASS_REAL_TIME_ERROR
#define E_CLASS_DIRECTSHOW
#define E_CLASS_FREE


/* Complete DRV error code for the general class */
#define ED_GN
#define ED_CONCURRENCY
#define ED_DSP_CRASHED
#define ED_UNKNOWN_BOARD
#define ED_NOT_INSTALLED
#define ED_CANNOT_OPEN_SVC_MANAGER
#define ED_CANNOT_READ_REGISTRY
#define ED_DSP_VERSION_MISMATCH
#define ED_UNAVAILABLE_FEATURE
#define ED_CANCELLED
#define ED_NO_RESPONSE_AT_IRQA
#define ED_INVALID_ADDRESS
#define ED_DSP_CORRUPTED
#define ED_PENDING_OPERATION
#define ED_NET_ALLOCATE_MEMORY_IMPOSSIBLE
#define ED_NET_REGISTER_ERROR
#define ED_NET_THREAD_ERROR
#define ED_NET_OPEN_ERROR
#define ED_NET_CLOSE_ERROR
#define ED_NET_NO_MORE_PACKET
#define ED_NET_NO_MORE_BUFFER
#define ED_NET_SEND_ERROR
#define ED_NET_RECEIVE_ERROR
#define ED_NET_WRONG_MSG_SIZE
#define ED_NET_WAIT_ERROR
#define ED_NET_EEPROM_ERROR
#define ED_INVALID_RS232_COM_NUMBER
#define ED_INVALID_RS232_INIT
#define ED_FILE_ERROR
#define ED_INVALID_GPIO_CMD
#define ED_RS232_ALREADY_OPENED
#define ED_RS232_NOT_OPENED
#define ED_GPIO_ALREADY_OPENED
#define ED_GPIO_NOT_OPENED
#define ED_REGISTRY_ERROR
#define ED_INVALID_SERVICE

#define ED_READ_FILE_ALREADY_OPENED
#define ED_READ_FILE_INVALID_COMMAND
#define ED_READ_FILE_INVALID_PARAMETER
#define ED_READ_FILE_ALREADY_CLOSED
#define ED_READ_FILE_NO_INFORMATION
#define ED_READ_FILE_INVALID_HANDLE
#define ED_READ_FILE_END_OF_FILE
#define ED_READ_FILE_ERROR

#define ED_DSP_CRASHED_EXC_DSPSTACK_OVERFLOW
#define ED_DSP_CRASHED_EXC_SYSSTACK_OVERFLOW
#define ED_DSP_CRASHED_EXC_ILLEGAL
#define ED_DSP_CRASHED_EXC_TIMER_REENTRY
#define ED_DSP_CRASHED_EXC_FATAL_ERROR

#define ED_FLASH_PCCARD_NOT_PRESENT

#define ED_NO_CURRENT_CLOCK

/* Complete DRV error code for real time class */
#define ED_RT
#define ED_DSP_TIMED_OUT
#define ED_DSP_CHK_TIMED_OUT
#define ED_STREAM_OVERRUN
#define ED_DSP_BUSY
#define ED_DSP_SEMAPHORE_TIME_OUT
#define ED_BOARD_TIME_OUT
#define ED_XILINX_ERROR
#define ED_COBRANET_ITF_NOT_RESPONDING

/* Complete BOARD error code for the invaid standard object class */
#define EB_ISO
#define EB_INVALID_EFFECT
#define EB_INVALID_PIPE
#define EB_INVALID_STREAM
#define EB_INVALID_AUDIO

/* Complete BOARD error code for impossible resource allocation class */
#define EB_RI
#define EB_ALLOCATE_ALL_STREAM_TRANSFERT_BUFFERS_IMPOSSIBLE
#define EB_ALLOCATE_PIPE_SAMPLE_BUFFER_IMPOSSIBLE

#define EB_ALLOCATE_MEM_STREAM_IMPOSSIBLE
#define EB_ALLOCATE_MEM_PIPE_IMPOSSIBLE

#define EB_ALLOCATE_DIFFERED_CMD_IMPOSSIBLE
#define EB_TOO_MANY_DIFFERED_CMD
#define EB_RBUFFERS_TABLE_OVERFLOW
#define EB_ALLOCATE_EFFECTS_IMPOSSIBLE
#define EB_ALLOCATE_EFFECT_POS_IMPOSSIBLE
#define EB_RBUFFER_NOT_AVAILABLE
#define EB_ALLOCATE_CONTEXT_LIII_IMPOSSIBLE
#define EB_STATUS_DIALOG_IMPOSSIBLE
#define EB_CONTROL_CMD_IMPOSSIBLE
#define EB_STATUS_SEND_IMPOSSIBLE
#define EB_ALLOCATE_PIPE_IMPOSSIBLE
#define EB_ALLOCATE_STREAM_IMPOSSIBLE
#define EB_ALLOCATE_AUDIO_IMPOSSIBLE

/* Complete BOARD error code for wrong call context class */
#define EB_WCC
#define EB_CMD_REFUSED
#define EB_START_STREAM_REFUSED
#define EB_SPC_REFUSED
#define EB_CSN_REFUSED
#define EB_CSE_REFUSED




#endif /* LX_DEFS_H */