hpi6205.h 2.6 KB

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