/**12AudioScience HPI driver3Copyright (C) 1997-2010 AudioScience Inc. <[email protected]>45This program is free software; you can redistribute it and/or modify6it under the terms of version 2 of the GNU General Public License as7published by the Free Software Foundation;89This program is distributed in the hope that it will be useful,10but WITHOUT ANY WARRANTY; without even the implied warranty of11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12GNU General Public License for more details.1314You should have received a copy of the GNU General Public License15along with this program; if not, write to the Free Software16Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA1718*/1920struct hpi_adapter_obj {21struct hpi_pci pci; /* PCI info - bus#,dev#,address etc */22u16 adapter_type; /* ASI6701 etc */23u16 index; /* */24u16 open; /* =1 when adapter open */25u16 mixer_open;2627struct hpios_spinlock dsp_lock;2829u16 dsp_crashed;30u16 has_control_cache;31void *priv;32};3334struct hpi_control_cache {35/** indicates whether the structures are initialized */36u16 init;37u16 adap_idx;38u32 control_count;39u32 cache_size_in_bytes;40/** pointer to allocated memory of lookup pointers. */41struct hpi_control_cache_info **p_info;42/** pointer to DSP's control cache. */43u8 *p_cache;44};4546struct hpi_adapter_obj *hpi_find_adapter(u16 adapter_index);4748u16 hpi_add_adapter(struct hpi_adapter_obj *pao);4950void hpi_delete_adapter(struct hpi_adapter_obj *pao);5152short hpi_check_control_cache(struct hpi_control_cache *pC,53struct hpi_message *phm, struct hpi_response *phr);54struct hpi_control_cache *hpi_alloc_control_cache(const u3255number_of_controls, const u32 size_in_bytes, u8 *pDSP_control_buffer);56void hpi_free_control_cache(struct hpi_control_cache *p_cache);5758void hpi_cmn_control_cache_sync_to_msg(struct hpi_control_cache *pC,59struct hpi_message *phm, struct hpi_response *phr);6061u16 hpi_validate_response(struct hpi_message *phm, struct hpi_response *phr);6263hpi_handler_func HPI_COMMON;646566