93 lines · c
1/* SPDX-License-Identifier: GPL-2.0-only */2/*****************************************************************************3 4 AudioScience HPI driver5 Copyright (C) 1997-2011 AudioScience Inc. <support@audioscience.com>6 7 8Host Interface module for an ASI6205 based9bus mastering PCI adapter.10 11Copyright AudioScience, Inc., 200312******************************************************************************/13 14#ifndef _HPI6205_H_15#define _HPI6205_H_16 17#include "hpi_internal.h"18 19/***********************************************************20 Defines used for basic messaging21************************************************************/22#define H620_HIF_RESET 023#define H620_HIF_IDLE 124#define H620_HIF_GET_RESP 225#define H620_HIF_DATA_DONE 326#define H620_HIF_DATA_MASK 0x1027#define H620_HIF_SEND_DATA 0x1428#define H620_HIF_GET_DATA 0x1529#define H620_HIF_UNKNOWN 0x0000ffff30 31/***********************************************************32 Types used for mixer control caching33************************************************************/34 35#define H620_MAX_ISTREAMS 3236#define H620_MAX_OSTREAMS 3237#define HPI_NMIXER_CONTROLS 204838 39/*********************************************************************40This is used for dynamic control cache allocation41**********************************************************************/42struct controlcache_6205 {43 u32 number_of_controls;44 u32 physical_address32;45 u32 size_in_bytes;46};47 48/*********************************************************************49This is used for dynamic allocation of async event array50**********************************************************************/51struct async_event_buffer_6205 {52 u32 physical_address32;53 u32 spare;54 struct hpi_fifo_buffer b;55};56 57/***********************************************************58The Host located memory buffer that the 6205 will bus master59in and out of.60************************************************************/61#define HPI6205_SIZEOF_DATA (16*1024)62 63struct message_buffer_6205 {64 struct hpi_message message;65 char data[256];66};67 68struct response_buffer_6205 {69 struct hpi_response response;70 char data[256];71};72 73union buffer_6205 {74 struct message_buffer_6205 message_buffer;75 struct response_buffer_6205 response_buffer;76 u8 b_data[HPI6205_SIZEOF_DATA];77};78 79struct 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_status87 instream_host_buffer_status[H620_MAX_ISTREAMS];88 struct hpi_hostbuffer_status89 outstream_host_buffer_status[H620_MAX_OSTREAMS];90};91 92#endif93