hpi6205.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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. 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. #include "hpi_internal.h"
  21. /***********************************************************
  22. Defines used for basic messaging
  23. ************************************************************/
  24. #define H620_HIF_RESET 0
  25. #define H620_HIF_IDLE 1
  26. #define H620_HIF_GET_RESP 2
  27. #define H620_HIF_DATA_DONE 3
  28. #define H620_HIF_DATA_MASK 0x10
  29. #define H620_HIF_SEND_DATA 0x14
  30. #define H620_HIF_GET_DATA 0x15
  31. #define H620_HIF_UNKNOWN 0x0000ffff
  32. /***********************************************************
  33. Types used for mixer control caching
  34. ************************************************************/
  35. #define H620_MAX_ISTREAMS 32
  36. #define H620_MAX_OSTREAMS 32
  37. #define HPI_NMIXER_CONTROLS 2048
  38. /*********************************************************************
  39. This is used for dynamic control cache allocation
  40. **********************************************************************/
  41. struct controlcache_6205 {
  42. u32 number_of_controls;
  43. u32 physical_address32;
  44. u32 size_in_bytes;
  45. };
  46. /*********************************************************************
  47. This is used for dynamic allocation of async event array
  48. **********************************************************************/
  49. struct async_event_buffer_6205 {
  50. u32 physical_address32;
  51. u32 spare;
  52. struct hpi_fifo_buffer b;
  53. };
  54. /***********************************************************
  55. The Host located memory buffer that the 6205 will bus master
  56. in and out of.
  57. ************************************************************/
  58. #define HPI6205_SIZEOF_DATA (16*1024)
  59. struct message_buffer_6205 {
  60. struct hpi_message message;
  61. char data[256];
  62. };
  63. struct response_buffer_6205 {
  64. struct hpi_response response;
  65. char data[256];
  66. };
  67. union buffer_6205 {
  68. struct message_buffer_6205 message_buffer;
  69. struct response_buffer_6205 response_buffer;
  70. u8 b_data[HPI6205_SIZEOF_DATA];
  71. };
  72. struct bus_master_interface {
  73. u32 host_cmd;
  74. u32 dsp_ack;
  75. u32 transfer_size_in_bytes;
  76. union buffer_6205 u;
  77. struct controlcache_6205 control_cache;
  78. struct async_event_buffer_6205 async_buffer;
  79. struct hpi_hostbuffer_status
  80. instream_host_buffer_status[H620_MAX_ISTREAMS];
  81. struct hpi_hostbuffer_status
  82. outstream_host_buffer_status[H620_MAX_OSTREAMS];
  83. };
  84. #endif