0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 struct hpi_adapter_obj;
0011
0012
0013 typedef int adapter_int_func(struct hpi_adapter_obj *pao, u32 message);
0014
0015 #define HPI_IRQ_NONE (0)
0016 #define HPI_IRQ_MESSAGE (1)
0017 #define HPI_IRQ_MIXER (2)
0018
0019 struct hpi_adapter_obj {
0020 struct hpi_pci pci;
0021 u16 type;
0022 u16 index;
0023
0024 struct hpios_spinlock dsp_lock;
0025
0026 u16 dsp_crashed;
0027 u16 has_control_cache;
0028 void *priv;
0029 adapter_int_func *irq_query_and_clear;
0030 struct hpi_hostbuffer_status *instream_host_buffer_status;
0031 struct hpi_hostbuffer_status *outstream_host_buffer_status;
0032 };
0033
0034 struct hpi_control_cache {
0035
0036 u16 init;
0037 u16 adap_idx;
0038 u32 control_count;
0039 u32 cache_size_in_bytes;
0040
0041 struct hpi_control_cache_info **p_info;
0042
0043 u8 *p_cache;
0044 };
0045
0046 struct hpi_adapter_obj *hpi_find_adapter(u16 adapter_index);
0047
0048 u16 hpi_add_adapter(struct hpi_adapter_obj *pao);
0049
0050 void hpi_delete_adapter(struct hpi_adapter_obj *pao);
0051
0052 short hpi_check_control_cache(struct hpi_control_cache *pC,
0053 struct hpi_message *phm, struct hpi_response *phr);
0054
0055 short hpi_check_control_cache_single(struct hpi_control_cache_single *pC,
0056 struct hpi_message *phm, struct hpi_response *phr);
0057
0058 struct hpi_control_cache *hpi_alloc_control_cache(const u32
0059 number_of_controls, const u32 size_in_bytes, u8 *pDSP_control_buffer);
0060
0061 void hpi_free_control_cache(struct hpi_control_cache *p_cache);
0062
0063 void hpi_cmn_control_cache_sync_to_msg(struct hpi_control_cache *pC,
0064 struct hpi_message *phm, struct hpi_response *phr);
0065
0066 void hpi_cmn_control_cache_sync_to_msg_single(struct hpi_control_cache_single
0067 *pC, struct hpi_message *phm, struct hpi_response *phr);
0068
0069 u16 hpi_validate_response(struct hpi_message *phm, struct hpi_response *phr);
0070
0071 hpi_handler_func HPI_COMMON;