Go to the documentation of this file.
24 #ifndef _HPI_INTERNAL_H_
25 #define _HPI_INTERNAL_H_
30 #define HPI_MAX_ADAPTER_MEM_SPACES (2)
65 *locked_mem_handle,
u32 *p_physical_addr);
72 *locked_mem_handle,
void **ppv_virtual_addr);
91 #define compile_time_assert(cond, msg) \
92 typedef char ASSERT_##msg[(cond) ? 1 : -1]
128 #define HPI_CTL_ATTR(ctl, ai) ((HPI_CONTROL_##ctl << 8) + ai)
131 #define HPI_CTL_ATTR_INDEX(i) (i & 0xff)
134 #define HPI_CTL_ATTR_CONTROL(i) (i >> 8)
248 #define HPI_POLARITY_POSITIVE 0
249 #define HPI_POLARITY_NEGATIVE 1
254 #define HPI_COBRANET_HMI_cobra_bridge 0x20000
255 #define HPI_COBRANET_HMI_cobra_bridge_tx_pkt_buf \
256 (HPI_COBRANET_HMI_cobra_bridge + 0x1000)
257 #define HPI_COBRANET_HMI_cobra_bridge_rx_pkt_buf \
258 (HPI_COBRANET_HMI_cobra_bridge + 0x2000)
259 #define HPI_COBRANET_HMI_cobra_if_table1 0x110000
260 #define HPI_COBRANET_HMI_cobra_if_phy_address \
261 (HPI_COBRANET_HMI_cobra_if_table1 + 0xd)
262 #define HPI_COBRANET_HMI_cobra_protocolIP 0x72000
263 #define HPI_COBRANET_HMI_cobra_ip_mon_currentIP \
264 (HPI_COBRANET_HMI_cobra_protocolIP + 0x0)
265 #define HPI_COBRANET_HMI_cobra_ip_mon_staticIP \
266 (HPI_COBRANET_HMI_cobra_protocolIP + 0x2)
267 #define HPI_COBRANET_HMI_cobra_sys 0x100000
268 #define HPI_COBRANET_HMI_cobra_sys_desc \
269 (HPI_COBRANET_HMI_cobra_sys + 0x0)
270 #define HPI_COBRANET_HMI_cobra_sys_objectID \
271 (HPI_COBRANET_HMI_cobra_sys + 0x100)
272 #define HPI_COBRANET_HMI_cobra_sys_contact \
273 (HPI_COBRANET_HMI_cobra_sys + 0x200)
274 #define HPI_COBRANET_HMI_cobra_sys_name \
275 (HPI_COBRANET_HMI_cobra_sys + 0x300)
276 #define HPI_COBRANET_HMI_cobra_sys_location \
277 (HPI_COBRANET_HMI_cobra_sys + 0x400)
282 #define HPI_COBRANET_HMI_STATUS_RXPACKET 2
283 #define HPI_COBRANET_HMI_STATUS_TXPACKET 3
288 #define HPI_ETHERNET_HEADER_SIZE (16)
293 #define HPI_ETHERNET_PACKET_ID 0x85
295 #define HPI_ETHERNET_PACKET_V1 0x01
297 #define HPI_ETHERNET_PACKET_HOSTED_VIA_HMI 0x20
299 #define HPI_ETHERNET_PACKET_HOSTED_VIA_HMI_V1 0x21
301 #define HPI_ETHERNET_PACKET_HOSTED_VIA_HPI 0x40
303 #define HPI_ETHERNET_PACKET_HOSTED_VIA_HPI_V1 0x41
305 #define HPI_ETHERNET_UDP_PORT 44600
308 #define HPI_ETHERNET_TIMEOUT_MS 500
331 #define HPI_ID_ISAPNP_AUDIOSCIENCE 0x0669
333 #define HPI_PCI_VENDOR_ID_AUDIOSCIENCE 0x175C
335 #define HPI_PCI_VENDOR_ID_MOTOROLA 0x1057
337 #define HPI_PCI_VENDOR_ID_TI 0x104C
339 #define HPI_PCI_DEV_ID_PCI2040 0xAC60
341 #define HPI_PCI_DEV_ID_DSP6205 0xA106
343 #define HPI_USB_VENDOR_ID_AUDIOSCIENCE 0x1257
344 #define HPI_USB_W2K_TAG 0x57495341
345 #define HPI_USB_LINUX_TAG 0x4C495341
351 #define HPI_ADAPTER_INDEX_INVALID 0xFFFF
354 #define HPI_ADAPTER_FAMILY_MASK 0xff00
355 #define HPI_MODULE_FAMILY_MASK 0xfff0
357 #define HPI_ADAPTER_FAMILY_ASI(f) (f & HPI_ADAPTER_FAMILY_MASK)
358 #define HPI_MODULE_FAMILY_ASI(f) (f & HPI_MODULE_FAMILY_MASK)
359 #define HPI_ADAPTER_ASI(f) (f)
385 #define HPI_OBJ_MAXINDEX 14
388 #define HPI_OBJ_FUNCTION_SPACING 0x100
389 #define HPI_FUNC_ID(obj, i) (HPI_OBJ_##obj * HPI_OBJ_FUNCTION_SPACING + i)
391 #define HPI_EXTRACT_INDEX(fn) (fn & 0xff)
407 #define HPI_SUBSYS_FUNCTION_COUNT 17
433 #define HPI_ADAPTER_FUNCTION_COUNT 24
460 #define HPI_OSTREAM_FUNCTION_COUNT 25
482 #define HPI_ISTREAM_FUNCTION_COUNT 20
500 #define HPI_MIXER_FUNCTION_COUNT 14
505 #define HPI_CONTROL_FUNCTION_COUNT 3
510 #define HPI_NVMEMORY_FUNCTION_COUNT 3
517 #define HPI_GPIO_FUNCTION_COUNT 5
525 #define HPI_ASYNCEVENT_FUNCTION_COUNT 6
542 #define HPI_PROFILE_FUNCTION_COUNT 7
547 #ifndef DISABLE_PRAGMA_PACK1
548 #pragma pack(push, 1)
600 struct hpi_data_compat32 {
1033 #define HPI_MESSAGE_SIZE_BY_OBJECT { \
1034 sizeof(struct hpi_message_header) , \
1035 sizeof(struct hpi_message_header) + sizeof(struct hpi_subsys_msg),\
1036 sizeof(struct hpi_message_header) + sizeof(union hpi_adapterx_msg),\
1037 sizeof(struct hpi_message_header) + sizeof(struct hpi_stream_msg),\
1038 sizeof(struct hpi_message_header) + sizeof(struct hpi_stream_msg),\
1039 sizeof(struct hpi_message_header) + sizeof(struct hpi_mixer_msg),\
1040 sizeof(struct hpi_message_header) , \
1041 sizeof(struct hpi_message_header) + sizeof(struct hpi_control_msg),\
1042 sizeof(struct hpi_message_header) + sizeof(struct hpi_nvmemory_msg),\
1043 sizeof(struct hpi_message_header) + sizeof(struct hpi_gpio_msg),\
1044 sizeof(struct hpi_message_header) + sizeof(struct hpi_watchdog_msg),\
1045 sizeof(struct hpi_message_header) + sizeof(struct hpi_clock_msg),\
1046 sizeof(struct hpi_message_header) + sizeof(struct hpi_profile_msg),\
1047 sizeof(struct hpi_message_header), \
1048 sizeof(struct hpi_message_header) + sizeof(struct hpi_async_msg) \
1094 #define HPI_RESPONSE_SIZE_BY_OBJECT { \
1095 sizeof(struct hpi_response_header) , \
1096 sizeof(struct hpi_response_header) + sizeof(struct hpi_subsys_res),\
1097 sizeof(struct hpi_response_header) + sizeof(union hpi_adapterx_res),\
1098 sizeof(struct hpi_response_header) + sizeof(struct hpi_stream_res),\
1099 sizeof(struct hpi_response_header) + sizeof(struct hpi_stream_res),\
1100 sizeof(struct hpi_response_header) + sizeof(struct hpi_mixer_res),\
1101 sizeof(struct hpi_response_header) , \
1102 sizeof(struct hpi_response_header) + sizeof(struct hpi_control_res),\
1103 sizeof(struct hpi_response_header) + sizeof(struct hpi_nvmemory_res),\
1104 sizeof(struct hpi_response_header) + sizeof(struct hpi_gpio_res),\
1105 sizeof(struct hpi_response_header) + sizeof(struct hpi_watchdog_res),\
1106 sizeof(struct hpi_response_header) + sizeof(struct hpi_clock_res),\
1107 sizeof(struct hpi_response_header) + sizeof(struct hpi_profile_res),\
1108 sizeof(struct hpi_response_header), \
1109 sizeof(struct hpi_response_header) + sizeof(struct hpi_async_res) \
1113 #define HPINET_ETHERNET_DATA_SIZE (1500)
1114 #define HPINET_IP_HDR_SIZE (20)
1115 #define HPINET_IP_DATA_SIZE (HPINET_ETHERNET_DATA_SIZE - HPINET_IP_HDR_SIZE)
1116 #define HPINET_UDP_HDR_SIZE (8)
1117 #define HPINET_UDP_DATA_SIZE (HPINET_IP_DATA_SIZE - HPINET_UDP_HDR_SIZE)
1118 #define HPINET_ASI_HDR_SIZE (2)
1119 #define HPINET_ASI_DATA_SIZE (HPINET_UDP_DATA_SIZE - HPINET_ASI_HDR_SIZE)
1121 #define HPI_MAX_PAYLOAD_SIZE (HPINET_ASI_DATA_SIZE - 2)
1163 #define hpi_message_header_v1 hpi_message_header
1164 #define hpi_response_header_v1 hpi_response_header
1252 #define HPI_CACHE_INVALID_UINT16 0xFFFF
1254 #define HPI_CACHE_INVALID_SHORT -32768
1383 #ifndef DISABLE_PRAGMA_PACK1
1393 u16 *pw_object_index);
1396 const u16 object_index);
1405 u16 *pw_adapter_index);