linux/sound/pci/mixart/mixart_core.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Driver for Digigram miXart soundcards
 *
 * low level interface with interrupt handling and mail box implementation
 *
 * Copyright (c) 2003 by Digigram <[email protected]>
 */

#ifndef __SOUND_MIXART_CORE_H
#define __SOUND_MIXART_CORE_H


enum mixart_message_id {};

#define MSG_DEFAULT_SIZE

struct mixart_msg
{};

/* structs used to communicate with miXart */

struct mixart_enum_connector_resp
{} __packed;


/* used for following struct */
#define MIXART_FLOAT_P_22_0_TO_HEX
#define MIXART_FLOAT_M_20_0_TO_HEX
#define MIXART_FLOAT____0_0_TO_HEX

struct mixart_audio_info_req
{} __packed;

struct mixart_analog_hw_info
{} __packed;

struct mixart_digital_hw_info
{} __packed;

struct mixart_analog_info
{} __packed;

struct mixart_digital_info
{} __packed;

struct mixart_audio_info
{} __packed;

struct mixart_audio_info_resp
{} __packed;


/* used for nb_bytes_max_per_sample */
#define MIXART_FLOAT_P__4_0_TO_HEX
#define MIXART_FLOAT_P__8_0_TO_HEX

struct mixart_stream_info
{} __packed;

/*  MSG_STREAM_ADD_INPUT_GROUP */
/*  MSG_STREAM_ADD_OUTPUT_GROUP */

struct mixart_streaming_group_req
{} __packed;

struct mixart_stream_desc
{} __packed;

struct mixart_streaming_group
{} __packed;

/* MSG_STREAM_DELETE_GROUP */

/* request : mixart_uid_t group */

struct mixart_delete_group_resp
{} __packed;


/* 	MSG_STREAM_START_INPUT_STAGE_PACKET  = 0x130000 + 7,
	MSG_STREAM_START_OUTPUT_STAGE_PACKET = 0x130000 + 8,
	MSG_STREAM_STOP_INPUT_STAGE_PACKET   = 0x130000 + 10,
	MSG_STREAM_STOP_OUTPUT_STAGE_PACKET  = 0x130000 + 11,
 */

struct mixart_fx_couple_uid
{} __packed;

struct mixart_txx_stream_desc
{} __packed;

struct mixart_flow_info
{} __packed;

struct mixart_stream_state_req
{} __packed;

/* 	MSG_STREAM_START_STREAM_GRP_PACKET   = 0x130000 + 6
	MSG_STREAM_STOP_STREAM_GRP_PACKET    = 0x130000 + 9
 */

struct mixart_group_state_req
{} __packed;

struct mixart_group_state_resp
{} __packed;



/* Structures used by the MSG_SERVICES_TIMER_NOTIFY command */

struct mixart_sample_pos
{} __packed;

/*
 * This structure is limited by the size of MSG_DEFAULT_SIZE. Instead of
 * having MIXART_MAX_STREAM_PER_CARD * MIXART_MAX_CARDS many streams,
 * this is capped to have a total size below MSG_DEFAULT_SIZE.
 */
#define MIXART_MAX_TIMER_NOTIFY_STREAMS
struct mixart_timer_notify
{} __packed;


/*	MSG_CONSOLE_GET_CLOCK_UID            = 0x070003,
 */

/* request is a uid with desc = MSG_CONSOLE_MANAGER | cardindex */

struct mixart_return_uid
{} __packed;

/*	MSG_CLOCK_CHECK_PROPERTIES           = 0x200001,
	MSG_CLOCK_SET_PROPERTIES             = 0x200002,
*/

enum mixart_clock_generic_type {};

enum mixart_clock_mode {};


struct mixart_clock_properties
{} __packed;

struct mixart_clock_properties_resp
{} __packed;


/*	MSG_STREAM_SET_INPUT_STAGE_PARAM     = 0x13000F */
/*	MSG_STREAM_SET_OUTPUT_STAGE_PARAM    = 0x130010 */

enum mixart_coding_type {};
enum mixart_sample_type {};

struct mixart_stream_param_desc
{} __packed;


/*	MSG_CONNECTOR_GET_OUT_AUDIO_LEVEL    = 0x050009,
 */


struct mixart_get_out_audio_level
{} __packed;


/*	MSG_CONNECTOR_SET_OUT_AUDIO_LEVEL    = 0x05000A,
 */

/* used for valid_mask below */
#define MIXART_AUDIO_LEVEL_ANALOG_MASK
#define MIXART_AUDIO_LEVEL_DIGITAL_MASK
#define MIXART_AUDIO_LEVEL_MONITOR_MASK
#define MIXART_AUDIO_LEVEL_MUTE_MASK
#define MIXART_AUDIO_LEVEL_MUTE_M1_MASK
#define MIXART_AUDIO_LEVEL_MUTE_M2_MASK

struct mixart_set_out_audio_level
{} __packed;


/*	MSG_SYSTEM_ENUM_PHYSICAL_IO          = 0x16000E,
 */

#define MIXART_MAX_PHYS_IO

struct mixart_uid_enumeration
{} __packed;


/*	MSG_PHYSICALIO_SET_LEVEL             = 0x0F0008,
	MSG_PHYSICALIO_GET_LEVEL             = 0x0F000C,
*/

struct mixart_io_channel_level
{} __packed;

struct mixart_io_level
{} __packed;


/*	MSG_STREAM_SET_IN_AUDIO_LEVEL        = 0x130015,
 */

struct mixart_in_audio_level_info
{} __packed;

struct mixart_set_in_audio_level_req
{} __packed;

/* response is a 32 bit status */


/*	MSG_STREAM_SET_OUT_STREAM_LEVEL      = 0x130017,
 */

/* defines used for valid_mask1 */
#define MIXART_OUT_STREAM_SET_LEVEL_LEFT_AUDIO1
#define MIXART_OUT_STREAM_SET_LEVEL_LEFT_AUDIO2
#define MIXART_OUT_STREAM_SET_LEVEL_RIGHT_AUDIO1
#define MIXART_OUT_STREAM_SET_LEVEL_RIGHT_AUDIO2
#define MIXART_OUT_STREAM_SET_LEVEL_STREAM_1
#define MIXART_OUT_STREAM_SET_LEVEL_STREAM_2
#define MIXART_OUT_STREAM_SET_LEVEL_MUTE_1
#define MIXART_OUT_STREAM_SET_LEVEL_MUTE_2

struct mixart_out_stream_level_info
{} __packed;

struct mixart_set_out_stream_level
{} __packed;

struct mixart_set_out_stream_level_req
{} __packed;

/* response to this request is a u32 status value */


/* exported */
void snd_mixart_init_mailbox(struct mixart_mgr *mgr);
void snd_mixart_exit_mailbox(struct mixart_mgr *mgr);

int  snd_mixart_send_msg(struct mixart_mgr *mgr, struct mixart_msg *request, int max_resp_size, void *resp_data);
int  snd_mixart_send_msg_wait_notif(struct mixart_mgr *mgr, struct mixart_msg *request, u32 notif_event);
int  snd_mixart_send_msg_nonblock(struct mixart_mgr *mgr, struct mixart_msg *request);

irqreturn_t snd_mixart_interrupt(int irq, void *dev_id);
irqreturn_t snd_mixart_threaded_irq(int irq, void *dev_id);

void snd_mixart_reset_board(struct mixart_mgr *mgr);

#endif /* __SOUND_MIXART_CORE_H */