sound/pci/mixart/mixart_core.h

Source file repositories/reference/linux-study-clean/sound/pci/mixart/mixart_core.h

File Facts

System
Linux kernel
Corpus path
sound/pci/mixart/mixart_core.h
Extension
.h
Size
13474 bytes
Lines
566
Domain
Driver Families
Bucket
sound/pci
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef __SOUND_MIXART_CORE_H
#define __SOUND_MIXART_CORE_H


enum mixart_message_id {
	MSG_CONNECTOR_GET_AUDIO_INFO         = 0x050008,
	MSG_CONNECTOR_GET_OUT_AUDIO_LEVEL    = 0x050009,
	MSG_CONNECTOR_SET_OUT_AUDIO_LEVEL    = 0x05000A,

	MSG_CONSOLE_MANAGER                  = 0x070000,
	MSG_CONSOLE_GET_CLOCK_UID            = 0x070003,

	MSG_PHYSICALIO_SET_LEVEL             = 0x0F0008,

	MSG_STREAM_ADD_INPUT_GROUP           = 0x130000,
	MSG_STREAM_ADD_OUTPUT_GROUP          = 0x130001,
	MSG_STREAM_DELETE_GROUP              = 0x130004,
	MSG_STREAM_START_STREAM_GRP_PACKET   = 0x130006,
	MSG_STREAM_START_INPUT_STAGE_PACKET  = 0x130007,
	MSG_STREAM_START_OUTPUT_STAGE_PACKET = 0x130008,
	MSG_STREAM_STOP_STREAM_GRP_PACKET    = 0x130009,
	MSG_STREAM_STOP_INPUT_STAGE_PACKET   = 0x13000A,
	MSG_STREAM_STOP_OUTPUT_STAGE_PACKET  = 0x13000B,
	MSG_STREAM_SET_INPUT_STAGE_PARAM     = 0x13000F,
	MSG_STREAM_SET_OUTPUT_STAGE_PARAM    = 0x130010,
	MSG_STREAM_SET_IN_AUDIO_LEVEL        = 0x130015,
	MSG_STREAM_SET_OUT_STREAM_LEVEL      = 0x130017,

	MSG_SYSTEM_FIRST_ID                  = 0x160000,
	MSG_SYSTEM_ENUM_PHYSICAL_IO          = 0x16000E,
	MSG_SYSTEM_ENUM_PLAY_CONNECTOR       = 0x160017,
	MSG_SYSTEM_ENUM_RECORD_CONNECTOR     = 0x160018,
	MSG_SYSTEM_WAIT_SYNCHRO_CMD          = 0x16002C,
	MSG_SYSTEM_SEND_SYNCHRO_CMD          = 0x16002D,

	MSG_SERVICES_TIMER_NOTIFY            = 0x1D0404,
	MSG_SERVICES_REPORT_TRACES           = 0x1D0700,

	MSG_CLOCK_CHECK_PROPERTIES           = 0x200001,
	MSG_CLOCK_SET_PROPERTIES             = 0x200002,
};

#define MSG_DEFAULT_SIZE            512

struct mixart_msg
{
	u32          message_id;
	struct mixart_uid uid;
	void*        data;
	size_t       size;
};

/* structs used to communicate with miXart */

struct mixart_enum_connector_resp
{
	u32  error_code;
	u32  first_uid_offset;
	u32  uid_count;
	u32  current_uid_index;
	struct mixart_uid uid[MIXART_MAX_PHYS_CONNECTORS];
} __packed;


/* used for following struct */
#define MIXART_FLOAT_P_22_0_TO_HEX      0x41b00000  /* 22.0f */
#define MIXART_FLOAT_M_20_0_TO_HEX      0xc1a00000  /* -20.0f */
#define MIXART_FLOAT____0_0_TO_HEX      0x00000000  /* 0.0f */

struct mixart_audio_info_req
{
	u32 line_max_level;    /* float */
	u32 micro_max_level;   /* float */
	u32 cd_max_level;      /* float */
} __packed;

struct mixart_analog_hw_info
{
	u32 is_present;
	u32 hw_connection_type;
	u32 max_level;         /* float */
	u32 min_var_level;     /* float */
	u32 max_var_level;     /* float */
	u32 step_var_level;    /* float */
	u32 fix_gain;          /* float */
	u32 zero_var;          /* float */
} __packed;

struct mixart_digital_hw_info
{

Annotation

Implementation Notes