1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*****************************************************************************
4 AudioScience HPI driver
5 Copyright (C) 1997-2011 AudioScience Inc. <support@audioscience.com>
8 Host Interface module for an ASI6205 based
9 bus mastering PCI adapter.
11 Copyright AudioScience, Inc., 2003
12 ******************************************************************************/
17 #include "hpi_internal.h"
19 /***********************************************************
20 Defines used for basic messaging
21 ************************************************************/
22 #define H620_HIF_RESET 0
23 #define H620_HIF_IDLE 1
24 #define H620_HIF_GET_RESP 2
25 #define H620_HIF_DATA_DONE 3
26 #define H620_HIF_DATA_MASK 0x10
27 #define H620_HIF_SEND_DATA 0x14
28 #define H620_HIF_GET_DATA 0x15
29 #define H620_HIF_UNKNOWN 0x0000ffff
31 /***********************************************************
32 Types used for mixer control caching
33 ************************************************************/
35 #define H620_MAX_ISTREAMS 32
36 #define H620_MAX_OSTREAMS 32
37 #define HPI_NMIXER_CONTROLS 2048
39 /*********************************************************************
40 This is used for dynamic control cache allocation
41 **********************************************************************/
42 struct controlcache_6205
{
43 u32 number_of_controls
;
44 u32 physical_address32
;
48 /*********************************************************************
49 This is used for dynamic allocation of async event array
50 **********************************************************************/
51 struct async_event_buffer_6205
{
52 u32 physical_address32
;
54 struct hpi_fifo_buffer b
;
57 /***********************************************************
58 The Host located memory buffer that the 6205 will bus master
60 ************************************************************/
61 #define HPI6205_SIZEOF_DATA (16*1024)
63 struct message_buffer_6205
{
64 struct hpi_message message
;
68 struct response_buffer_6205
{
69 struct hpi_response response
;
74 struct message_buffer_6205 message_buffer
;
75 struct response_buffer_6205 response_buffer
;
76 u8 b_data
[HPI6205_SIZEOF_DATA
];
79 struct bus_master_interface
{
82 u32 transfer_size_in_bytes
;
84 struct controlcache_6205 control_cache
;
85 struct async_event_buffer_6205 async_buffer
;
86 struct hpi_hostbuffer_status
87 instream_host_buffer_status
[H620_MAX_ISTREAMS
];
88 struct hpi_hostbuffer_status
89 outstream_host_buffer_status
[H620_MAX_OSTREAMS
];