Merge tag 'powerpc-5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
[linux/fpc-iii.git] / sound / pci / asihpi / hpi6205.h
blobcc70e99a40e9c738254213a73eceb3edf9ca1290
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 ******************************************************************************/
14 #ifndef _HPI6205_H_
15 #define _HPI6205_H_
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;
45 u32 size_in_bytes;
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;
57 /***********************************************************
58 The Host located memory buffer that the 6205 will bus master
59 in and out of.
60 ************************************************************/
61 #define HPI6205_SIZEOF_DATA (16*1024)
63 struct message_buffer_6205 {
64 struct hpi_message message;
65 char data[256];
68 struct response_buffer_6205 {
69 struct hpi_response response;
70 char data[256];
73 union buffer_6205 {
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 {
80 u32 host_cmd;
81 u32 dsp_ack;
82 u32 transfer_size_in_bytes;
83 union buffer_6205 u;
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];
92 #endif