linux/sound/drivers/vx/vx_cmd.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Driver for Digigram VX soundcards
 *
 * Definitions of DSP commands
 *
 * Copyright (c) 2002 by Takashi Iwai <[email protected]>
 */

#ifndef __VX_CMD_H
#define __VX_CMD_H

enum {};

struct vx_cmd_info {};

/* Family and code op of some DSP requests. */
#define CODE_OP_PIPE_TIME
#define CODE_OP_START_STREAM
#define CODE_OP_PAUSE_STREAM
#define CODE_OP_OUT_STREAM_LEVEL
#define CODE_OP_UPDATE_R_BUFFERS
#define CODE_OP_OUT_STREAM1_LEVEL_CURVE
#define CODE_OP_OUT_STREAM2_LEVEL_CURVE
#define CODE_OP_OUT_STREAM_FORMAT
#define CODE_OP_STREAM_TIME
#define CODE_OP_OUT_STREAM_EXTRAPARAMETER
#define CODE_OP_OUT_AUDIO_LEVEL

#define NOTIFY_LAST_COMMAND

/* Values for a user delay */
#define DC_DIFFERED_DELAY
#define DC_NOTIFY_DELAY
#define DC_HBUFFER_DELAY
#define DC_MULTIPLE_DELAY
#define DC_STREAM_TIME_DELAY
#define DC_CANCELLED_DELAY

/* Values for tiDelayed field in TIME_INFO structure,
 * and for pbPause field in PLAY_BUFFER_INFO structure
 */
#define BIT_DIFFERED_COMMAND
#define BIT_NOTIFIED_COMMAND
#define BIT_TIME_RELATIVE_TO_BUFFER
#define BIT_RESERVED
#define BIT_STREAM_TIME
#define BIT_CANCELLED_COMMAND

/* Access to the "Size" field of the response of the CMD_GET_NOTIFY_EVENT request. */
#define GET_NOTIFY_EVENT_SIZE_FIELD_MASK

/* DSP commands general masks */
#define OPCODE_MASK
#define DSP_DIFFERED_COMMAND_MASK

/* Notifications (NOTIFY_INFO) */
#define ALL_CMDS_NOTIFIED
#define START_STREAM_NOTIFIED
#define PAUSE_STREAM_NOTIFIED
#define OUT_STREAM_LEVEL_NOTIFIED
#define OUT_STREAM_PARAMETER_NOTIFIED
#define OUT_STREAM_FORMAT_NOTIFIED
#define PIPE_TIME_NOTIFIED
#define OUT_AUDIO_LEVEL_NOTIFIED
#define OUT_STREAM_LEVEL_CURVE_NOTIFIED
#define STREAM_TIME_NOTIFIED
#define OUT_STREAM_EXTRAPARAMETER_NOTIFIED
#define UNKNOWN_COMMAND_NOTIFIED

/* Output pipe parameters setting */
#define MASK_VALID_PIPE_MPEG_PARAM
#define MASK_VALID_PIPE_BACKWARD_PARAM
#define MASK_SET_PIPE_MPEG_PARAM
#define MASK_SET_PIPE_BACKWARD_PARAM

#define MASK_DSP_WORD
#define MASK_ALL_STREAM
#define MASK_DSP_WORD_LEVEL
#define MASK_FIRST_FIELD
#define FIELD_SIZE

#define COMMAND_RECORD_MASK

/* PipeManagement definition bits (PIPE_DECL_INFO) */
#define P_UNDERRUN_SKIP_SOUND_MASK
#define P_PREPARE_FOR_MPEG3_MASK
#define P_DO_NOT_RESET_ANALOG_LEVELS
#define P_ALLOW_UNDER_ALLOCATION_MASK
#define P_DATA_MODE_MASK
#define P_ASIO_BUFFER_MANAGEMENT_MASK

#define BIT_SKIP_SOUND
#define BIT_DATA_MODE
    
/* Bits in the CMD_MODIFY_CLOCK request. */
#define CMD_MODIFY_CLOCK_FD_BIT
#define CMD_MODIFY_CLOCK_T_BIT
#define CMD_MODIFY_CLOCK_S_BIT

/* Access to the results of the CMD_GET_TIME_CODE RMH. */
#define TIME_CODE_V_MASK
#define TIME_CODE_N_MASK
#define TIME_CODE_B_MASK
#define TIME_CODE_W_MASK

/* Values for the CMD_MANAGE_SIGNAL RMH. */
#define MANAGE_SIGNAL_TIME_CODE
#define MANAGE_SIGNAL_MIDI

/* Values for the CMD_CONFIG_TIME_CODE RMH. */
#define CONFIG_TIME_CODE_CANCEL
    
/* Mask to get only the effective time from the
 * high word out of the 2 returned by the DSP
 */
#define PCX_TIME_HI_MASK

/* Values for setting a H-Buffer time */
#define HBUFFER_TIME_HIGH
#define HBUFFER_TIME_LOW

#define NOTIFY_MASK_TIME_HIGH
#define MULTIPLE_MASK_TIME_HIGH
#define STREAM_MASK_TIME_HIGH


/*
 *
 */
void vx_init_rmh(struct vx_rmh *rmh, unsigned int cmd);

/**
 * vx_send_pipe_cmd_params - fill first command word for pipe commands
 * @rmh: the rmh to be modified
 * @is_capture: 0 = playback, 1 = capture operation
 * @param1: first pipe-parameter
 * @param2: second pipe-parameter
 */
static inline void vx_set_pipe_cmd_params(struct vx_rmh *rmh, int is_capture,
					  int param1, int param2)
{}

/**
 * vx_set_stream_cmd_params - fill first command word for stream commands
 * @rmh: the rmh to be modified
 * @is_capture: 0 = playback, 1 = capture operation
 * @pipe: the pipe index (zero-based)
 */
static inline void vx_set_stream_cmd_params(struct vx_rmh *rmh, int is_capture, int pipe)
{}

#endif /* __VX_CMD_H */