hpi6000.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*****************************************************************************
  2. AudioScience HPI driver
  3. Copyright (C) 1997-2011 AudioScience Inc. <support@audioscience.com>
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of version 2 of the GNU General Public License as
  6. published by the Free Software Foundation;
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; if not, write to the Free Software
  13. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  14. Public declarations for DSP Proramming Interface to TI C6701
  15. Shared between hpi6000.c and DSP code
  16. (C) Copyright AudioScience Inc. 1998-2003
  17. ******************************************************************************/
  18. #ifndef _HPI6000_H_
  19. #define _HPI6000_H_
  20. #define HPI_NMIXER_CONTROLS 200
  21. /*
  22. * Control caching is always supported in the HPI code.
  23. * The DSP should make sure that dwControlCacheSizeInBytes is initialized to 0
  24. * during boot to make it in-active.
  25. */
  26. struct hpi_hif_6000 {
  27. u32 host_cmd;
  28. u32 dsp_ack;
  29. u32 address;
  30. u32 length;
  31. u32 message_buffer_address;
  32. u32 response_buffer_address;
  33. u32 dsp_number;
  34. u32 adapter_info;
  35. u32 control_cache_is_dirty;
  36. u32 control_cache_address;
  37. u32 control_cache_size_in_bytes;
  38. u32 control_cache_count;
  39. };
  40. #define HPI_HIF_PACK_ADAPTER_INFO(adapter, version_major, version_minor) \
  41. ((adapter << 16) | (version_major << 8) | version_minor)
  42. #define HPI_HIF_ADAPTER_INFO_EXTRACT_ADAPTER(adapterinfo) \
  43. ((adapterinfo >> 16) & 0xffff)
  44. #define HPI_HIF_ADAPTER_INFO_EXTRACT_HWVERSION_MAJOR(adapterinfo) \
  45. ((adapterinfo >> 8) & 0xff)
  46. #define HPI_HIF_ADAPTER_INFO_EXTRACT_HWVERSION_MINOR(adapterinfo) \
  47. (adapterinfo & 0xff)
  48. /* Command/status exchanged between host and DSP */
  49. #define HPI_HIF_IDLE 0
  50. #define HPI_HIF_SEND_MSG 1
  51. #define HPI_HIF_GET_RESP 2
  52. #define HPI_HIF_DATA_MASK 0x10
  53. #define HPI_HIF_SEND_DATA 0x13
  54. #define HPI_HIF_GET_DATA 0x14
  55. #define HPI_HIF_SEND_DONE 5
  56. #define HPI_HIF_RESET 9
  57. #endif /* _HPI6000_H_ */