Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

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