Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
hpi_internal.h
Go to the documentation of this file.
1 /******************************************************************************
2 
3  AudioScience HPI driver
4  Copyright (C) 1997-2012 AudioScience Inc. <[email protected]>
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of version 2 of the GNU General Public License as
8  published by the Free Software Foundation;
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; if not, write to the Free Software
17  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 
19 HPI internal definitions
20 
21 (C) Copyright AudioScience Inc. 1996-2009
22 ******************************************************************************/
23 
24 #ifndef _HPI_INTERNAL_H_
25 #define _HPI_INTERNAL_H_
26 
27 #include "hpi.h"
28 
30 #define HPI_MAX_ADAPTER_MEM_SPACES (2)
31 
32 /* Each OS needs its own hpios.h */
33 #include "hpios.h"
34 
35 /* physical memory allocation */
36 
45 u16 hpios_locked_mem_alloc(struct consistent_dma_area *p_locked_mem_handle,
47  u32 size,
48  struct pci_dev *p_os_reference
50  );
51 
58 u16 hpios_locked_mem_free(struct consistent_dma_area *locked_mem_handle);
59 
65  *locked_mem_handle, u32 *p_physical_addr);
66 
72  *locked_mem_handle, void **ppv_virtual_addr);
73 
77 u16 hpios_locked_mem_valid(struct consistent_dma_area *locked_mem_handle);
78 
79 /* timing/delay */
80 void hpios_delay_micro_seconds(u32 num_micro_sec);
81 
82 struct hpi_message;
83 struct hpi_response;
84 
85 typedef void hpi_handler_func(struct hpi_message *, struct hpi_response *);
86 
87 /* If the assert fails, compiler complains
88  something like size of array `msg' is negative.
89  Unlike linux BUILD_BUG_ON, this works outside function scope.
90 */
91 #define compile_time_assert(cond, msg) \
92  typedef char ASSERT_##msg[(cond) ? 1 : -1]
93 
94 /******************************************* bus types */
95 enum HPI_BUSES {
100 };
101 
103  /* 0, 256 are invalid, 1..255 reserved for global options */
110 };
111 
121  /* Note Flags >= (1<<8) are for DSP internal use only */
122 };
123 
124 /******************************************* CONTROL ATTRIBUTES ****/
125 /* (in order of control type ID */
126 
127 /* This allows for 255 control types, 256 unique attributes each */
128 #define HPI_CTL_ATTR(ctl, ai) ((HPI_CONTROL_##ctl << 8) + ai)
129 
130 /* Get the sub-index of the attribute for a control type */
131 #define HPI_CTL_ATTR_INDEX(i) (i & 0xff)
132 
133 /* Extract the control from the control attribute */
134 #define HPI_CTL_ATTR_CONTROL(i) (i >> 8)
135 
146 
153 
159 
162 
167 
173 
176 
192 
194 
196 
201 
208 
210 
214 
221 
227 
231 
235 
244 
246 };
247 
248 #define HPI_POLARITY_POSITIVE 0
249 #define HPI_POLARITY_NEGATIVE 1
250 
251 /*------------------------------------------------------------
252  Cobranet Chip Bridge - copied from HMI.H
253 ------------------------------------------------------------*/
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)
278 
279 /*------------------------------------------------------------
280  Cobranet Chip Status bits
281 ------------------------------------------------------------*/
282 #define HPI_COBRANET_HMI_STATUS_RXPACKET 2
283 #define HPI_COBRANET_HMI_STATUS_TXPACKET 3
284 
285 /*------------------------------------------------------------
286  Ethernet header size
287 ------------------------------------------------------------*/
288 #define HPI_ETHERNET_HEADER_SIZE (16)
289 
290 /* These defines are used to fill in protocol information for an Ethernet packet
291  sent using HMI on CS18102 */
293 #define HPI_ETHERNET_PACKET_ID 0x85
294 
295 #define HPI_ETHERNET_PACKET_V1 0x01
296 
297 #define HPI_ETHERNET_PACKET_HOSTED_VIA_HMI 0x20
298 
299 #define HPI_ETHERNET_PACKET_HOSTED_VIA_HMI_V1 0x21
300 
301 #define HPI_ETHERNET_PACKET_HOSTED_VIA_HPI 0x40
302 
303 #define HPI_ETHERNET_PACKET_HOSTED_VIA_HPI_V1 0x41
304 
305 #define HPI_ETHERNET_UDP_PORT 44600
308 #define HPI_ETHERNET_TIMEOUT_MS 500
309 
322 };
323 
324 /*****************************************************************************/
325 /*****************************************************************************/
326 /******** HPI LOW LEVEL MESSAGES *******/
327 /*****************************************************************************/
328 /*****************************************************************************/
331 #define HPI_ID_ISAPNP_AUDIOSCIENCE 0x0669
332 
333 #define HPI_PCI_VENDOR_ID_AUDIOSCIENCE 0x175C
334 
335 #define HPI_PCI_VENDOR_ID_MOTOROLA 0x1057
336 
337 #define HPI_PCI_VENDOR_ID_TI 0x104C
338 
339 #define HPI_PCI_DEV_ID_PCI2040 0xAC60
340 
341 #define HPI_PCI_DEV_ID_DSP6205 0xA106
342 
343 #define HPI_USB_VENDOR_ID_AUDIOSCIENCE 0x1257
344 #define HPI_USB_W2K_TAG 0x57495341 /* "ASIW" */
345 #define HPI_USB_LINUX_TAG 0x4C495341 /* "ASIL" */
346 
351 #define HPI_ADAPTER_INDEX_INVALID 0xFFFF
352 
354 #define HPI_ADAPTER_FAMILY_MASK 0xff00
355 #define HPI_MODULE_FAMILY_MASK 0xfff0
356 
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)
360 
368 };
369 
383  /* HPI_ OBJ_ CONTROLEX = 13, */
385 #define HPI_OBJ_MAXINDEX 14
386 };
387 
388 #define HPI_OBJ_FUNCTION_SPACING 0x100
389 #define HPI_FUNC_ID(obj, i) (HPI_OBJ_##obj * HPI_OBJ_FUNCTION_SPACING + i)
390 
391 #define HPI_EXTRACT_INDEX(fn) (fn & 0xff)
392 
394  HPI_SUBSYS_OPEN = HPI_FUNC_ID(SUBSYSTEM, 1),
398  HPI_SUBSYS_CLOSE = HPI_FUNC_ID(SUBSYSTEM, 6),
407 #define HPI_SUBSYS_FUNCTION_COUNT 17
408 
433 #define HPI_ADAPTER_FUNCTION_COUNT 24
434 
460 #define HPI_OSTREAM_FUNCTION_COUNT 25
461 
482 #define HPI_ISTREAM_FUNCTION_COUNT 20
483 
484 /* NOTE:
485  GET_NODE_INFO, SET_CONNECTION, GET_CONNECTIONS are not currently used */
500 #define HPI_MIXER_FUNCTION_COUNT 14
501 
505 #define HPI_CONTROL_FUNCTION_COUNT 3
506 
510 #define HPI_NVMEMORY_FUNCTION_COUNT 3
511 
517 #define HPI_GPIO_FUNCTION_COUNT 5
518 
523  HPI_ASYNCEVENT_GET = HPI_FUNC_ID(ASYNCEVENT, 5),
525 #define HPI_ASYNCEVENT_FUNCTION_COUNT 6
526 
530 
534 
542 #define HPI_PROFILE_FUNCTION_COUNT 7
543 };
544 
545 /* ////////////////////////////////////////////////////////////////////// */
546 /* STRUCTURES */
547 #ifndef DISABLE_PRAGMA_PACK1
548 #pragma pack(push, 1)
549 #endif
550 
552 struct hpi_pci {
554  struct pci_dev *pci_dev;
555 };
556 
557 struct hpi_resource {
558  union {
559  const struct hpi_pci *pci;
560  const char *net_if;
561  } r;
562 #ifndef HPI64BIT /* keep structure size constant */
564 #endif
565  u16 bus_type; /* HPI_BUS_PNPISA, _PCI, _USB etc */
567 
568 };
569 
578 };
579 
582 struct hpi_msg_data {
585 #ifndef HPI64BIT
587 #endif
589 };
590 
596 };
597 
598 #ifdef HPI64BIT
599 /* Compatibility version of struct hpi_data*/
600 struct hpi_data_compat32 {
601  struct hpi_msg_format format;
602  u32 pb_data;
603  u32 padding;
604  u32 data_size;
605 };
606 #endif
607 
608 struct hpi_buffer {
614 };
615 
616 /*/////////////////////////////////////////////////////////////////////////// */
617 /* This is used for background buffer bus mastering stream buffers. */
622  /* DSP index in to the host bus master buffer. */
624  /* Host index in to the host bus master buffer. */
627 };
628 
629 struct hpi_streamid {
633 };
634 
638 };
639 
642 };
643 
646  u32 data; /* extended version */
651 };
652 
654  struct {
657  } debug_read;
658  struct {
661  } mode;
662  struct {
664  } module_info;
665  struct {
666  u16 index;
669  } property_enum;
670  struct {
674  } property_set;
675  struct {
679  } restart;
680  struct {
681  u32 pad32;
683  } test_assert;
684  struct {
686  } irq_query;
687  u32 pad[3];
688 };
689 
699 };
700 
703  struct {
710  } assert;
711  struct {
713  } mode;
714  struct {
717  } property_get;
718  struct {
720  } irq_query;
721 };
722 
724  union {
733  } u;
734 };
735 
737  union {
738  struct {
739  /* size of hardware buffer */
741  /* OutStream - data to play,
742  InStream - data recorded */
744  /* OutStream - samples played,
745  InStream - samples recorded */
747  /* Adapter - OutStream - data to play,
748  InStream - data recorded */
750  u16 state; /* HPI_STATE_PLAYING, _STATE_STOPPED */
752  } stream_info;
753  struct {
757  u16 state;
760  u16 padding;
763  struct {
764  /* bitmap of grouped OutStreams */
766  /* bitmap of grouped InStreams */
768  } group_info;
769  struct {
770  /* pointer to the buffer */
772  /* pointer to the hostbuffer status */
774  } hostbuffer_info;
775  } u;
776 };
777 
780  u16 control_type; /* = HPI_CONTROL_METER _VOLUME etc */
781  u16 padding1; /* Maintain alignment of subsequent fields */
782  u16 node_type1; /* = HPI_SOURCENODE_LINEIN etc */
783  u16 node_index1; /* = 0..N */
786  u16 padding2; /* round to 4 bytes */
787 };
788 
790  u16 src_node_type; /* = HPI_SOURCENODE_LINEIN etc */
791  u16 src_node_index; /* = 0..N */
794  /* Also controlType for MixerGetControlByIndex */
796  /* may indicate which DSP the control is located on */
798 };
799 
801  struct {
804  u32 length_in_bytes; /* length in bytes of p_data */
805  u32 p_data; /* pointer to a data array */
806  } gcabi;
807  struct {
810  } store; /* for HPI_MIXER_STORE message */
811 };
812 
814  struct {
815  u32 bytes_returned; /* size of items returned */
816  u32 p_data; /* pointer to data array */
817  u16 more_to_do; /* indicates if there is more to do */
818  } gcabi;
819  struct {
820  u32 total_controls; /* count of controls in the mixer */
821  u32 cache_controls; /* count of controls in the cac */
822  u32 cache_bytes; /* size of cache */
823  } cache_info;
824 };
825 
827  u16 attribute; /* control attribute or property */
829  u32 param1; /* generic parameter 1 */
830  u32 param2; /* generic parameter 2 */
832 };
833 
835  u16 attribute; /* control attribute or property */
836  u16 saved_index; /* only used in ctrl save/restore */
837  union {
838  struct {
839  u32 param1; /* generic parameter 1 */
840  u32 param2; /* generic parameter 2 */
842  } old;
843  union {
849  struct {
852  } mode;
854  } tuner;
855  } u;
856 };
857 
859  /* Could make union. dwParam, anLogValue never used in same response */
863 };
864 
866  struct {
870  } old;
871  union {
876  struct {
877  u32 data[2];
879  } rds;
880  short s_level;
881  struct {
884  } status;
885  } tuner;
886  struct {
887  char sz_data[8];
889  } chars8;
890  char c_data12[12];
891  union {
892  struct {
896  } status;
897  } cobranet;
898 };
899 
903 };
904 
908 };
909 
910 struct hpi_gpio_msg {
913 };
914 
915 struct hpi_gpio_res {
919 };
920 
925 };
926 
928  union {
929  struct {
931  } count;
932  struct {
936  } get;
938  } u;
939 };
940 
943 };
944 
947 };
948 
954 };
955 
963 };
964 
968 };
969 
972 };
973 
980 };
981 
983  u8 sz_name[32];
984 };
985 
987  union {
991  } u;
992 };
993 
995  u16 size; /* total size in bytes */
996  u8 type; /* HPI_TYPE_MESSAGE */
997  u8 version; /* message version */
998  u16 object; /* HPI_OBJ_* */
999  u16 function; /* HPI_SUBSYS_xxx, HPI_ADAPTER_xxx */
1000  u16 adapter_index; /* the adapter index */
1002 };
1003 
1004 struct hpi_message {
1005  /* following fields must match HPI_MESSAGE_HEADER */
1006  u16 size; /* total size in bytes */
1007  u8 type; /* HPI_TYPE_MESSAGE */
1008  u8 version; /* message version */
1009  u16 object; /* HPI_OBJ_* */
1010  u16 function; /* HPI_SUBSYS_xxx, HPI_ADAPTER_xxx */
1011  u16 adapter_index; /* the adapter index */
1013  union {
1018  union hpi_mixerx_msg mx; /* extended mixer; */
1019  struct hpi_control_msg c; /* mixer control; */
1020  /* identical to struct hpi_control_msg,
1021  but field naming is improved */
1024  struct hpi_gpio_msg l; /* digital i/o */
1026  struct hpi_clock_msg t; /* dsp time */
1029  char fixed_size[32];
1030  } u;
1031 };
1032 
1033 #define HPI_MESSAGE_SIZE_BY_OBJECT { \
1034  sizeof(struct hpi_message_header) , /* Default, no object type 0 */ \
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) , /* no node message */ \
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), /* controlx obj removed */ \
1048  sizeof(struct hpi_message_header) + sizeof(struct hpi_async_msg) \
1049 }
1050 
1051 /*
1052 Note that the wSpecificError error field should be inspected and potentially
1053 reported whenever HPI_ERROR_DSP_COMMUNICATION or HPI_ERROR_DSP_BOOTLOAD is
1054 returned in wError.
1055 */
1058  u8 type; /* HPI_TYPE_RESPONSE */
1059  u8 version; /* response version */
1060  u16 object; /* HPI_OBJ_* */
1061  u16 function; /* HPI_SUBSYS_xxx, HPI_ADAPTER_xxx */
1062  u16 error; /* HPI_ERROR_xxx */
1063  u16 specific_error; /* adapter specific error */
1064 };
1065 
1067 /* following fields must match HPI_RESPONSE_HEADER */
1069  u8 type; /* HPI_TYPE_RESPONSE */
1070  u8 version; /* response version */
1071  u16 object; /* HPI_OBJ_* */
1072  u16 function; /* HPI_SUBSYS_xxx, HPI_ADAPTER_xxx */
1073  u16 error; /* HPI_ERROR_xxx */
1074  u16 specific_error; /* adapter specific error */
1075  union {
1080  union hpi_mixerx_res mx; /* extended mixer; */
1081  struct hpi_control_res c; /* mixer control; */
1082  /* identical to hpi_control_res, but field naming is improved */
1085  struct hpi_gpio_res l; /* digital i/o */
1087  struct hpi_clock_res t; /* dsp time */
1090  u8 bytes[52];
1091  } u;
1092 };
1093 
1094 #define HPI_RESPONSE_SIZE_BY_OBJECT { \
1095  sizeof(struct hpi_response_header) ,/* Default, no object type 0 */ \
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) , /* no node response */ \
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), /* controlx obj removed */ \
1109  sizeof(struct hpi_response_header) + sizeof(struct hpi_async_res) \
1110 }
1111 
1112 /*********************** version 1 message/response **************************/
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)
1120 
1121 #define HPI_MAX_PAYLOAD_SIZE (HPINET_ASI_DATA_SIZE - 2)
1122 
1123 /* New style message/response, but still V0 compatible */
1126 };
1127 
1129  struct hpi_response_header h; /*v0 */
1131 };
1132 
1135  u8 bytes[1024];
1136 };
1137 
1143 };
1144 
1148  u8 bytes[256];
1149 };
1150 
1154 };
1155 
1159  u8 bytes[256];
1160 };
1161 
1162 #if 1
1163 #define hpi_message_header_v1 hpi_message_header
1164 #define hpi_response_header_v1 hpi_response_header
1165 #else
1166 /* V1 headers in Addition to v0 headers */
1167 struct hpi_message_header_v1 {
1168  struct hpi_message_header h0;
1169 /* struct {
1170 } h1; */
1171 };
1172 
1173 struct hpi_response_header_v1 {
1174  struct hpi_response_header h0;
1175  struct {
1176  u16 adapter_index; /* the adapter index */
1177  u16 obj_index; /* object index */
1178  } h1;
1179 };
1180 #endif
1181 
1184  union {
1193  struct hpi_gpio_msg l;
1198  } u;
1199 };
1200 
1203  union {
1212  struct hpi_gpio_res l;
1217  } u;
1218 };
1219 
1221  struct hpi_message m0; /* version 0 */
1224 };
1225 
1227  struct hpi_response r0; /* version 0 */
1230 };
1231 
1233  HPI_MAX_PAYLOAD_SIZE), message_buffer_ok);
1235  HPI_MAX_PAYLOAD_SIZE), response_buffer_ok);
1236 
1237 /*////////////////////////////////////////////////////////////////////////// */
1238 /* declarations for compact control calls */
1246 };
1247 
1248 /*////////////////////////////////////////////////////////////////////////// */
1249 /* declarations for control caching (internal to HPI<->DSP interaction) */
1250 
1252 #define HPI_CACHE_INVALID_UINT16 0xFFFF
1253 
1254 #define HPI_CACHE_INVALID_SHORT -32768
1255 
1267 };
1268 
1271  short an_log[2];
1272  unsigned short flags;
1273  char padding[2];
1274 };
1275 
1278  short an_log_peak[2];
1279  short an_logRMS[2];
1280 };
1281 
1285  char temp_padding[6];
1286 };
1287 
1292  char temp_padding[4];
1293 };
1294 
1297  short an_log[2];
1298  char temp_padding[4];
1299 };
1300 
1306 };
1307 
1312 };
1313 
1317  char temp_padding[4];
1318 };
1319 
1323  char temp_padding[6];
1324 };
1325 
1329  char temp_padding[4];
1330 };
1331 
1337 };
1338 
1342  char temp_padding[6];
1343 };
1344 
1346  union {
1360  } u;
1361 };
1362 
1374 };
1375 
1376 /* 2^N sized FIFO buffer (internal to HPI<->DSP interaction) */
1381 };
1382 
1383 #ifndef DISABLE_PRAGMA_PACK1
1384 #pragma pack(pop)
1385 #endif
1386 
1387 /* skip host side function declarations for DSP
1388  compile and documentation extraction */
1389 
1390 char hpi_handle_object(const u32 handle);
1391 
1392 void hpi_handle_to_indexes(const u32 handle, u16 *pw_adapter_index,
1393  u16 *pw_object_index);
1394 
1395 u32 hpi_indexes_to_handle(const char c_object, const u16 adapter_index,
1396  const u16 object_index);
1397 
1398 /*////////////////////////////////////////////////////////////////////////// */
1399 
1400 /* main HPI entry point */
1401 void hpi_send_recv(struct hpi_message *phm, struct hpi_response *phr);
1402 
1403 /* used in PnP OS/driver */
1404 u16 hpi_subsys_create_adapter(const struct hpi_resource *p_resource,
1405  u16 *pw_adapter_index);
1406 
1407 u16 hpi_outstream_host_buffer_get_info(u32 h_outstream, u8 **pp_buffer,
1408  struct hpi_hostbuffer_status **pp_status);
1409 
1410 u16 hpi_instream_host_buffer_get_info(u32 h_instream, u8 **pp_buffer,
1411  struct hpi_hostbuffer_status **pp_status);
1412 
1413 u16 hpi_adapter_restart(u16 adapter_index);
1414 
1415 /*
1416 The following 3 functions were last declared in header files for
1417 driver 3.10. HPI_ControlQuery() used to be the recommended way
1418 of getting a volume range. Declared here for binary asihpi32.dll
1419 compatibility.
1420 */
1421 
1422 void hpi_format_to_msg(struct hpi_msg_format *pMF,
1423  const struct hpi_format *pF);
1425 
1426 /*////////////////////////////////////////////////////////////////////////// */
1427 /* declarations for individual HPI entry points */
1430 
1431 #endif /* _HPI_INTERNAL_H_ */