hpi6205.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /*****************************************************************************
  2. AudioScience HPI driver
  3. Copyright (C) 1997-2010 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. Host Interface module for an ASI6205 based
  15. bus mastering PCI adapter.
  16. Copyright AudioScience, Inc., 2003
  17. ******************************************************************************/
  18. #ifndef _HPI6205_H_
  19. #define _HPI6205_H_
  20. /* transitional conditional compile shared between host and DSP */
  21. /* #define HPI6205_NO_HSR_POLL */
  22. #include "hpi_internal.h"
  23. /***********************************************************
  24. Defines used for basic messaging
  25. ************************************************************/
  26. #define H620_HIF_RESET 0
  27. #define H620_HIF_IDLE 1
  28. #define H620_HIF_GET_RESP 2
  29. #define H620_HIF_DATA_DONE 3
  30. #define H620_HIF_DATA_MASK 0x10
  31. #define H620_HIF_SEND_DATA 0x14
  32. #define H620_HIF_GET_DATA 0x15
  33. #define H620_HIF_UNKNOWN 0x0000ffff
  34. /***********************************************************
  35. Types used for mixer control caching
  36. ************************************************************/
  37. #define H620_MAX_ISTREAMS 32
  38. #define H620_MAX_OSTREAMS 32
  39. #define HPI_NMIXER_CONTROLS 2048
  40. /*********************************************************************
  41. This is used for dynamic control cache allocation
  42. **********************************************************************/
  43. struct controlcache_6205 {
  44. u32 number_of_controls;
  45. u32 physical_address32;
  46. u32 size_in_bytes;
  47. };
  48. /*********************************************************************
  49. This is used for dynamic allocation of async event array
  50. **********************************************************************/
  51. struct async_event_buffer_6205 {
  52. u32 physical_address32;
  53. u32 spare;
  54. struct hpi_fifo_buffer b;
  55. };
  56. /***********************************************************
  57. The Host located memory buffer that the 6205 will bus master
  58. in and out of.
  59. ************************************************************/
  60. #define HPI6205_SIZEOF_DATA (16*1024)
  61. struct bus_master_interface {
  62. u32 host_cmd;
  63. u32 dsp_ack;
  64. u32 transfer_size_in_bytes;
  65. union {
  66. struct hpi_message message_buffer;
  67. struct hpi_response response_buffer;
  68. u8 b_data[HPI6205_SIZEOF_DATA];
  69. } u;
  70. struct controlcache_6205 control_cache;
  71. struct async_event_buffer_6205 async_buffer;
  72. struct hpi_hostbuffer_status
  73. instream_host_buffer_status[H620_MAX_ISTREAMS];
  74. struct hpi_hostbuffer_status
  75. outstream_host_buffer_status[H620_MAX_OSTREAMS];
  76. };
  77. #endif