18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/***************************************************************************** 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ci AudioScience HPI driver 58c2ecf20Sopenharmony_ci Copyright (C) 1997-2011 AudioScience Inc. <support@audioscience.com> 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ciPublic declarations for DSP Proramming Interface to TI C6701 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ciShared between hpi6000.c and DSP code 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci(C) Copyright AudioScience Inc. 1998-2003 138c2ecf20Sopenharmony_ci******************************************************************************/ 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci#ifndef _HPI6000_H_ 168c2ecf20Sopenharmony_ci#define _HPI6000_H_ 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci#define HPI_NMIXER_CONTROLS 200 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci/* 218c2ecf20Sopenharmony_ci * Control caching is always supported in the HPI code. 228c2ecf20Sopenharmony_ci * The DSP should make sure that dwControlCacheSizeInBytes is initialized to 0 238c2ecf20Sopenharmony_ci * during boot to make it in-active. 248c2ecf20Sopenharmony_ci */ 258c2ecf20Sopenharmony_cistruct hpi_hif_6000 { 268c2ecf20Sopenharmony_ci u32 host_cmd; 278c2ecf20Sopenharmony_ci u32 dsp_ack; 288c2ecf20Sopenharmony_ci u32 address; 298c2ecf20Sopenharmony_ci u32 length; 308c2ecf20Sopenharmony_ci u32 message_buffer_address; 318c2ecf20Sopenharmony_ci u32 response_buffer_address; 328c2ecf20Sopenharmony_ci u32 dsp_number; 338c2ecf20Sopenharmony_ci u32 adapter_info; 348c2ecf20Sopenharmony_ci u32 control_cache_is_dirty; 358c2ecf20Sopenharmony_ci u32 control_cache_address; 368c2ecf20Sopenharmony_ci u32 control_cache_size_in_bytes; 378c2ecf20Sopenharmony_ci u32 control_cache_count; 388c2ecf20Sopenharmony_ci}; 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci#define HPI_HIF_PACK_ADAPTER_INFO(adapter, version_major, version_minor) \ 418c2ecf20Sopenharmony_ci ((adapter << 16) | (version_major << 8) | version_minor) 428c2ecf20Sopenharmony_ci#define HPI_HIF_ADAPTER_INFO_EXTRACT_ADAPTER(adapterinfo) \ 438c2ecf20Sopenharmony_ci ((adapterinfo >> 16) & 0xffff) 448c2ecf20Sopenharmony_ci#define HPI_HIF_ADAPTER_INFO_EXTRACT_HWVERSION_MAJOR(adapterinfo) \ 458c2ecf20Sopenharmony_ci ((adapterinfo >> 8) & 0xff) 468c2ecf20Sopenharmony_ci#define HPI_HIF_ADAPTER_INFO_EXTRACT_HWVERSION_MINOR(adapterinfo) \ 478c2ecf20Sopenharmony_ci (adapterinfo & 0xff) 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ci/* Command/status exchanged between host and DSP */ 508c2ecf20Sopenharmony_ci#define HPI_HIF_IDLE 0 518c2ecf20Sopenharmony_ci#define HPI_HIF_SEND_MSG 1 528c2ecf20Sopenharmony_ci#define HPI_HIF_GET_RESP 2 538c2ecf20Sopenharmony_ci#define HPI_HIF_DATA_MASK 0x10 548c2ecf20Sopenharmony_ci#define HPI_HIF_SEND_DATA 0x13 558c2ecf20Sopenharmony_ci#define HPI_HIF_GET_DATA 0x14 568c2ecf20Sopenharmony_ci#define HPI_HIF_SEND_DONE 5 578c2ecf20Sopenharmony_ci#define HPI_HIF_RESET 9 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_ci#endif /* _HPI6000_H_ */ 60