hpi6000.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*****************************************************************************
  3. AudioScience HPI driver
  4. Copyright (C) 1997-2011 AudioScience Inc. <[email protected]>
  5. Public declarations for DSP Proramming Interface to TI C6701
  6. Shared between hpi6000.c and DSP code
  7. (C) Copyright AudioScience Inc. 1998-2003
  8. ******************************************************************************/
  9. #ifndef _HPI6000_H_
  10. #define _HPI6000_H_
  11. #define HPI_NMIXER_CONTROLS 200
  12. /*
  13. * Control caching is always supported in the HPI code.
  14. * The DSP should make sure that dwControlCacheSizeInBytes is initialized to 0
  15. * during boot to make it in-active.
  16. */
  17. struct hpi_hif_6000 {
  18. u32 host_cmd;
  19. u32 dsp_ack;
  20. u32 address;
  21. u32 length;
  22. u32 message_buffer_address;
  23. u32 response_buffer_address;
  24. u32 dsp_number;
  25. u32 adapter_info;
  26. u32 control_cache_is_dirty;
  27. u32 control_cache_address;
  28. u32 control_cache_size_in_bytes;
  29. u32 control_cache_count;
  30. };
  31. #define HPI_HIF_PACK_ADAPTER_INFO(adapter, version_major, version_minor) \
  32. ((adapter << 16) | (version_major << 8) | version_minor)
  33. #define HPI_HIF_ADAPTER_INFO_EXTRACT_ADAPTER(adapterinfo) \
  34. ((adapterinfo >> 16) & 0xffff)
  35. #define HPI_HIF_ADAPTER_INFO_EXTRACT_HWVERSION_MAJOR(adapterinfo) \
  36. ((adapterinfo >> 8) & 0xff)
  37. #define HPI_HIF_ADAPTER_INFO_EXTRACT_HWVERSION_MINOR(adapterinfo) \
  38. (adapterinfo & 0xff)
  39. /* Command/status exchanged between host and DSP */
  40. #define HPI_HIF_IDLE 0
  41. #define HPI_HIF_SEND_MSG 1
  42. #define HPI_HIF_GET_RESP 2
  43. #define HPI_HIF_DATA_MASK 0x10
  44. #define HPI_HIF_SEND_DATA 0x13
  45. #define HPI_HIF_GET_DATA 0x14
  46. #define HPI_HIF_SEND_DONE 5
  47. #define HPI_HIF_RESET 9
  48. #endif /* _HPI6000_H_ */