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_ci*/
98c2ecf20Sopenharmony_ci/** \file hpi.h
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci AudioScience Hardware Programming Interface (HPI)
128c2ecf20Sopenharmony_ci public API definition.
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci The HPI is a low-level hardware abstraction layer to all
158c2ecf20Sopenharmony_ci AudioScience digital audio adapters
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci(C) Copyright AudioScience Inc. 1998-2010
188c2ecf20Sopenharmony_ci*/
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci#ifndef _HPI_H_
218c2ecf20Sopenharmony_ci#define _HPI_H_
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci#include <linux/types.h>
248c2ecf20Sopenharmony_ci#define HPI_BUILD_KERNEL_MODE
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci/******************************************************************************/
278c2ecf20Sopenharmony_ci/********       HPI API DEFINITIONS                                       *****/
288c2ecf20Sopenharmony_ci/******************************************************************************/
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ci/*******************************************/
318c2ecf20Sopenharmony_ci/**  Audio format types
328c2ecf20Sopenharmony_ci\ingroup stream
338c2ecf20Sopenharmony_ci*/
348c2ecf20Sopenharmony_cienum HPI_FORMATS {
358c2ecf20Sopenharmony_ci/** Used internally on adapter. */
368c2ecf20Sopenharmony_ci	HPI_FORMAT_MIXER_NATIVE = 0,
378c2ecf20Sopenharmony_ci/** 8-bit unsigned PCM. Windows equivalent is WAVE_FORMAT_PCM. */
388c2ecf20Sopenharmony_ci	HPI_FORMAT_PCM8_UNSIGNED = 1,
398c2ecf20Sopenharmony_ci/** 16-bit signed PCM. Windows equivalent is WAVE_FORMAT_PCM. */
408c2ecf20Sopenharmony_ci	HPI_FORMAT_PCM16_SIGNED = 2,
418c2ecf20Sopenharmony_ci/** MPEG-1 Layer-1. */
428c2ecf20Sopenharmony_ci	HPI_FORMAT_MPEG_L1 = 3,
438c2ecf20Sopenharmony_ci/** MPEG-1 Layer-2.
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ciWindows equivalent is WAVE_FORMAT_MPEG.
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_ciThe following table shows what combinations of mode and bitrate are possible:
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_ci<table border=1 cellspacing=0 cellpadding=5>
508c2ecf20Sopenharmony_ci<tr>
518c2ecf20Sopenharmony_ci<td><p><b>Bitrate (kbs)</b></p>
528c2ecf20Sopenharmony_ci<td><p><b>Mono</b></p>
538c2ecf20Sopenharmony_ci<td><p><b>Stereo,<br>Joint Stereo or<br>Dual Channel</b></p>
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ci<tr><td>32<td>X<td>_
568c2ecf20Sopenharmony_ci<tr><td>40<td>_<td>_
578c2ecf20Sopenharmony_ci<tr><td>48<td>X<td>_
588c2ecf20Sopenharmony_ci<tr><td>56<td>X<td>_
598c2ecf20Sopenharmony_ci<tr><td>64<td>X<td>X
608c2ecf20Sopenharmony_ci<tr><td>80<td>X<td>_
618c2ecf20Sopenharmony_ci<tr><td>96<td>X<td>X
628c2ecf20Sopenharmony_ci<tr><td>112<td>X<td>X
638c2ecf20Sopenharmony_ci<tr><td>128<td>X<td>X
648c2ecf20Sopenharmony_ci<tr><td>160<td>X<td>X
658c2ecf20Sopenharmony_ci<tr><td>192<td>X<td>X
668c2ecf20Sopenharmony_ci<tr><td>224<td>_<td>X
678c2ecf20Sopenharmony_ci<tr><td>256<td>-<td>X
688c2ecf20Sopenharmony_ci<tr><td>320<td>-<td>X
698c2ecf20Sopenharmony_ci<tr><td>384<td>_<td>X
708c2ecf20Sopenharmony_ci</table>
718c2ecf20Sopenharmony_ci*/
728c2ecf20Sopenharmony_ci	HPI_FORMAT_MPEG_L2 = 4,
738c2ecf20Sopenharmony_ci/** MPEG-1 Layer-3.
748c2ecf20Sopenharmony_ciWindows equivalent is WAVE_FORMAT_MPEG.
758c2ecf20Sopenharmony_ci
768c2ecf20Sopenharmony_ciThe following table shows what combinations of mode and bitrate are possible:
778c2ecf20Sopenharmony_ci
788c2ecf20Sopenharmony_ci<table border=1 cellspacing=0 cellpadding=5>
798c2ecf20Sopenharmony_ci<tr>
808c2ecf20Sopenharmony_ci<td><p><b>Bitrate (kbs)</b></p>
818c2ecf20Sopenharmony_ci<td><p><b>Mono<br>Stereo @ 8,<br>11.025 and<br>12kHz*</b></p>
828c2ecf20Sopenharmony_ci<td><p><b>Mono<br>Stereo @ 16,<br>22.050 and<br>24kHz*</b></p>
838c2ecf20Sopenharmony_ci<td><p><b>Mono<br>Stereo @ 32,<br>44.1 and<br>48kHz</b></p>
848c2ecf20Sopenharmony_ci
858c2ecf20Sopenharmony_ci<tr><td>16<td>X<td>X<td>_
868c2ecf20Sopenharmony_ci<tr><td>24<td>X<td>X<td>_
878c2ecf20Sopenharmony_ci<tr><td>32<td>X<td>X<td>X
888c2ecf20Sopenharmony_ci<tr><td>40<td>X<td>X<td>X
898c2ecf20Sopenharmony_ci<tr><td>48<td>X<td>X<td>X
908c2ecf20Sopenharmony_ci<tr><td>56<td>X<td>X<td>X
918c2ecf20Sopenharmony_ci<tr><td>64<td>X<td>X<td>X
928c2ecf20Sopenharmony_ci<tr><td>80<td>_<td>X<td>X
938c2ecf20Sopenharmony_ci<tr><td>96<td>_<td>X<td>X
948c2ecf20Sopenharmony_ci<tr><td>112<td>_<td>X<td>X
958c2ecf20Sopenharmony_ci<tr><td>128<td>_<td>X<td>X
968c2ecf20Sopenharmony_ci<tr><td>144<td>_<td>X<td>_
978c2ecf20Sopenharmony_ci<tr><td>160<td>_<td>X<td>X
988c2ecf20Sopenharmony_ci<tr><td>192<td>_<td>_<td>X
998c2ecf20Sopenharmony_ci<tr><td>224<td>_<td>_<td>X
1008c2ecf20Sopenharmony_ci<tr><td>256<td>-<td>_<td>X
1018c2ecf20Sopenharmony_ci<tr><td>320<td>-<td>_<td>X
1028c2ecf20Sopenharmony_ci</table>
1038c2ecf20Sopenharmony_ci\b * Available on the ASI6000 series only
1048c2ecf20Sopenharmony_ci*/
1058c2ecf20Sopenharmony_ci	HPI_FORMAT_MPEG_L3 = 5,
1068c2ecf20Sopenharmony_ci/** Dolby AC-2. */
1078c2ecf20Sopenharmony_ci	HPI_FORMAT_DOLBY_AC2 = 6,
1088c2ecf20Sopenharmony_ci/** Dolbt AC-3. */
1098c2ecf20Sopenharmony_ci	HPI_FORMAT_DOLBY_AC3 = 7,
1108c2ecf20Sopenharmony_ci/** 16-bit PCM big-endian. */
1118c2ecf20Sopenharmony_ci	HPI_FORMAT_PCM16_BIGENDIAN = 8,
1128c2ecf20Sopenharmony_ci/** TAGIT-1 algorithm - hits. */
1138c2ecf20Sopenharmony_ci	HPI_FORMAT_AA_TAGIT1_HITS = 9,
1148c2ecf20Sopenharmony_ci/** TAGIT-1 algorithm - inserts. */
1158c2ecf20Sopenharmony_ci	HPI_FORMAT_AA_TAGIT1_INSERTS = 10,
1168c2ecf20Sopenharmony_ci/** 32-bit signed PCM. Windows equivalent is WAVE_FORMAT_PCM.
1178c2ecf20Sopenharmony_ciEach sample is a 32bit word. The most significant 24 bits contain a 24-bit
1188c2ecf20Sopenharmony_cisample and the least significant 8 bits are set to 0.
1198c2ecf20Sopenharmony_ci*/
1208c2ecf20Sopenharmony_ci	HPI_FORMAT_PCM32_SIGNED = 11,
1218c2ecf20Sopenharmony_ci/** Raw bitstream - unknown format. */
1228c2ecf20Sopenharmony_ci	HPI_FORMAT_RAW_BITSTREAM = 12,
1238c2ecf20Sopenharmony_ci/** TAGIT-1 algorithm hits - extended. */
1248c2ecf20Sopenharmony_ci	HPI_FORMAT_AA_TAGIT1_HITS_EX1 = 13,
1258c2ecf20Sopenharmony_ci/** 32-bit PCM as an IEEE float. Windows equivalent is WAVE_FORMAT_IEEE_FLOAT.
1268c2ecf20Sopenharmony_ciEach sample is a 32bit word in IEEE754 floating point format.
1278c2ecf20Sopenharmony_ciThe range is +1.0 to -1.0, which corresponds to digital fullscale.
1288c2ecf20Sopenharmony_ci*/
1298c2ecf20Sopenharmony_ci	HPI_FORMAT_PCM32_FLOAT = 14,
1308c2ecf20Sopenharmony_ci/** 24-bit PCM signed. Windows equivalent is WAVE_FORMAT_PCM. */
1318c2ecf20Sopenharmony_ci	HPI_FORMAT_PCM24_SIGNED = 15,
1328c2ecf20Sopenharmony_ci/** OEM format 1 - private. */
1338c2ecf20Sopenharmony_ci	HPI_FORMAT_OEM1 = 16,
1348c2ecf20Sopenharmony_ci/** OEM format 2 - private. */
1358c2ecf20Sopenharmony_ci	HPI_FORMAT_OEM2 = 17,
1368c2ecf20Sopenharmony_ci/** Undefined format. */
1378c2ecf20Sopenharmony_ci	HPI_FORMAT_UNDEFINED = 0xffff
1388c2ecf20Sopenharmony_ci};
1398c2ecf20Sopenharmony_ci
1408c2ecf20Sopenharmony_ci/*******************************************/
1418c2ecf20Sopenharmony_ci/** Stream States
1428c2ecf20Sopenharmony_ci\ingroup stream
1438c2ecf20Sopenharmony_ci*/
1448c2ecf20Sopenharmony_cienum HPI_STREAM_STATES {
1458c2ecf20Sopenharmony_ci	/** State stopped - stream is stopped. */
1468c2ecf20Sopenharmony_ci	HPI_STATE_STOPPED = 1,
1478c2ecf20Sopenharmony_ci	/** State playing - stream is playing audio. */
1488c2ecf20Sopenharmony_ci	HPI_STATE_PLAYING = 2,
1498c2ecf20Sopenharmony_ci	/** State recording - stream is recording. */
1508c2ecf20Sopenharmony_ci	HPI_STATE_RECORDING = 3,
1518c2ecf20Sopenharmony_ci	/** State drained - playing stream ran out of data to play. */
1528c2ecf20Sopenharmony_ci	HPI_STATE_DRAINED = 4,
1538c2ecf20Sopenharmony_ci	/** State generate sine - to be implemented. */
1548c2ecf20Sopenharmony_ci	HPI_STATE_SINEGEN = 5,
1558c2ecf20Sopenharmony_ci	/** State wait - used for inter-card sync to mean waiting for all
1568c2ecf20Sopenharmony_ci		cards to be ready. */
1578c2ecf20Sopenharmony_ci	HPI_STATE_WAIT = 6
1588c2ecf20Sopenharmony_ci};
1598c2ecf20Sopenharmony_ci/*******************************************/
1608c2ecf20Sopenharmony_ci/** Source node types
1618c2ecf20Sopenharmony_ci\ingroup mixer
1628c2ecf20Sopenharmony_ci*/
1638c2ecf20Sopenharmony_cienum HPI_SOURCENODES {
1648c2ecf20Sopenharmony_ci	/** This define can be used instead of 0 to indicate
1658c2ecf20Sopenharmony_ci	that there is no valid source node. A control that
1668c2ecf20Sopenharmony_ci	exists on a destination node can be searched for using a source
1678c2ecf20Sopenharmony_ci	node value of either 0, or HPI_SOURCENODE_NONE */
1688c2ecf20Sopenharmony_ci	HPI_SOURCENODE_NONE = 100,
1698c2ecf20Sopenharmony_ci	/** Out Stream (Play) node. */
1708c2ecf20Sopenharmony_ci	HPI_SOURCENODE_OSTREAM = 101,
1718c2ecf20Sopenharmony_ci	/** Line in node - could be analog, AES/EBU or network. */
1728c2ecf20Sopenharmony_ci	HPI_SOURCENODE_LINEIN = 102,
1738c2ecf20Sopenharmony_ci	HPI_SOURCENODE_AESEBU_IN = 103,	     /**< AES/EBU input node. */
1748c2ecf20Sopenharmony_ci	HPI_SOURCENODE_TUNER = 104,	     /**< tuner node. */
1758c2ecf20Sopenharmony_ci	HPI_SOURCENODE_RF = 105,	     /**< RF input node. */
1768c2ecf20Sopenharmony_ci	HPI_SOURCENODE_CLOCK_SOURCE = 106,   /**< clock source node. */
1778c2ecf20Sopenharmony_ci	HPI_SOURCENODE_RAW_BITSTREAM = 107,  /**< raw bitstream node. */
1788c2ecf20Sopenharmony_ci	HPI_SOURCENODE_MICROPHONE = 108,     /**< microphone node. */
1798c2ecf20Sopenharmony_ci	/** Cobranet input node -
1808c2ecf20Sopenharmony_ci	    Audio samples come from the Cobranet network and into the device. */
1818c2ecf20Sopenharmony_ci	HPI_SOURCENODE_COBRANET = 109,
1828c2ecf20Sopenharmony_ci	HPI_SOURCENODE_ANALOG = 110,	     /**< analog input node. */
1838c2ecf20Sopenharmony_ci	HPI_SOURCENODE_ADAPTER = 111,	     /**< adapter node. */
1848c2ecf20Sopenharmony_ci	/** RTP stream input node - This node is a destination for
1858c2ecf20Sopenharmony_ci	    packets of RTP audio samples from other devices. */
1868c2ecf20Sopenharmony_ci	HPI_SOURCENODE_RTP_DESTINATION = 112,
1878c2ecf20Sopenharmony_ci	HPI_SOURCENODE_INTERNAL = 113,	     /**< node internal to the device. */
1888c2ecf20Sopenharmony_ci	HPI_SOURCENODE_AVB = 114,	     /**< AVB input stream */
1898c2ecf20Sopenharmony_ci	HPI_SOURCENODE_BLULINK = 115,	     /**< BLU-link input channel */
1908c2ecf20Sopenharmony_ci	/* !!!Update this  AND hpidebug.h if you add a new sourcenode type!!! */
1918c2ecf20Sopenharmony_ci	HPI_SOURCENODE_LAST_INDEX = 115	     /**< largest ID */
1928c2ecf20Sopenharmony_ci		/* AX6 max sourcenode types = 15 */
1938c2ecf20Sopenharmony_ci};
1948c2ecf20Sopenharmony_ci
1958c2ecf20Sopenharmony_ci/*******************************************/
1968c2ecf20Sopenharmony_ci/** Destination node types
1978c2ecf20Sopenharmony_ci\ingroup mixer
1988c2ecf20Sopenharmony_ci*/
1998c2ecf20Sopenharmony_cienum HPI_DESTNODES {
2008c2ecf20Sopenharmony_ci	/** This define can be used instead of 0 to indicate
2018c2ecf20Sopenharmony_ci	that there is no valid destination node. A control that
2028c2ecf20Sopenharmony_ci	exists on a source node can be searched for using a destination
2038c2ecf20Sopenharmony_ci	node value of either 0, or HPI_DESTNODE_NONE */
2048c2ecf20Sopenharmony_ci	HPI_DESTNODE_NONE = 200,
2058c2ecf20Sopenharmony_ci	/** In Stream (Record) node. */
2068c2ecf20Sopenharmony_ci	HPI_DESTNODE_ISTREAM = 201,
2078c2ecf20Sopenharmony_ci	HPI_DESTNODE_LINEOUT = 202,	     /**< line out node. */
2088c2ecf20Sopenharmony_ci	HPI_DESTNODE_AESEBU_OUT = 203,	     /**< AES/EBU output node. */
2098c2ecf20Sopenharmony_ci	HPI_DESTNODE_RF = 204,		     /**< RF output node. */
2108c2ecf20Sopenharmony_ci	HPI_DESTNODE_SPEAKER = 205,	     /**< speaker output node. */
2118c2ecf20Sopenharmony_ci	/** Cobranet output node -
2128c2ecf20Sopenharmony_ci	    Audio samples from the device are sent out on the Cobranet network.*/
2138c2ecf20Sopenharmony_ci	HPI_DESTNODE_COBRANET = 206,
2148c2ecf20Sopenharmony_ci	HPI_DESTNODE_ANALOG = 207,	     /**< analog output node. */
2158c2ecf20Sopenharmony_ci	/** RTP stream output node - This node is a source for
2168c2ecf20Sopenharmony_ci	    packets of RTP audio samples that are sent to other devices. */
2178c2ecf20Sopenharmony_ci	HPI_DESTNODE_RTP_SOURCE = 208,
2188c2ecf20Sopenharmony_ci	HPI_DESTNODE_AVB = 209,		     /**< AVB output stream */
2198c2ecf20Sopenharmony_ci	HPI_DESTNODE_INTERNAL = 210,	     /**< node internal to the device. */
2208c2ecf20Sopenharmony_ci	HPI_DESTNODE_BLULINK = 211,	     /**< BLU-link output channel. */
2218c2ecf20Sopenharmony_ci	/* !!!Update this AND hpidebug.h if you add a new destnode type!!! */
2228c2ecf20Sopenharmony_ci	HPI_DESTNODE_LAST_INDEX = 211	     /**< largest ID */
2238c2ecf20Sopenharmony_ci		/* AX6 max destnode types = 15 */
2248c2ecf20Sopenharmony_ci};
2258c2ecf20Sopenharmony_ci
2268c2ecf20Sopenharmony_ci/*******************************************/
2278c2ecf20Sopenharmony_ci/** Mixer control types
2288c2ecf20Sopenharmony_ci\ingroup mixer
2298c2ecf20Sopenharmony_ci*/
2308c2ecf20Sopenharmony_cienum HPI_CONTROLS {
2318c2ecf20Sopenharmony_ci	HPI_CONTROL_GENERIC = 0,	/**< generic control. */
2328c2ecf20Sopenharmony_ci	HPI_CONTROL_CONNECTION = 1, /**< A connection between nodes. */
2338c2ecf20Sopenharmony_ci	HPI_CONTROL_VOLUME = 2,	      /**< volume control - works in dB_fs. */
2348c2ecf20Sopenharmony_ci	HPI_CONTROL_METER = 3,	/**< peak meter control. */
2358c2ecf20Sopenharmony_ci	HPI_CONTROL_MUTE = 4,	/*mute control - not used at present. */
2368c2ecf20Sopenharmony_ci	HPI_CONTROL_MULTIPLEXER = 5,	/**< multiplexer control. */
2378c2ecf20Sopenharmony_ci
2388c2ecf20Sopenharmony_ci	HPI_CONTROL_AESEBU_TRANSMITTER = 6, /**< AES/EBU transmitter control */
2398c2ecf20Sopenharmony_ci	HPI_CONTROL_AESEBUTX = 6,	/* HPI_CONTROL_AESEBU_TRANSMITTER */
2408c2ecf20Sopenharmony_ci
2418c2ecf20Sopenharmony_ci	HPI_CONTROL_AESEBU_RECEIVER = 7, /**< AES/EBU receiver control. */
2428c2ecf20Sopenharmony_ci	HPI_CONTROL_AESEBURX = 7,	/* HPI_CONTROL_AESEBU_RECEIVER */
2438c2ecf20Sopenharmony_ci
2448c2ecf20Sopenharmony_ci	HPI_CONTROL_LEVEL = 8, /**< level/trim control - works in d_bu. */
2458c2ecf20Sopenharmony_ci	HPI_CONTROL_TUNER = 9,	/**< tuner control. */
2468c2ecf20Sopenharmony_ci/*      HPI_CONTROL_ONOFFSWITCH =       10 */
2478c2ecf20Sopenharmony_ci	HPI_CONTROL_VOX = 11,	/**< vox control. */
2488c2ecf20Sopenharmony_ci/*      HPI_CONTROL_AES18_TRANSMITTER = 12 */
2498c2ecf20Sopenharmony_ci/*      HPI_CONTROL_AES18_RECEIVER = 13 */
2508c2ecf20Sopenharmony_ci/*      HPI_CONTROL_AES18_BLOCKGENERATOR  = 14 */
2518c2ecf20Sopenharmony_ci	HPI_CONTROL_CHANNEL_MODE = 15,	/**< channel mode control. */
2528c2ecf20Sopenharmony_ci
2538c2ecf20Sopenharmony_ci	HPI_CONTROL_BITSTREAM = 16,	/**< bitstream control. */
2548c2ecf20Sopenharmony_ci	HPI_CONTROL_SAMPLECLOCK = 17,	/**< sample clock control. */
2558c2ecf20Sopenharmony_ci	HPI_CONTROL_MICROPHONE = 18,	/**< microphone control. */
2568c2ecf20Sopenharmony_ci	HPI_CONTROL_PARAMETRIC_EQ = 19,	/**< parametric EQ control. */
2578c2ecf20Sopenharmony_ci	HPI_CONTROL_EQUALIZER = 19,	/*HPI_CONTROL_PARAMETRIC_EQ */
2588c2ecf20Sopenharmony_ci
2598c2ecf20Sopenharmony_ci	HPI_CONTROL_COMPANDER = 20,	/**< compander control. */
2608c2ecf20Sopenharmony_ci	HPI_CONTROL_COBRANET = 21,	/**< cobranet control. */
2618c2ecf20Sopenharmony_ci	HPI_CONTROL_TONEDETECTOR = 22,	/**< tone detector control. */
2628c2ecf20Sopenharmony_ci	HPI_CONTROL_SILENCEDETECTOR = 23,	/**< silence detector control. */
2638c2ecf20Sopenharmony_ci	HPI_CONTROL_PAD = 24,	/**< tuner PAD control. */
2648c2ecf20Sopenharmony_ci	HPI_CONTROL_SRC = 25,	/**< samplerate converter control. */
2658c2ecf20Sopenharmony_ci	HPI_CONTROL_UNIVERSAL = 26,	/**< universal control. */
2668c2ecf20Sopenharmony_ci
2678c2ecf20Sopenharmony_ci/*  !!! Update this AND hpidebug.h if you add a new control type!!!*/
2688c2ecf20Sopenharmony_ci	HPI_CONTROL_LAST_INDEX = 26 /**<highest control type ID */
2698c2ecf20Sopenharmony_ci/* WARNING types 256 or greater impact bit packing in all AX6 DSP code */
2708c2ecf20Sopenharmony_ci};
2718c2ecf20Sopenharmony_ci
2728c2ecf20Sopenharmony_ci/*******************************************/
2738c2ecf20Sopenharmony_ci/** Adapter properties
2748c2ecf20Sopenharmony_ciThese are used in HPI_AdapterSetProperty() and HPI_AdapterGetProperty()
2758c2ecf20Sopenharmony_ci\ingroup adapter
2768c2ecf20Sopenharmony_ci*/
2778c2ecf20Sopenharmony_cienum HPI_ADAPTER_PROPERTIES {
2788c2ecf20Sopenharmony_ci/** \internal Used in dwProperty field of HPI_AdapterSetProperty() and
2798c2ecf20Sopenharmony_ciHPI_AdapterGetProperty(). This errata applies to all ASI6000 cards with both
2808c2ecf20Sopenharmony_cianalog and digital outputs. The CS4224 A/D+D/A has a one sample delay between
2818c2ecf20Sopenharmony_cileft and right channels on both its input (ADC) and output (DAC).
2828c2ecf20Sopenharmony_ciMore details are available in Cirrus Logic errata ER284B2.
2838c2ecf20Sopenharmony_ciPDF available from www.cirrus.com, released by Cirrus in 2001.
2848c2ecf20Sopenharmony_ci*/
2858c2ecf20Sopenharmony_ci	HPI_ADAPTER_PROPERTY_ERRATA_1 = 1,
2868c2ecf20Sopenharmony_ci
2878c2ecf20Sopenharmony_ci/** Adapter grouping property
2888c2ecf20Sopenharmony_ciIndicates whether the adapter supports the grouping API (for ASIO and SSX2)
2898c2ecf20Sopenharmony_ci*/
2908c2ecf20Sopenharmony_ci	HPI_ADAPTER_PROPERTY_GROUPING = 2,
2918c2ecf20Sopenharmony_ci
2928c2ecf20Sopenharmony_ci/** Driver SSX2 property
2938c2ecf20Sopenharmony_ciTells the kernel driver to turn on SSX2 stream mapping.
2948c2ecf20Sopenharmony_ciThis feature is not used by the DSP. In fact the call is completely processed
2958c2ecf20Sopenharmony_ciby the driver and is not passed on to the DSP at all.
2968c2ecf20Sopenharmony_ci*/
2978c2ecf20Sopenharmony_ci	HPI_ADAPTER_PROPERTY_ENABLE_SSX2 = 3,
2988c2ecf20Sopenharmony_ci
2998c2ecf20Sopenharmony_ci/** Adapter SSX2 property
3008c2ecf20Sopenharmony_ciIndicates the state of the adapter's SSX2 setting. This setting is stored in
3018c2ecf20Sopenharmony_cinon-volatile memory on the adapter. A typical call sequence would be to use
3028c2ecf20Sopenharmony_ciHPI_ADAPTER_PROPERTY_SSX2_SETTING to set SSX2 on the adapter and then to reload
3038c2ecf20Sopenharmony_cithe driver. The driver would query HPI_ADAPTER_PROPERTY_SSX2_SETTING during
3048c2ecf20Sopenharmony_cistartup and if SSX2 is set, it would then call HPI_ADAPTER_PROPERTY_ENABLE_SSX2
3058c2ecf20Sopenharmony_cito enable SSX2 stream mapping within the kernel level of the driver.
3068c2ecf20Sopenharmony_ci*/
3078c2ecf20Sopenharmony_ci	HPI_ADAPTER_PROPERTY_SSX2_SETTING = 4,
3088c2ecf20Sopenharmony_ci
3098c2ecf20Sopenharmony_ci/** Enables/disables PCI(e) IRQ.
3108c2ecf20Sopenharmony_ciA setting of 0 indicates that no interrupts are being generated. A DSP boot
3118c2ecf20Sopenharmony_cithis property is set to 0. Setting to a non-zero value specifies the number
3128c2ecf20Sopenharmony_ciof frames of audio that should be processed between interrupts. This property
3138c2ecf20Sopenharmony_cishould be set to multiple of the mixer interval as read back from the
3148c2ecf20Sopenharmony_ciHPI_ADAPTER_PROPERTY_INTERVAL property.
3158c2ecf20Sopenharmony_ci*/
3168c2ecf20Sopenharmony_ci	HPI_ADAPTER_PROPERTY_IRQ_RATE = 5,
3178c2ecf20Sopenharmony_ci
3188c2ecf20Sopenharmony_ci/** Base number for readonly properties */
3198c2ecf20Sopenharmony_ci	HPI_ADAPTER_PROPERTY_READONLYBASE = 256,
3208c2ecf20Sopenharmony_ci
3218c2ecf20Sopenharmony_ci/** Readonly adapter latency property.
3228c2ecf20Sopenharmony_ciThis property returns in the input and output latency in samples.
3238c2ecf20Sopenharmony_ciProperty 1 is the estimated input latency
3248c2ecf20Sopenharmony_ciin samples, while Property 2 is that output latency in  samples.
3258c2ecf20Sopenharmony_ci*/
3268c2ecf20Sopenharmony_ci	HPI_ADAPTER_PROPERTY_LATENCY = 256,
3278c2ecf20Sopenharmony_ci
3288c2ecf20Sopenharmony_ci/** Readonly adapter granularity property.
3298c2ecf20Sopenharmony_ciThe granulariy is the smallest size chunk of stereo samples that is processed by
3308c2ecf20Sopenharmony_cithe adapter.
3318c2ecf20Sopenharmony_ciThis property returns the record granularity in samples in Property 1.
3328c2ecf20Sopenharmony_ciProperty 2 returns the play granularity.
3338c2ecf20Sopenharmony_ci*/
3348c2ecf20Sopenharmony_ci	HPI_ADAPTER_PROPERTY_GRANULARITY = 257,
3358c2ecf20Sopenharmony_ci
3368c2ecf20Sopenharmony_ci/** Readonly adapter number of current channels property.
3378c2ecf20Sopenharmony_ciProperty 1 is the number of record channels per record device.
3388c2ecf20Sopenharmony_ciProperty 2 is the number of play channels per playback device.*/
3398c2ecf20Sopenharmony_ci	HPI_ADAPTER_PROPERTY_CURCHANNELS = 258,
3408c2ecf20Sopenharmony_ci
3418c2ecf20Sopenharmony_ci/** Readonly adapter software version.
3428c2ecf20Sopenharmony_ciThe SOFTWARE_VERSION property returns the version of the software running
3438c2ecf20Sopenharmony_cion the adapter as Major.Minor.Release.
3448c2ecf20Sopenharmony_ciProperty 1 contains Major in bits 15..8 and Minor in bits 7..0.
3458c2ecf20Sopenharmony_ciProperty 2 contains Release in bits 7..0. */
3468c2ecf20Sopenharmony_ci	HPI_ADAPTER_PROPERTY_SOFTWARE_VERSION = 259,
3478c2ecf20Sopenharmony_ci
3488c2ecf20Sopenharmony_ci/** Readonly adapter MAC address MSBs.
3498c2ecf20Sopenharmony_ciThe MAC_ADDRESS_MSB property returns
3508c2ecf20Sopenharmony_cithe most significant 32 bits of the MAC address.
3518c2ecf20Sopenharmony_ciProperty 1 contains bits 47..32 of the MAC address.
3528c2ecf20Sopenharmony_ciProperty 2 contains bits 31..16 of the MAC address. */
3538c2ecf20Sopenharmony_ci	HPI_ADAPTER_PROPERTY_MAC_ADDRESS_MSB = 260,
3548c2ecf20Sopenharmony_ci
3558c2ecf20Sopenharmony_ci/** Readonly adapter MAC address LSBs
3568c2ecf20Sopenharmony_ciThe MAC_ADDRESS_LSB property returns
3578c2ecf20Sopenharmony_cithe least significant 16 bits of the MAC address.
3588c2ecf20Sopenharmony_ciProperty 1 contains bits 15..0 of the MAC address. */
3598c2ecf20Sopenharmony_ci	HPI_ADAPTER_PROPERTY_MAC_ADDRESS_LSB = 261,
3608c2ecf20Sopenharmony_ci
3618c2ecf20Sopenharmony_ci/** Readonly extended adapter type number
3628c2ecf20Sopenharmony_ciThe EXTENDED_ADAPTER_TYPE property returns the 4 digits of an extended
3638c2ecf20Sopenharmony_ciadapter type, i.e ASI8920-0022, 0022 is the extended type.
3648c2ecf20Sopenharmony_ciThe digits are returned as ASCII characters rather than the hex digits that
3658c2ecf20Sopenharmony_ciare returned for the main type
3668c2ecf20Sopenharmony_ciProperty 1 returns the 1st two (left most) digits, i.e "00"
3678c2ecf20Sopenharmony_ciin the example above, the upper byte being the left most digit.
3688c2ecf20Sopenharmony_ciProperty 2 returns the 2nd two digits, i.e "22" in the example above*/
3698c2ecf20Sopenharmony_ci	HPI_ADAPTER_PROPERTY_EXTENDED_ADAPTER_TYPE = 262,
3708c2ecf20Sopenharmony_ci
3718c2ecf20Sopenharmony_ci/** Readonly debug log buffer information */
3728c2ecf20Sopenharmony_ci	HPI_ADAPTER_PROPERTY_LOGTABLEN = 263,
3738c2ecf20Sopenharmony_ci	HPI_ADAPTER_PROPERTY_LOGTABBEG = 264,
3748c2ecf20Sopenharmony_ci
3758c2ecf20Sopenharmony_ci/** Readonly adapter IP address
3768c2ecf20Sopenharmony_ciFor 192.168.1.101
3778c2ecf20Sopenharmony_ciProperty 1 returns the 1st two (left most) digits, i.e 192*256 + 168
3788c2ecf20Sopenharmony_ciin the example above, the upper byte being the left most digit.
3798c2ecf20Sopenharmony_ciProperty 2 returns the 2nd two digits, i.e 1*256 + 101 in the example above, */
3808c2ecf20Sopenharmony_ci	HPI_ADAPTER_PROPERTY_IP_ADDRESS = 265,
3818c2ecf20Sopenharmony_ci
3828c2ecf20Sopenharmony_ci/** Readonly adapter buffer processed count. Returns a buffer processed count
3838c2ecf20Sopenharmony_cithat is incremented every time all buffers for all streams are updated. This
3848c2ecf20Sopenharmony_ciis useful for checking completion of all stream operations across the adapter
3858c2ecf20Sopenharmony_ciwhen using grouped streams.
3868c2ecf20Sopenharmony_ci*/
3878c2ecf20Sopenharmony_ci	HPI_ADAPTER_PROPERTY_BUFFER_UPDATE_COUNT = 266,
3888c2ecf20Sopenharmony_ci
3898c2ecf20Sopenharmony_ci/** Readonly mixer and stream intervals
3908c2ecf20Sopenharmony_ci
3918c2ecf20Sopenharmony_ciThese intervals are  measured in mixer frames.
3928c2ecf20Sopenharmony_ciTo convert to time, divide  by the adapter samplerate.
3938c2ecf20Sopenharmony_ci
3948c2ecf20Sopenharmony_ciThe mixer interval is the number of frames processed in one mixer iteration.
3958c2ecf20Sopenharmony_ciThe stream update interval is the interval at which streams check for and
3968c2ecf20Sopenharmony_ciprocess data, and BBM host buffer counters are updated.
3978c2ecf20Sopenharmony_ci
3988c2ecf20Sopenharmony_ciProperty 1 is the mixer interval in mixer frames.
3998c2ecf20Sopenharmony_ciProperty 2 is the stream update interval in mixer frames.
4008c2ecf20Sopenharmony_ci*/
4018c2ecf20Sopenharmony_ci	HPI_ADAPTER_PROPERTY_INTERVAL = 267,
4028c2ecf20Sopenharmony_ci/** Adapter capabilities 1
4038c2ecf20Sopenharmony_ciProperty 1 - adapter can do multichannel (SSX1)
4048c2ecf20Sopenharmony_ciProperty 2 - adapter can do stream grouping (supports SSX2)
4058c2ecf20Sopenharmony_ci*/
4068c2ecf20Sopenharmony_ci	HPI_ADAPTER_PROPERTY_CAPS1 = 268,
4078c2ecf20Sopenharmony_ci/** Adapter capabilities 2
4088c2ecf20Sopenharmony_ciProperty 1 - adapter can do samplerate conversion (MRX)
4098c2ecf20Sopenharmony_ciProperty 2 - adapter can do timestretch (TSX)
4108c2ecf20Sopenharmony_ci*/
4118c2ecf20Sopenharmony_ci	HPI_ADAPTER_PROPERTY_CAPS2 = 269,
4128c2ecf20Sopenharmony_ci
4138c2ecf20Sopenharmony_ci/** Readonly adapter sync header connection count.
4148c2ecf20Sopenharmony_ci*/
4158c2ecf20Sopenharmony_ci	HPI_ADAPTER_PROPERTY_SYNC_HEADER_CONNECTIONS = 270,
4168c2ecf20Sopenharmony_ci/** Readonly supports SSX2 property.
4178c2ecf20Sopenharmony_ciIndicates the adapter supports SSX2 in some mode setting. The
4188c2ecf20Sopenharmony_cireturn value is true (1) or false (0). If the current adapter
4198c2ecf20Sopenharmony_cimode is MONO SSX2 is disabled, even though this property will
4208c2ecf20Sopenharmony_cireturn true.
4218c2ecf20Sopenharmony_ci*/
4228c2ecf20Sopenharmony_ci	HPI_ADAPTER_PROPERTY_SUPPORTS_SSX2 = 271,
4238c2ecf20Sopenharmony_ci/** Readonly supports PCI(e) IRQ.
4248c2ecf20Sopenharmony_ciIndicates that the adapter in it's current mode supports interrupts
4258c2ecf20Sopenharmony_ciacross the host bus. Note, this does not imply that interrupts are
4268c2ecf20Sopenharmony_cienabled. Instead it indicates that they can be enabled.
4278c2ecf20Sopenharmony_ci*/
4288c2ecf20Sopenharmony_ci	HPI_ADAPTER_PROPERTY_SUPPORTS_IRQ = 272,
4298c2ecf20Sopenharmony_ci/** Readonly supports firmware updating.
4308c2ecf20Sopenharmony_ciIndicates that the adapter implements an interface to update firmware
4318c2ecf20Sopenharmony_cion the adapter.
4328c2ecf20Sopenharmony_ci*/
4338c2ecf20Sopenharmony_ci	HPI_ADAPTER_PROPERTY_SUPPORTS_FW_UPDATE = 273,
4348c2ecf20Sopenharmony_ci/** Readonly Firmware IDs
4358c2ecf20Sopenharmony_ciIdentifiy firmware independent of individual adapter type.
4368c2ecf20Sopenharmony_ciMay be used as a filter for firmware update images.
4378c2ecf20Sopenharmony_ciProperty 1 = Bootloader ID
4388c2ecf20Sopenharmony_ciProperty 2 = Main program ID
4398c2ecf20Sopenharmony_ci*/
4408c2ecf20Sopenharmony_ci	HPI_ADAPTER_PROPERTY_FIRMWARE_ID = 274
4418c2ecf20Sopenharmony_ci};
4428c2ecf20Sopenharmony_ci
4438c2ecf20Sopenharmony_ci/** Adapter mode commands
4448c2ecf20Sopenharmony_ci
4458c2ecf20Sopenharmony_ciUsed in wQueryOrSet parameter of HPI_AdapterSetModeEx().
4468c2ecf20Sopenharmony_ci\ingroup adapter
4478c2ecf20Sopenharmony_ci*/
4488c2ecf20Sopenharmony_cienum HPI_ADAPTER_MODE_CMDS {
4498c2ecf20Sopenharmony_ci	/** Set the mode to the given parameter */
4508c2ecf20Sopenharmony_ci	HPI_ADAPTER_MODE_SET = 0,
4518c2ecf20Sopenharmony_ci	/** Return 0 or error depending whether mode is valid,
4528c2ecf20Sopenharmony_ci	but don't set the mode */
4538c2ecf20Sopenharmony_ci	HPI_ADAPTER_MODE_QUERY = 1
4548c2ecf20Sopenharmony_ci};
4558c2ecf20Sopenharmony_ci
4568c2ecf20Sopenharmony_ci/** Adapter Modes
4578c2ecf20Sopenharmony_ci These are used by HPI_AdapterSetModeEx()
4588c2ecf20Sopenharmony_ci
4598c2ecf20Sopenharmony_ci\warning - more than 16 possible modes breaks
4608c2ecf20Sopenharmony_cia bitmask in the Windows WAVE DLL
4618c2ecf20Sopenharmony_ci\ingroup adapter
4628c2ecf20Sopenharmony_ci*/
4638c2ecf20Sopenharmony_cienum HPI_ADAPTER_MODES {
4648c2ecf20Sopenharmony_ci/** 4 outstream mode.
4658c2ecf20Sopenharmony_ci- ASI6114: 1 instream
4668c2ecf20Sopenharmony_ci- ASI6044: 4 instreams
4678c2ecf20Sopenharmony_ci- ASI6012: 1 instream
4688c2ecf20Sopenharmony_ci- ASI6102: no instreams
4698c2ecf20Sopenharmony_ci- ASI6022, ASI6122: 2 instreams
4708c2ecf20Sopenharmony_ci- ASI5111, ASI5101: 2 instreams
4718c2ecf20Sopenharmony_ci- ASI652x, ASI662x: 2 instreams
4728c2ecf20Sopenharmony_ci- ASI654x, ASI664x: 4 instreams
4738c2ecf20Sopenharmony_ci*/
4748c2ecf20Sopenharmony_ci	HPI_ADAPTER_MODE_4OSTREAM = 1,
4758c2ecf20Sopenharmony_ci
4768c2ecf20Sopenharmony_ci/** 6 outstream mode.
4778c2ecf20Sopenharmony_ci- ASI6012: 1 instream,
4788c2ecf20Sopenharmony_ci- ASI6022, ASI6122: 2 instreams
4798c2ecf20Sopenharmony_ci- ASI652x, ASI662x: 4 instreams
4808c2ecf20Sopenharmony_ci*/
4818c2ecf20Sopenharmony_ci	HPI_ADAPTER_MODE_6OSTREAM = 2,
4828c2ecf20Sopenharmony_ci
4838c2ecf20Sopenharmony_ci/** 8 outstream mode.
4848c2ecf20Sopenharmony_ci- ASI6114: 8 instreams
4858c2ecf20Sopenharmony_ci- ASI6118: 8 instreams
4868c2ecf20Sopenharmony_ci- ASI6585: 8 instreams
4878c2ecf20Sopenharmony_ci*/
4888c2ecf20Sopenharmony_ci	HPI_ADAPTER_MODE_8OSTREAM = 3,
4898c2ecf20Sopenharmony_ci
4908c2ecf20Sopenharmony_ci/** 16 outstream mode.
4918c2ecf20Sopenharmony_ci- ASI6416 16 instreams
4928c2ecf20Sopenharmony_ci- ASI6518, ASI6618 16 instreams
4938c2ecf20Sopenharmony_ci- ASI6118 16 mono out and in streams
4948c2ecf20Sopenharmony_ci*/
4958c2ecf20Sopenharmony_ci	HPI_ADAPTER_MODE_16OSTREAM = 4,
4968c2ecf20Sopenharmony_ci
4978c2ecf20Sopenharmony_ci/** one outstream mode.
4988c2ecf20Sopenharmony_ci- ASI5111 1 outstream, 1 instream
4998c2ecf20Sopenharmony_ci*/
5008c2ecf20Sopenharmony_ci	HPI_ADAPTER_MODE_1OSTREAM = 5,
5018c2ecf20Sopenharmony_ci
5028c2ecf20Sopenharmony_ci/** ASI504X mode 1. 12 outstream, 4 instream 0 to 48kHz sample rates
5038c2ecf20Sopenharmony_ci	(see ASI504X datasheet for more info).
5048c2ecf20Sopenharmony_ci*/
5058c2ecf20Sopenharmony_ci	HPI_ADAPTER_MODE_1 = 6,
5068c2ecf20Sopenharmony_ci
5078c2ecf20Sopenharmony_ci/** ASI504X mode 2. 4 outstreams, 4 instreams at 0 to 192kHz sample rates
5088c2ecf20Sopenharmony_ci	(see ASI504X datasheet for more info).
5098c2ecf20Sopenharmony_ci*/
5108c2ecf20Sopenharmony_ci	HPI_ADAPTER_MODE_2 = 7,
5118c2ecf20Sopenharmony_ci
5128c2ecf20Sopenharmony_ci/** ASI504X mode 3. 4 outstreams, 4 instreams at 0 to 192kHz sample rates
5138c2ecf20Sopenharmony_ci	(see ASI504X datasheet for more info).
5148c2ecf20Sopenharmony_ci*/
5158c2ecf20Sopenharmony_ci	HPI_ADAPTER_MODE_3 = 8,
5168c2ecf20Sopenharmony_ci
5178c2ecf20Sopenharmony_ci/** ASI504X multichannel mode.
5188c2ecf20Sopenharmony_ci	2 outstreams -> 4 line outs = 1 to 8 channel streams),
5198c2ecf20Sopenharmony_ci	4 lineins -> 1 instream (1 to 8 channel streams) at 0-48kHz.
5208c2ecf20Sopenharmony_ci	For more info see the SSX Specification.
5218c2ecf20Sopenharmony_ci*/
5228c2ecf20Sopenharmony_ci	HPI_ADAPTER_MODE_MULTICHANNEL = 9,
5238c2ecf20Sopenharmony_ci
5248c2ecf20Sopenharmony_ci/** 12 outstream mode.
5258c2ecf20Sopenharmony_ci- ASI6514, ASI6614: 2 instreams
5268c2ecf20Sopenharmony_ci- ASI6540,ASI6544: 8 instreams
5278c2ecf20Sopenharmony_ci- ASI6640,ASI6644: 8 instreams
5288c2ecf20Sopenharmony_ci*/
5298c2ecf20Sopenharmony_ci	HPI_ADAPTER_MODE_12OSTREAM = 10,
5308c2ecf20Sopenharmony_ci
5318c2ecf20Sopenharmony_ci/** 9 outstream mode.
5328c2ecf20Sopenharmony_ci- ASI6044: 8 instreams
5338c2ecf20Sopenharmony_ci*/
5348c2ecf20Sopenharmony_ci	HPI_ADAPTER_MODE_9OSTREAM = 11,
5358c2ecf20Sopenharmony_ci
5368c2ecf20Sopenharmony_ci/** mono mode.
5378c2ecf20Sopenharmony_ci- ASI6416: 16 outstreams/instreams
5388c2ecf20Sopenharmony_ci- ASI5402: 2 outstreams/instreams
5398c2ecf20Sopenharmony_ci*/
5408c2ecf20Sopenharmony_ci	HPI_ADAPTER_MODE_MONO = 12,
5418c2ecf20Sopenharmony_ci
5428c2ecf20Sopenharmony_ci/** Low latency mode.
5438c2ecf20Sopenharmony_ci- ASI6416/ASI6316: 1 16 channel outstream and instream
5448c2ecf20Sopenharmony_ci*/
5458c2ecf20Sopenharmony_ci	HPI_ADAPTER_MODE_LOW_LATENCY = 13
5468c2ecf20Sopenharmony_ci};
5478c2ecf20Sopenharmony_ci
5488c2ecf20Sopenharmony_ci/* Note, adapters can have more than one capability -
5498c2ecf20Sopenharmony_ciencoding as bitfield is recommended. */
5508c2ecf20Sopenharmony_ci#define HPI_CAPABILITY_NONE             (0)
5518c2ecf20Sopenharmony_ci#define HPI_CAPABILITY_MPEG_LAYER3      (1)
5528c2ecf20Sopenharmony_ci
5538c2ecf20Sopenharmony_ci/* Set this equal to maximum capability index,
5548c2ecf20Sopenharmony_ciMust not be greater than 32 - see axnvdef.h */
5558c2ecf20Sopenharmony_ci#define HPI_CAPABILITY_MAX                      1
5568c2ecf20Sopenharmony_ci/* #define HPI_CAPABILITY_AAC              2 */
5578c2ecf20Sopenharmony_ci
5588c2ecf20Sopenharmony_ci/******************************************* STREAM ATTRIBUTES ****/
5598c2ecf20Sopenharmony_ci
5608c2ecf20Sopenharmony_ci/** MPEG Ancillary Data modes
5618c2ecf20Sopenharmony_ci
5628c2ecf20Sopenharmony_ciThe mode for the ancillary data insertion or extraction to operate in.
5638c2ecf20Sopenharmony_ci\ingroup stream
5648c2ecf20Sopenharmony_ci*/
5658c2ecf20Sopenharmony_cienum HPI_MPEG_ANC_MODES {
5668c2ecf20Sopenharmony_ci	/** the MPEG frames have energy information stored in them (5 bytes per stereo frame, 3 per mono) */
5678c2ecf20Sopenharmony_ci	HPI_MPEG_ANC_HASENERGY = 0,
5688c2ecf20Sopenharmony_ci	/** the entire ancillary data field is taken up by data from the Anc data buffer
5698c2ecf20Sopenharmony_ci	On encode, the encoder will insert the energy bytes before filling the remainder
5708c2ecf20Sopenharmony_ci	of the ancillary data space with data from the ancillary data buffer.
5718c2ecf20Sopenharmony_ci	*/
5728c2ecf20Sopenharmony_ci	HPI_MPEG_ANC_RAW = 1
5738c2ecf20Sopenharmony_ci};
5748c2ecf20Sopenharmony_ci
5758c2ecf20Sopenharmony_ci/** Ancillary Data Alignment
5768c2ecf20Sopenharmony_ci\ingroup instream
5778c2ecf20Sopenharmony_ci*/
5788c2ecf20Sopenharmony_cienum HPI_ISTREAM_MPEG_ANC_ALIGNS {
5798c2ecf20Sopenharmony_ci	/** data is packed against the end of data, then padded to the end of frame */
5808c2ecf20Sopenharmony_ci	HPI_MPEG_ANC_ALIGN_LEFT = 0,
5818c2ecf20Sopenharmony_ci	/** data is packed against the end of the frame */
5828c2ecf20Sopenharmony_ci	HPI_MPEG_ANC_ALIGN_RIGHT = 1
5838c2ecf20Sopenharmony_ci};
5848c2ecf20Sopenharmony_ci
5858c2ecf20Sopenharmony_ci/** MPEG modes
5868c2ecf20Sopenharmony_ciMPEG modes - can be used optionally for HPI_FormatCreate()
5878c2ecf20Sopenharmony_ciparameter dwAttributes.
5888c2ecf20Sopenharmony_ci
5898c2ecf20Sopenharmony_ciUsing any mode setting other than HPI_MPEG_MODE_DEFAULT
5908c2ecf20Sopenharmony_ciwith single channel format will return an error.
5918c2ecf20Sopenharmony_ci\ingroup stream
5928c2ecf20Sopenharmony_ci*/
5938c2ecf20Sopenharmony_cienum HPI_MPEG_MODES {
5948c2ecf20Sopenharmony_ci/** Causes the MPEG-1 Layer II bitstream to be recorded
5958c2ecf20Sopenharmony_ciin single_channel mode when the number of channels is 1 and in stereo when the
5968c2ecf20Sopenharmony_cinumber of channels is 2. */
5978c2ecf20Sopenharmony_ci	HPI_MPEG_MODE_DEFAULT = 0,
5988c2ecf20Sopenharmony_ci	/** Standard stereo without joint-stereo compression */
5998c2ecf20Sopenharmony_ci	HPI_MPEG_MODE_STEREO = 1,
6008c2ecf20Sopenharmony_ci	/** Joint stereo  */
6018c2ecf20Sopenharmony_ci	HPI_MPEG_MODE_JOINTSTEREO = 2,
6028c2ecf20Sopenharmony_ci	/** Left and Right channels are completely independent */
6038c2ecf20Sopenharmony_ci	HPI_MPEG_MODE_DUALCHANNEL = 3
6048c2ecf20Sopenharmony_ci};
6058c2ecf20Sopenharmony_ci/******************************************* MIXER ATTRIBUTES ****/
6068c2ecf20Sopenharmony_ci
6078c2ecf20Sopenharmony_ci/* \defgroup mixer_flags Mixer flags for HPI_MIXER_GET_CONTROL_MULTIPLE_VALUES
6088c2ecf20Sopenharmony_ci{
6098c2ecf20Sopenharmony_ci*/
6108c2ecf20Sopenharmony_ci#define HPI_MIXER_GET_CONTROL_MULTIPLE_CHANGED  (0)
6118c2ecf20Sopenharmony_ci#define HPI_MIXER_GET_CONTROL_MULTIPLE_RESET    (1)
6128c2ecf20Sopenharmony_ci/*}*/
6138c2ecf20Sopenharmony_ci
6148c2ecf20Sopenharmony_ci/** Commands used by HPI_MixerStore()
6158c2ecf20Sopenharmony_ci\ingroup mixer
6168c2ecf20Sopenharmony_ci*/
6178c2ecf20Sopenharmony_cienum HPI_MIXER_STORE_COMMAND {
6188c2ecf20Sopenharmony_ci/** Save all mixer control settings. */
6198c2ecf20Sopenharmony_ci	HPI_MIXER_STORE_SAVE = 1,
6208c2ecf20Sopenharmony_ci/** Restore all controls from saved. */
6218c2ecf20Sopenharmony_ci	HPI_MIXER_STORE_RESTORE = 2,
6228c2ecf20Sopenharmony_ci/** Delete saved control settings. */
6238c2ecf20Sopenharmony_ci	HPI_MIXER_STORE_DELETE = 3,
6248c2ecf20Sopenharmony_ci/** Enable auto storage of some control settings. */
6258c2ecf20Sopenharmony_ci	HPI_MIXER_STORE_ENABLE = 4,
6268c2ecf20Sopenharmony_ci/** Disable auto storage of some control settings. */
6278c2ecf20Sopenharmony_ci	HPI_MIXER_STORE_DISABLE = 5,
6288c2ecf20Sopenharmony_ci/** Unimplemented - save the attributes of a single control. */
6298c2ecf20Sopenharmony_ci	HPI_MIXER_STORE_SAVE_SINGLE = 6
6308c2ecf20Sopenharmony_ci};
6318c2ecf20Sopenharmony_ci
6328c2ecf20Sopenharmony_ci/****************************/
6338c2ecf20Sopenharmony_ci/* CONTROL ATTRIBUTE VALUES */
6348c2ecf20Sopenharmony_ci/****************************/
6358c2ecf20Sopenharmony_ci
6368c2ecf20Sopenharmony_ci/** Used by mixer plugin enable functions
6378c2ecf20Sopenharmony_ci
6388c2ecf20Sopenharmony_ciE.g. HPI_ParametricEq_SetState()
6398c2ecf20Sopenharmony_ci\ingroup mixer
6408c2ecf20Sopenharmony_ci*/
6418c2ecf20Sopenharmony_cienum HPI_SWITCH_STATES {
6428c2ecf20Sopenharmony_ci	HPI_SWITCH_OFF = 0,	/**< turn the mixer plugin on. */
6438c2ecf20Sopenharmony_ci	HPI_SWITCH_ON = 1	/**< turn the mixer plugin off. */
6448c2ecf20Sopenharmony_ci};
6458c2ecf20Sopenharmony_ci
6468c2ecf20Sopenharmony_ci/* Volume control special gain values */
6478c2ecf20Sopenharmony_ci
6488c2ecf20Sopenharmony_ci/** volumes units are 100ths of a dB
6498c2ecf20Sopenharmony_ci\ingroup volume
6508c2ecf20Sopenharmony_ci*/
6518c2ecf20Sopenharmony_ci#define HPI_UNITS_PER_dB                100
6528c2ecf20Sopenharmony_ci/** turns volume control OFF or MUTE
6538c2ecf20Sopenharmony_ci\ingroup volume
6548c2ecf20Sopenharmony_ci*/
6558c2ecf20Sopenharmony_ci#define HPI_GAIN_OFF                    (-100 * HPI_UNITS_PER_dB)
6568c2ecf20Sopenharmony_ci
6578c2ecf20Sopenharmony_ci/** channel mask specifying all channels
6588c2ecf20Sopenharmony_ci\ingroup volume
6598c2ecf20Sopenharmony_ci*/
6608c2ecf20Sopenharmony_ci#define HPI_BITMASK_ALL_CHANNELS        (0xFFFFFFFF)
6618c2ecf20Sopenharmony_ci
6628c2ecf20Sopenharmony_ci/** value returned for no signal
6638c2ecf20Sopenharmony_ci\ingroup meter
6648c2ecf20Sopenharmony_ci*/
6658c2ecf20Sopenharmony_ci#define HPI_METER_MINIMUM               (-150 * HPI_UNITS_PER_dB)
6668c2ecf20Sopenharmony_ci
6678c2ecf20Sopenharmony_ci/** autofade profiles
6688c2ecf20Sopenharmony_ci\ingroup volume
6698c2ecf20Sopenharmony_ci*/
6708c2ecf20Sopenharmony_cienum HPI_VOLUME_AUTOFADES {
6718c2ecf20Sopenharmony_ci/** log fade - dB attenuation changes linearly over time */
6728c2ecf20Sopenharmony_ci	HPI_VOLUME_AUTOFADE_LOG = 2,
6738c2ecf20Sopenharmony_ci/** linear fade - amplitude changes linearly */
6748c2ecf20Sopenharmony_ci	HPI_VOLUME_AUTOFADE_LINEAR = 3
6758c2ecf20Sopenharmony_ci};
6768c2ecf20Sopenharmony_ci
6778c2ecf20Sopenharmony_ci/** The physical encoding format of the AESEBU I/O.
6788c2ecf20Sopenharmony_ci
6798c2ecf20Sopenharmony_ciUsed in HPI_Aesebu_Transmitter_SetFormat(), HPI_Aesebu_Receiver_SetFormat()
6808c2ecf20Sopenharmony_cialong with related Get and Query functions
6818c2ecf20Sopenharmony_ci\ingroup aestx
6828c2ecf20Sopenharmony_ci*/
6838c2ecf20Sopenharmony_cienum HPI_AESEBU_FORMATS {
6848c2ecf20Sopenharmony_ci/** AES/EBU physical format - AES/EBU balanced "professional"  */
6858c2ecf20Sopenharmony_ci	HPI_AESEBU_FORMAT_AESEBU = 1,
6868c2ecf20Sopenharmony_ci/** AES/EBU physical format - S/PDIF unbalanced "consumer"      */
6878c2ecf20Sopenharmony_ci	HPI_AESEBU_FORMAT_SPDIF = 2
6888c2ecf20Sopenharmony_ci};
6898c2ecf20Sopenharmony_ci
6908c2ecf20Sopenharmony_ci/** AES/EBU error status bits
6918c2ecf20Sopenharmony_ci
6928c2ecf20Sopenharmony_ciReturned by HPI_Aesebu_Receiver_GetErrorStatus()
6938c2ecf20Sopenharmony_ci\ingroup aesrx
6948c2ecf20Sopenharmony_ci*/
6958c2ecf20Sopenharmony_cienum HPI_AESEBU_ERRORS {
6968c2ecf20Sopenharmony_ci/**  bit0: 1 when PLL is not locked */
6978c2ecf20Sopenharmony_ci	HPI_AESEBU_ERROR_NOT_LOCKED = 0x01,
6988c2ecf20Sopenharmony_ci/**  bit1: 1 when signal quality is poor */
6998c2ecf20Sopenharmony_ci	HPI_AESEBU_ERROR_POOR_QUALITY = 0x02,
7008c2ecf20Sopenharmony_ci/** bit2: 1 when there is a parity error */
7018c2ecf20Sopenharmony_ci	HPI_AESEBU_ERROR_PARITY_ERROR = 0x04,
7028c2ecf20Sopenharmony_ci/**  bit3: 1 when there is a bi-phase coding violation */
7038c2ecf20Sopenharmony_ci	HPI_AESEBU_ERROR_BIPHASE_VIOLATION = 0x08,
7048c2ecf20Sopenharmony_ci/**  bit4: 1 when the validity bit is high */
7058c2ecf20Sopenharmony_ci	HPI_AESEBU_ERROR_VALIDITY = 0x10,
7068c2ecf20Sopenharmony_ci/**  bit5: 1 when the CRC error bit is high */
7078c2ecf20Sopenharmony_ci	HPI_AESEBU_ERROR_CRC = 0x20
7088c2ecf20Sopenharmony_ci};
7098c2ecf20Sopenharmony_ci
7108c2ecf20Sopenharmony_ci/** \addtogroup pad
7118c2ecf20Sopenharmony_ci\{
7128c2ecf20Sopenharmony_ci*/
7138c2ecf20Sopenharmony_ci/** The text string containing the station/channel combination. */
7148c2ecf20Sopenharmony_ci#define HPI_PAD_CHANNEL_NAME_LEN        16
7158c2ecf20Sopenharmony_ci/** The text string containing the artist. */
7168c2ecf20Sopenharmony_ci#define HPI_PAD_ARTIST_LEN              64
7178c2ecf20Sopenharmony_ci/** The text string containing the title. */
7188c2ecf20Sopenharmony_ci#define HPI_PAD_TITLE_LEN               64
7198c2ecf20Sopenharmony_ci/** The text string containing the comment. */
7208c2ecf20Sopenharmony_ci#define HPI_PAD_COMMENT_LEN             256
7218c2ecf20Sopenharmony_ci/** The PTY when the tuner has not received any PTY. */
7228c2ecf20Sopenharmony_ci#define HPI_PAD_PROGRAM_TYPE_INVALID    0xffff
7238c2ecf20Sopenharmony_ci/** \} */
7248c2ecf20Sopenharmony_ci
7258c2ecf20Sopenharmony_ci/** Data types for PTY string translation.
7268c2ecf20Sopenharmony_ci\ingroup rds
7278c2ecf20Sopenharmony_ci*/
7288c2ecf20Sopenharmony_cienum eHPI_RDS_type {
7298c2ecf20Sopenharmony_ci	HPI_RDS_DATATYPE_RDS = 0,	/**< RDS bitstream.*/
7308c2ecf20Sopenharmony_ci	HPI_RDS_DATATYPE_RBDS = 1	/**< RBDS bitstream.*/
7318c2ecf20Sopenharmony_ci};
7328c2ecf20Sopenharmony_ci
7338c2ecf20Sopenharmony_ci/** Tuner bands
7348c2ecf20Sopenharmony_ci
7358c2ecf20Sopenharmony_ciUsed for HPI_Tuner_SetBand(),HPI_Tuner_GetBand()
7368c2ecf20Sopenharmony_ci\ingroup tuner
7378c2ecf20Sopenharmony_ci*/
7388c2ecf20Sopenharmony_cienum HPI_TUNER_BAND {
7398c2ecf20Sopenharmony_ci	HPI_TUNER_BAND_AM = 1,	 /**< AM band */
7408c2ecf20Sopenharmony_ci	HPI_TUNER_BAND_FM = 2,	 /**< FM band (mono) */
7418c2ecf20Sopenharmony_ci	HPI_TUNER_BAND_TV_NTSC_M = 3,	 /**< NTSC-M TV band*/
7428c2ecf20Sopenharmony_ci	HPI_TUNER_BAND_TV = 3,	/* use TV_NTSC_M */
7438c2ecf20Sopenharmony_ci	HPI_TUNER_BAND_FM_STEREO = 4,	 /**< FM band (stereo) */
7448c2ecf20Sopenharmony_ci	HPI_TUNER_BAND_AUX = 5,	 /**< auxiliary input */
7458c2ecf20Sopenharmony_ci	HPI_TUNER_BAND_TV_PAL_BG = 6,	 /**< PAL-B/G TV band*/
7468c2ecf20Sopenharmony_ci	HPI_TUNER_BAND_TV_PAL_I = 7,	 /**< PAL-I TV band*/
7478c2ecf20Sopenharmony_ci	HPI_TUNER_BAND_TV_PAL_DK = 8,	 /**< PAL-D/K TV band*/
7488c2ecf20Sopenharmony_ci	HPI_TUNER_BAND_TV_SECAM_L = 9,	 /**< SECAM-L TV band*/
7498c2ecf20Sopenharmony_ci	HPI_TUNER_BAND_DAB = 10,
7508c2ecf20Sopenharmony_ci	HPI_TUNER_BAND_LAST = 10 /**< the index of the last tuner band. */
7518c2ecf20Sopenharmony_ci};
7528c2ecf20Sopenharmony_ci
7538c2ecf20Sopenharmony_ci/** Tuner mode attributes
7548c2ecf20Sopenharmony_ci
7558c2ecf20Sopenharmony_ciUsed by HPI_Tuner_SetMode(), HPI_Tuner_GetMode()
7568c2ecf20Sopenharmony_ci\ingroup tuner
7578c2ecf20Sopenharmony_ci
7588c2ecf20Sopenharmony_ci*/
7598c2ecf20Sopenharmony_cienum HPI_TUNER_MODES {
7608c2ecf20Sopenharmony_ci	HPI_TUNER_MODE_RSS = 1,	/**< control  RSS */
7618c2ecf20Sopenharmony_ci	HPI_TUNER_MODE_RDS = 2	/**< control  RBDS/RDS */
7628c2ecf20Sopenharmony_ci};
7638c2ecf20Sopenharmony_ci
7648c2ecf20Sopenharmony_ci/** Tuner mode attribute values
7658c2ecf20Sopenharmony_ci
7668c2ecf20Sopenharmony_ciUsed by HPI_Tuner_SetMode(), HPI_Tuner_GetMode()
7678c2ecf20Sopenharmony_ci\ingroup tuner
7688c2ecf20Sopenharmony_ci*/
7698c2ecf20Sopenharmony_cienum HPI_TUNER_MODE_VALUES {
7708c2ecf20Sopenharmony_ci/* RSS attribute values */
7718c2ecf20Sopenharmony_ci	HPI_TUNER_MODE_RSS_DISABLE = 0,	/**< RSS disable */
7728c2ecf20Sopenharmony_ci	HPI_TUNER_MODE_RSS_ENABLE = 1,	/**< RSS enable */
7738c2ecf20Sopenharmony_ci
7748c2ecf20Sopenharmony_ci/* RDS mode attributes */
7758c2ecf20Sopenharmony_ci	HPI_TUNER_MODE_RDS_DISABLE = 0,	/**< RDS - disabled */
7768c2ecf20Sopenharmony_ci	HPI_TUNER_MODE_RDS_RDS = 1,  /**< RDS - RDS mode */
7778c2ecf20Sopenharmony_ci	HPI_TUNER_MODE_RDS_RBDS = 2 /**<  RDS - RBDS mode */
7788c2ecf20Sopenharmony_ci};
7798c2ecf20Sopenharmony_ci
7808c2ecf20Sopenharmony_ci/** Tuner Status Bits
7818c2ecf20Sopenharmony_ci
7828c2ecf20Sopenharmony_ciThese bitfield values are returned by a call to HPI_Tuner_GetStatus().
7838c2ecf20Sopenharmony_ciMultiple fields are returned from a single call.
7848c2ecf20Sopenharmony_ci\ingroup tuner
7858c2ecf20Sopenharmony_ci*/
7868c2ecf20Sopenharmony_cienum HPI_TUNER_STATUS_BITS {
7878c2ecf20Sopenharmony_ci	HPI_TUNER_VIDEO_COLOR_PRESENT = 0x0001,	/**< video color is present. */
7888c2ecf20Sopenharmony_ci	HPI_TUNER_VIDEO_IS_60HZ = 0x0020, /**< 60 hz video detected. */
7898c2ecf20Sopenharmony_ci	HPI_TUNER_VIDEO_HORZ_SYNC_MISSING = 0x0040, /**< video HSYNC is missing. */
7908c2ecf20Sopenharmony_ci	HPI_TUNER_VIDEO_STATUS_VALID = 0x0100, /**< video status is valid. */
7918c2ecf20Sopenharmony_ci	HPI_TUNER_DIGITAL = 0x0200, /**< tuner reports digital programming. */
7928c2ecf20Sopenharmony_ci	HPI_TUNER_MULTIPROGRAM = 0x0400, /**< tuner reports multiple programs. */
7938c2ecf20Sopenharmony_ci	HPI_TUNER_PLL_LOCKED = 0x1000, /**< the tuner's PLL is locked. */
7948c2ecf20Sopenharmony_ci	HPI_TUNER_FM_STEREO = 0x2000 /**< tuner reports back FM stereo. */
7958c2ecf20Sopenharmony_ci};
7968c2ecf20Sopenharmony_ci
7978c2ecf20Sopenharmony_ci/** Channel Modes
7988c2ecf20Sopenharmony_ciUsed for HPI_ChannelModeSet/Get()
7998c2ecf20Sopenharmony_ci\ingroup channelmode
8008c2ecf20Sopenharmony_ci*/
8018c2ecf20Sopenharmony_cienum HPI_CHANNEL_MODES {
8028c2ecf20Sopenharmony_ci/** Left channel out = left channel in, Right channel out = right channel in. */
8038c2ecf20Sopenharmony_ci	HPI_CHANNEL_MODE_NORMAL = 1,
8048c2ecf20Sopenharmony_ci/** Left channel out = right channel in, Right channel out = left channel in. */
8058c2ecf20Sopenharmony_ci	HPI_CHANNEL_MODE_SWAP = 2,
8068c2ecf20Sopenharmony_ci/** Left channel out = left channel in, Right channel out = left channel in. */
8078c2ecf20Sopenharmony_ci	HPI_CHANNEL_MODE_LEFT_TO_STEREO = 3,
8088c2ecf20Sopenharmony_ci/** Left channel out = right channel in, Right channel out = right channel in.*/
8098c2ecf20Sopenharmony_ci	HPI_CHANNEL_MODE_RIGHT_TO_STEREO = 4,
8108c2ecf20Sopenharmony_ci/** Left channel out = (left channel in + right channel in)/2,
8118c2ecf20Sopenharmony_ci    Right channel out = mute. */
8128c2ecf20Sopenharmony_ci	HPI_CHANNEL_MODE_STEREO_TO_LEFT = 5,
8138c2ecf20Sopenharmony_ci/** Left channel out = mute,
8148c2ecf20Sopenharmony_ci    Right channel out = (right channel in + left channel in)/2. */
8158c2ecf20Sopenharmony_ci	HPI_CHANNEL_MODE_STEREO_TO_RIGHT = 6,
8168c2ecf20Sopenharmony_ci	HPI_CHANNEL_MODE_LAST = 6
8178c2ecf20Sopenharmony_ci};
8188c2ecf20Sopenharmony_ci
8198c2ecf20Sopenharmony_ci/** SampleClock source values
8208c2ecf20Sopenharmony_ci\ingroup sampleclock
8218c2ecf20Sopenharmony_ci*/
8228c2ecf20Sopenharmony_cienum HPI_SAMPLECLOCK_SOURCES {
8238c2ecf20Sopenharmony_ci/** The sampleclock output is derived from its local samplerate generator.
8248c2ecf20Sopenharmony_ci    The local samplerate may be set using HPI_SampleClock_SetLocalRate(). */
8258c2ecf20Sopenharmony_ci	HPI_SAMPLECLOCK_SOURCE_LOCAL = 1,
8268c2ecf20Sopenharmony_ci/** The adapter is clocked from a dedicated AES/EBU SampleClock input.*/
8278c2ecf20Sopenharmony_ci	HPI_SAMPLECLOCK_SOURCE_AESEBU_SYNC = 2,
8288c2ecf20Sopenharmony_ci/** From external wordclock connector */
8298c2ecf20Sopenharmony_ci	HPI_SAMPLECLOCK_SOURCE_WORD = 3,
8308c2ecf20Sopenharmony_ci/** Board-to-board header */
8318c2ecf20Sopenharmony_ci	HPI_SAMPLECLOCK_SOURCE_WORD_HEADER = 4,
8328c2ecf20Sopenharmony_ci/** FUTURE - SMPTE clock. */
8338c2ecf20Sopenharmony_ci	HPI_SAMPLECLOCK_SOURCE_SMPTE = 5,
8348c2ecf20Sopenharmony_ci/** One of the aesebu inputs */
8358c2ecf20Sopenharmony_ci	HPI_SAMPLECLOCK_SOURCE_AESEBU_INPUT = 6,
8368c2ecf20Sopenharmony_ci/** From a network interface e.g. Cobranet or Livewire at either 48 or 96kHz */
8378c2ecf20Sopenharmony_ci	HPI_SAMPLECLOCK_SOURCE_NETWORK = 8,
8388c2ecf20Sopenharmony_ci/** From previous adjacent module (ASI2416 only)*/
8398c2ecf20Sopenharmony_ci	HPI_SAMPLECLOCK_SOURCE_PREV_MODULE = 10,
8408c2ecf20Sopenharmony_ci/** Blu link sample clock*/
8418c2ecf20Sopenharmony_ci	HPI_SAMPLECLOCK_SOURCE_BLULINK = 11,
8428c2ecf20Sopenharmony_ci/*! Update this if you add a new clock source.*/
8438c2ecf20Sopenharmony_ci	HPI_SAMPLECLOCK_SOURCE_LAST = 11
8448c2ecf20Sopenharmony_ci};
8458c2ecf20Sopenharmony_ci
8468c2ecf20Sopenharmony_ci/** Equalizer filter types. Used by HPI_ParametricEq_SetBand()
8478c2ecf20Sopenharmony_ci\ingroup parmeq
8488c2ecf20Sopenharmony_ci*/
8498c2ecf20Sopenharmony_cienum HPI_FILTER_TYPE {
8508c2ecf20Sopenharmony_ci	HPI_FILTER_TYPE_BYPASS = 0,	/**< filter is turned off */
8518c2ecf20Sopenharmony_ci
8528c2ecf20Sopenharmony_ci	HPI_FILTER_TYPE_LOWSHELF = 1,	/**< EQ low shelf */
8538c2ecf20Sopenharmony_ci	HPI_FILTER_TYPE_HIGHSHELF = 2,	/**< EQ high shelf */
8548c2ecf20Sopenharmony_ci	HPI_FILTER_TYPE_EQ_BAND = 3,	/**< EQ gain */
8558c2ecf20Sopenharmony_ci
8568c2ecf20Sopenharmony_ci	HPI_FILTER_TYPE_LOWPASS = 4,	/**< standard low pass */
8578c2ecf20Sopenharmony_ci	HPI_FILTER_TYPE_HIGHPASS = 5,	/**< standard high pass */
8588c2ecf20Sopenharmony_ci	HPI_FILTER_TYPE_BANDPASS = 6,	/**< standard band pass */
8598c2ecf20Sopenharmony_ci	HPI_FILTER_TYPE_BANDSTOP = 7	/**< standard band stop/notch */
8608c2ecf20Sopenharmony_ci};
8618c2ecf20Sopenharmony_ci
8628c2ecf20Sopenharmony_ci/** Async Event sources
8638c2ecf20Sopenharmony_ci\ingroup async
8648c2ecf20Sopenharmony_ci*/
8658c2ecf20Sopenharmony_cienum ASYNC_EVENT_SOURCES {
8668c2ecf20Sopenharmony_ci	HPI_ASYNC_EVENT_GPIO = 1,	/**< GPIO event. */
8678c2ecf20Sopenharmony_ci	HPI_ASYNC_EVENT_SILENCE = 2,	/**< silence event detected. */
8688c2ecf20Sopenharmony_ci	HPI_ASYNC_EVENT_TONE = 3	/**< tone event detected. */
8698c2ecf20Sopenharmony_ci};
8708c2ecf20Sopenharmony_ci/*******************************************/
8718c2ecf20Sopenharmony_ci/** HPI Error codes
8728c2ecf20Sopenharmony_ci
8738c2ecf20Sopenharmony_ciAlmost all HPI functions return an error code
8748c2ecf20Sopenharmony_ciA return value of zero means there was no error.
8758c2ecf20Sopenharmony_ciOtherwise one of these error codes is returned.
8768c2ecf20Sopenharmony_ciError codes can be converted to a descriptive string using HPI_GetErrorText()
8778c2ecf20Sopenharmony_ci
8788c2ecf20Sopenharmony_ci\note When a new error code is added HPI_GetErrorText() MUST be updated.
8798c2ecf20Sopenharmony_ci\note Codes 1-100 are reserved for driver use
8808c2ecf20Sopenharmony_ci\ingroup utility
8818c2ecf20Sopenharmony_ci*/
8828c2ecf20Sopenharmony_cienum HPI_ERROR_CODES {
8838c2ecf20Sopenharmony_ci	/** Message type does not exist. */
8848c2ecf20Sopenharmony_ci	HPI_ERROR_INVALID_TYPE = 100,
8858c2ecf20Sopenharmony_ci	/** Object type does not exist. */
8868c2ecf20Sopenharmony_ci	HPI_ERROR_INVALID_OBJ = 101,
8878c2ecf20Sopenharmony_ci	/** Function does not exist. */
8888c2ecf20Sopenharmony_ci	HPI_ERROR_INVALID_FUNC = 102,
8898c2ecf20Sopenharmony_ci	/** The specified object does not exist. */
8908c2ecf20Sopenharmony_ci	HPI_ERROR_INVALID_OBJ_INDEX = 103,
8918c2ecf20Sopenharmony_ci	/** Trying to access an object that has not been opened yet. */
8928c2ecf20Sopenharmony_ci	HPI_ERROR_OBJ_NOT_OPEN = 104,
8938c2ecf20Sopenharmony_ci	/** Trying to open an already open object. */
8948c2ecf20Sopenharmony_ci	HPI_ERROR_OBJ_ALREADY_OPEN = 105,
8958c2ecf20Sopenharmony_ci	/** PCI, ISA resource not valid. */
8968c2ecf20Sopenharmony_ci	HPI_ERROR_INVALID_RESOURCE = 106,
8978c2ecf20Sopenharmony_ci	/* HPI_ERROR_SUBSYSFINDADAPTERS_GETINFO= 107 */
8988c2ecf20Sopenharmony_ci	/** Default response was never updated with actual error code. */
8998c2ecf20Sopenharmony_ci	HPI_ERROR_INVALID_RESPONSE = 108,
9008c2ecf20Sopenharmony_ci	/** wSize field of response was not updated,
9018c2ecf20Sopenharmony_ci	indicating that the message was not processed. */
9028c2ecf20Sopenharmony_ci	HPI_ERROR_PROCESSING_MESSAGE = 109,
9038c2ecf20Sopenharmony_ci	/** The network did not respond in a timely manner. */
9048c2ecf20Sopenharmony_ci	HPI_ERROR_NETWORK_TIMEOUT = 110,
9058c2ecf20Sopenharmony_ci	/* An HPI handle is invalid (uninitialised?). */
9068c2ecf20Sopenharmony_ci	HPI_ERROR_INVALID_HANDLE = 111,
9078c2ecf20Sopenharmony_ci	/** A function or attribute has not been implemented yet. */
9088c2ecf20Sopenharmony_ci	HPI_ERROR_UNIMPLEMENTED = 112,
9098c2ecf20Sopenharmony_ci	/** There are too many clients attempting
9108c2ecf20Sopenharmony_ci	    to access a network resource. */
9118c2ecf20Sopenharmony_ci	HPI_ERROR_NETWORK_TOO_MANY_CLIENTS = 113,
9128c2ecf20Sopenharmony_ci	/** Response buffer passed to HPI_Message
9138c2ecf20Sopenharmony_ci	    was smaller than returned response.
9148c2ecf20Sopenharmony_ci	    wSpecificError field of hpi response contains the required size.
9158c2ecf20Sopenharmony_ci	*/
9168c2ecf20Sopenharmony_ci	HPI_ERROR_RESPONSE_BUFFER_TOO_SMALL = 114,
9178c2ecf20Sopenharmony_ci	/** The returned response did not match the sent message */
9188c2ecf20Sopenharmony_ci	HPI_ERROR_RESPONSE_MISMATCH = 115,
9198c2ecf20Sopenharmony_ci	/** A control setting that should have been cached was not. */
9208c2ecf20Sopenharmony_ci	HPI_ERROR_CONTROL_CACHING = 116,
9218c2ecf20Sopenharmony_ci	/** A message buffer in the path to the adapter was smaller
9228c2ecf20Sopenharmony_ci	    than the message size.
9238c2ecf20Sopenharmony_ci	    wSpecificError field of hpi response contains the actual size.
9248c2ecf20Sopenharmony_ci	*/
9258c2ecf20Sopenharmony_ci	HPI_ERROR_MESSAGE_BUFFER_TOO_SMALL = 117,
9268c2ecf20Sopenharmony_ci
9278c2ecf20Sopenharmony_ci	/* HPI_ERROR_TOO_MANY_ADAPTERS= 200 */
9288c2ecf20Sopenharmony_ci	/** Bad adpater. */
9298c2ecf20Sopenharmony_ci	HPI_ERROR_BAD_ADAPTER = 201,
9308c2ecf20Sopenharmony_ci	/** Adapter number out of range or not set properly. */
9318c2ecf20Sopenharmony_ci	HPI_ERROR_BAD_ADAPTER_NUMBER = 202,
9328c2ecf20Sopenharmony_ci	/** 2 adapters with the same adapter number. */
9338c2ecf20Sopenharmony_ci	HPI_ERROR_DUPLICATE_ADAPTER_NUMBER = 203,
9348c2ecf20Sopenharmony_ci	/** DSP code failed to bootload. Usually a DSP memory test failure. */
9358c2ecf20Sopenharmony_ci	HPI_ERROR_DSP_BOOTLOAD = 204,
9368c2ecf20Sopenharmony_ci	/** Couldn't find or open the DSP code file. */
9378c2ecf20Sopenharmony_ci	HPI_ERROR_DSP_FILE_NOT_FOUND = 206,
9388c2ecf20Sopenharmony_ci	/** Internal DSP hardware error. */
9398c2ecf20Sopenharmony_ci	HPI_ERROR_DSP_HARDWARE = 207,
9408c2ecf20Sopenharmony_ci	/** Could not allocate memory */
9418c2ecf20Sopenharmony_ci	HPI_ERROR_MEMORY_ALLOC = 208,
9428c2ecf20Sopenharmony_ci	/** Failed to correctly load/config PLD. (unused) */
9438c2ecf20Sopenharmony_ci	HPI_ERROR_PLD_LOAD = 209,
9448c2ecf20Sopenharmony_ci	/** Unexpected end of file, block length too big etc. */
9458c2ecf20Sopenharmony_ci	HPI_ERROR_DSP_FILE_FORMAT = 210,
9468c2ecf20Sopenharmony_ci
9478c2ecf20Sopenharmony_ci	/** Found but could not open DSP code file. */
9488c2ecf20Sopenharmony_ci	HPI_ERROR_DSP_FILE_ACCESS_DENIED = 211,
9498c2ecf20Sopenharmony_ci	/** First DSP code section header not found in DSP file. */
9508c2ecf20Sopenharmony_ci	HPI_ERROR_DSP_FILE_NO_HEADER = 212,
9518c2ecf20Sopenharmony_ci	/* HPI_ERROR_DSP_FILE_READ_ERROR= 213, */
9528c2ecf20Sopenharmony_ci	/** DSP code for adapter family not found. */
9538c2ecf20Sopenharmony_ci	HPI_ERROR_DSP_SECTION_NOT_FOUND = 214,
9548c2ecf20Sopenharmony_ci	/** Other OS specific error opening DSP file. */
9558c2ecf20Sopenharmony_ci	HPI_ERROR_DSP_FILE_OTHER_ERROR = 215,
9568c2ecf20Sopenharmony_ci	/** Sharing violation opening DSP code file. */
9578c2ecf20Sopenharmony_ci	HPI_ERROR_DSP_FILE_SHARING_VIOLATION = 216,
9588c2ecf20Sopenharmony_ci	/** DSP code section header had size == 0. */
9598c2ecf20Sopenharmony_ci	HPI_ERROR_DSP_FILE_NULL_HEADER = 217,
9608c2ecf20Sopenharmony_ci
9618c2ecf20Sopenharmony_ci	/* HPI_ERROR_FLASH = 220, */
9628c2ecf20Sopenharmony_ci
9638c2ecf20Sopenharmony_ci	/** Flash has bad checksum */
9648c2ecf20Sopenharmony_ci	HPI_ERROR_BAD_CHECKSUM = 221,
9658c2ecf20Sopenharmony_ci	HPI_ERROR_BAD_SEQUENCE = 222,
9668c2ecf20Sopenharmony_ci	HPI_ERROR_FLASH_ERASE = 223,
9678c2ecf20Sopenharmony_ci	HPI_ERROR_FLASH_PROGRAM = 224,
9688c2ecf20Sopenharmony_ci	HPI_ERROR_FLASH_VERIFY = 225,
9698c2ecf20Sopenharmony_ci	HPI_ERROR_FLASH_TYPE = 226,
9708c2ecf20Sopenharmony_ci	HPI_ERROR_FLASH_START = 227,
9718c2ecf20Sopenharmony_ci	HPI_ERROR_FLASH_READ = 228,
9728c2ecf20Sopenharmony_ci	HPI_ERROR_FLASH_READ_NO_FILE = 229,
9738c2ecf20Sopenharmony_ci	HPI_ERROR_FLASH_SIZE = 230,
9748c2ecf20Sopenharmony_ci
9758c2ecf20Sopenharmony_ci	/** Reserved for OEMs. */
9768c2ecf20Sopenharmony_ci	HPI_ERROR_RESERVED_1 = 290,
9778c2ecf20Sopenharmony_ci
9788c2ecf20Sopenharmony_ci	/* HPI_ERROR_INVALID_STREAM = 300 use HPI_ERROR_INVALID_OBJ_INDEX */
9798c2ecf20Sopenharmony_ci	/** Invalid compression format. */
9808c2ecf20Sopenharmony_ci	HPI_ERROR_INVALID_FORMAT = 301,
9818c2ecf20Sopenharmony_ci	/** Invalid format samplerate */
9828c2ecf20Sopenharmony_ci	HPI_ERROR_INVALID_SAMPLERATE = 302,
9838c2ecf20Sopenharmony_ci	/** Invalid format number of channels. */
9848c2ecf20Sopenharmony_ci	HPI_ERROR_INVALID_CHANNELS = 303,
9858c2ecf20Sopenharmony_ci	/** Invalid format bitrate. */
9868c2ecf20Sopenharmony_ci	HPI_ERROR_INVALID_BITRATE = 304,
9878c2ecf20Sopenharmony_ci	/** Invalid datasize used for stream read/write. */
9888c2ecf20Sopenharmony_ci	HPI_ERROR_INVALID_DATASIZE = 305,
9898c2ecf20Sopenharmony_ci	/* HPI_ERROR_BUFFER_FULL = 306 use HPI_ERROR_INVALID_DATASIZE */
9908c2ecf20Sopenharmony_ci	/* HPI_ERROR_BUFFER_EMPTY = 307 use HPI_ERROR_INVALID_DATASIZE */
9918c2ecf20Sopenharmony_ci	/** Null data pointer used for stream read/write. */
9928c2ecf20Sopenharmony_ci	HPI_ERROR_INVALID_DATA_POINTER = 308,
9938c2ecf20Sopenharmony_ci	/** Packet ordering error for stream read/write. */
9948c2ecf20Sopenharmony_ci	HPI_ERROR_INVALID_PACKET_ORDER = 309,
9958c2ecf20Sopenharmony_ci
9968c2ecf20Sopenharmony_ci	/** Object can't do requested operation in its current
9978c2ecf20Sopenharmony_ci	    state, eg set format, change rec mux state while recording.*/
9988c2ecf20Sopenharmony_ci	HPI_ERROR_INVALID_OPERATION = 310,
9998c2ecf20Sopenharmony_ci
10008c2ecf20Sopenharmony_ci	/** Where a SRG is shared amongst streams, an incompatible samplerate
10018c2ecf20Sopenharmony_ci	    is one that is different to any currently active stream. */
10028c2ecf20Sopenharmony_ci	HPI_ERROR_INCOMPATIBLE_SAMPLERATE = 311,
10038c2ecf20Sopenharmony_ci	/** Adapter mode is illegal.*/
10048c2ecf20Sopenharmony_ci	HPI_ERROR_BAD_ADAPTER_MODE = 312,
10058c2ecf20Sopenharmony_ci
10068c2ecf20Sopenharmony_ci	/** There have been too many attempts to set the adapter's
10078c2ecf20Sopenharmony_ci	capabilities (using bad keys), the card should be returned
10088c2ecf20Sopenharmony_ci	to ASI if further capabilities updates are required */
10098c2ecf20Sopenharmony_ci	HPI_ERROR_TOO_MANY_CAPABILITY_CHANGE_ATTEMPTS = 313,
10108c2ecf20Sopenharmony_ci	/** Streams on different adapters cannot be grouped. */
10118c2ecf20Sopenharmony_ci	HPI_ERROR_NO_INTERADAPTER_GROUPS = 314,
10128c2ecf20Sopenharmony_ci	/** Streams on different DSPs cannot be grouped. */
10138c2ecf20Sopenharmony_ci	HPI_ERROR_NO_INTERDSP_GROUPS = 315,
10148c2ecf20Sopenharmony_ci	/** Stream wait cancelled before threshold reached. */
10158c2ecf20Sopenharmony_ci	HPI_ERROR_WAIT_CANCELLED = 316,
10168c2ecf20Sopenharmony_ci	/** A character string is invalid. */
10178c2ecf20Sopenharmony_ci	HPI_ERROR_INVALID_STRING = 317,
10188c2ecf20Sopenharmony_ci
10198c2ecf20Sopenharmony_ci	/** Invalid mixer node for this adapter. */
10208c2ecf20Sopenharmony_ci	HPI_ERROR_INVALID_NODE = 400,
10218c2ecf20Sopenharmony_ci	/** Invalid control. */
10228c2ecf20Sopenharmony_ci	HPI_ERROR_INVALID_CONTROL = 401,
10238c2ecf20Sopenharmony_ci	/** Invalid control value was passed. */
10248c2ecf20Sopenharmony_ci	HPI_ERROR_INVALID_CONTROL_VALUE = 402,
10258c2ecf20Sopenharmony_ci	/** Control attribute not supported by this control. */
10268c2ecf20Sopenharmony_ci	HPI_ERROR_INVALID_CONTROL_ATTRIBUTE = 403,
10278c2ecf20Sopenharmony_ci	/** Control is disabled. */
10288c2ecf20Sopenharmony_ci	HPI_ERROR_CONTROL_DISABLED = 404,
10298c2ecf20Sopenharmony_ci	/** I2C transaction failed due to a missing ACK. */
10308c2ecf20Sopenharmony_ci	HPI_ERROR_CONTROL_I2C_MISSING_ACK = 405,
10318c2ecf20Sopenharmony_ci	HPI_ERROR_I2C_MISSING_ACK = 405,
10328c2ecf20Sopenharmony_ci	/** Control is busy, or coming out of
10338c2ecf20Sopenharmony_ci	reset and cannot be accessed at this time. */
10348c2ecf20Sopenharmony_ci	HPI_ERROR_CONTROL_NOT_READY = 407,
10358c2ecf20Sopenharmony_ci
10368c2ecf20Sopenharmony_ci	/** Non volatile memory */
10378c2ecf20Sopenharmony_ci	HPI_ERROR_NVMEM_BUSY = 450,
10388c2ecf20Sopenharmony_ci	HPI_ERROR_NVMEM_FULL = 451,
10398c2ecf20Sopenharmony_ci	HPI_ERROR_NVMEM_FAIL = 452,
10408c2ecf20Sopenharmony_ci
10418c2ecf20Sopenharmony_ci	/** I2C */
10428c2ecf20Sopenharmony_ci	HPI_ERROR_I2C_BAD_ADR = 460,
10438c2ecf20Sopenharmony_ci
10448c2ecf20Sopenharmony_ci	/** Entity type did not match requested type */
10458c2ecf20Sopenharmony_ci	HPI_ERROR_ENTITY_TYPE_MISMATCH = 470,
10468c2ecf20Sopenharmony_ci	/** Entity item count did not match requested count */
10478c2ecf20Sopenharmony_ci	HPI_ERROR_ENTITY_ITEM_COUNT = 471,
10488c2ecf20Sopenharmony_ci	/** Entity type is not one of the valid types */
10498c2ecf20Sopenharmony_ci	HPI_ERROR_ENTITY_TYPE_INVALID = 472,
10508c2ecf20Sopenharmony_ci	/** Entity role is not one of the valid roles */
10518c2ecf20Sopenharmony_ci	HPI_ERROR_ENTITY_ROLE_INVALID = 473,
10528c2ecf20Sopenharmony_ci	/** Entity size doesn't match target size */
10538c2ecf20Sopenharmony_ci	HPI_ERROR_ENTITY_SIZE_MISMATCH = 474,
10548c2ecf20Sopenharmony_ci
10558c2ecf20Sopenharmony_ci	/* AES18 specific errors were 500..507 */
10568c2ecf20Sopenharmony_ci
10578c2ecf20Sopenharmony_ci	/** custom error to use for debugging */
10588c2ecf20Sopenharmony_ci	HPI_ERROR_CUSTOM = 600,
10598c2ecf20Sopenharmony_ci
10608c2ecf20Sopenharmony_ci	/** hpioct32.c can't obtain mutex */
10618c2ecf20Sopenharmony_ci	HPI_ERROR_MUTEX_TIMEOUT = 700,
10628c2ecf20Sopenharmony_ci
10638c2ecf20Sopenharmony_ci	/** Backend errors used to be greater than this.
10648c2ecf20Sopenharmony_ci	    \deprecated Now, all backends return only errors defined here in hpi.h
10658c2ecf20Sopenharmony_ci	*/
10668c2ecf20Sopenharmony_ci	HPI_ERROR_BACKEND_BASE = 900,
10678c2ecf20Sopenharmony_ci
10688c2ecf20Sopenharmony_ci	/** Communication with DSP failed */
10698c2ecf20Sopenharmony_ci	HPI_ERROR_DSP_COMMUNICATION = 900
10708c2ecf20Sopenharmony_ci		/* Note that the dsp communication error is set to this value so that
10718c2ecf20Sopenharmony_ci		   it remains compatible with any software that expects such errors
10728c2ecf20Sopenharmony_ci		   to be backend errors i.e. >= 900.
10738c2ecf20Sopenharmony_ci		   Do not define any new error codes with values > 900.
10748c2ecf20Sopenharmony_ci		 */
10758c2ecf20Sopenharmony_ci};
10768c2ecf20Sopenharmony_ci
10778c2ecf20Sopenharmony_ci/** \defgroup maximums HPI maximum values
10788c2ecf20Sopenharmony_ci\{
10798c2ecf20Sopenharmony_ci*/
10808c2ecf20Sopenharmony_ci/** Maximum number of PCI HPI adapters */
10818c2ecf20Sopenharmony_ci#define HPI_MAX_ADAPTERS                20
10828c2ecf20Sopenharmony_ci/** Maximum number of in or out streams per adapter */
10838c2ecf20Sopenharmony_ci#define HPI_MAX_STREAMS                 16
10848c2ecf20Sopenharmony_ci#define HPI_MAX_CHANNELS                2	/* per stream */
10858c2ecf20Sopenharmony_ci#define HPI_MAX_NODES                   8	/* per mixer ? */
10868c2ecf20Sopenharmony_ci#define HPI_MAX_CONTROLS                4	/* per node ? */
10878c2ecf20Sopenharmony_ci/** maximum number of ancillary bytes per MPEG frame */
10888c2ecf20Sopenharmony_ci#define HPI_MAX_ANC_BYTES_PER_FRAME     (64)
10898c2ecf20Sopenharmony_ci#define HPI_STRING_LEN                  16
10908c2ecf20Sopenharmony_ci
10918c2ecf20Sopenharmony_ci/** Networked adapters have index >= 100 */
10928c2ecf20Sopenharmony_ci#define HPI_MIN_NETWORK_ADAPTER_IDX 100
10938c2ecf20Sopenharmony_ci
10948c2ecf20Sopenharmony_ci/** Velocity units */
10958c2ecf20Sopenharmony_ci#define HPI_OSTREAM_VELOCITY_UNITS      4096
10968c2ecf20Sopenharmony_ci/** OutStream timescale units */
10978c2ecf20Sopenharmony_ci#define HPI_OSTREAM_TIMESCALE_UNITS     10000
10988c2ecf20Sopenharmony_ci/** OutStream timescale passthrough - turns timescaling on in passthough mode */
10998c2ecf20Sopenharmony_ci#define HPI_OSTREAM_TIMESCALE_PASSTHROUGH       99999
11008c2ecf20Sopenharmony_ci
11018c2ecf20Sopenharmony_ci/**\}*/
11028c2ecf20Sopenharmony_ci
11038c2ecf20Sopenharmony_ci/**************/
11048c2ecf20Sopenharmony_ci/* STRUCTURES */
11058c2ecf20Sopenharmony_ci#ifndef DISABLE_PRAGMA_PACK1
11068c2ecf20Sopenharmony_ci#pragma pack(push, 1)
11078c2ecf20Sopenharmony_ci#endif
11088c2ecf20Sopenharmony_ci
11098c2ecf20Sopenharmony_ci/** Structure containing sample format information.
11108c2ecf20Sopenharmony_ci    See also HPI_FormatCreate().
11118c2ecf20Sopenharmony_ci  */
11128c2ecf20Sopenharmony_cistruct hpi_format {
11138c2ecf20Sopenharmony_ci	u32 sample_rate;
11148c2ecf20Sopenharmony_ci				/**< 11025, 32000, 44100 ... */
11158c2ecf20Sopenharmony_ci	u32 bit_rate;		  /**< for MPEG */
11168c2ecf20Sopenharmony_ci	u32 attributes;
11178c2ecf20Sopenharmony_ci				/**< Stereo/JointStereo/Mono */
11188c2ecf20Sopenharmony_ci	u16 mode_legacy;
11198c2ecf20Sopenharmony_ci				/**< Legacy ancillary mode or idle bit  */
11208c2ecf20Sopenharmony_ci	u16 unused;		  /**< Unused */
11218c2ecf20Sopenharmony_ci	u16 channels;	  /**< 1,2..., (or ancillary mode or idle bit */
11228c2ecf20Sopenharmony_ci	u16 format;	  /**< HPI_FORMAT_PCM16, _MPEG etc. see #HPI_FORMATS. */
11238c2ecf20Sopenharmony_ci};
11248c2ecf20Sopenharmony_ci
11258c2ecf20Sopenharmony_cistruct hpi_anc_frame {
11268c2ecf20Sopenharmony_ci	u32 valid_bits_in_this_frame;
11278c2ecf20Sopenharmony_ci	u8 b_data[HPI_MAX_ANC_BYTES_PER_FRAME];
11288c2ecf20Sopenharmony_ci};
11298c2ecf20Sopenharmony_ci
11308c2ecf20Sopenharmony_ci/** An object for containing a single async event.
11318c2ecf20Sopenharmony_ci*/
11328c2ecf20Sopenharmony_cistruct hpi_async_event {
11338c2ecf20Sopenharmony_ci	u16 event_type;	/**< type of event. \sa async_event  */
11348c2ecf20Sopenharmony_ci	u16 sequence; /**< Sequence number, allows lost event detection */
11358c2ecf20Sopenharmony_ci	u32 state; /**< New state */
11368c2ecf20Sopenharmony_ci	u32 h_object; /**< handle to the object returning the event. */
11378c2ecf20Sopenharmony_ci	union {
11388c2ecf20Sopenharmony_ci		struct {
11398c2ecf20Sopenharmony_ci			u16 index; /**< GPIO bit index. */
11408c2ecf20Sopenharmony_ci		} gpio;
11418c2ecf20Sopenharmony_ci		struct {
11428c2ecf20Sopenharmony_ci			u16 node_index;	/**< what node is the control on ? */
11438c2ecf20Sopenharmony_ci			u16 node_type; /**< what type of node is the control on ? */
11448c2ecf20Sopenharmony_ci		} control;
11458c2ecf20Sopenharmony_ci	} u;
11468c2ecf20Sopenharmony_ci};
11478c2ecf20Sopenharmony_ci
11488c2ecf20Sopenharmony_ci#ifndef DISABLE_PRAGMA_PACK1
11498c2ecf20Sopenharmony_ci#pragma pack(pop)
11508c2ecf20Sopenharmony_ci#endif
11518c2ecf20Sopenharmony_ci
11528c2ecf20Sopenharmony_ci/*****************/
11538c2ecf20Sopenharmony_ci/* HPI FUNCTIONS */
11548c2ecf20Sopenharmony_ci/*****************/
11558c2ecf20Sopenharmony_ci
11568c2ecf20Sopenharmony_ci/* Stream */
11578c2ecf20Sopenharmony_ciu16 hpi_stream_estimate_buffer_size(struct hpi_format *pF,
11588c2ecf20Sopenharmony_ci	u32 host_polling_rate_in_milli_seconds, u32 *recommended_buffer_size);
11598c2ecf20Sopenharmony_ci
11608c2ecf20Sopenharmony_ci/*************/
11618c2ecf20Sopenharmony_ci/* SubSystem */
11628c2ecf20Sopenharmony_ci/*************/
11638c2ecf20Sopenharmony_ci
11648c2ecf20Sopenharmony_ciu16 hpi_subsys_get_version_ex(u32 *pversion_ex);
11658c2ecf20Sopenharmony_ci
11668c2ecf20Sopenharmony_ciu16 hpi_subsys_get_num_adapters(int *pn_num_adapters);
11678c2ecf20Sopenharmony_ci
11688c2ecf20Sopenharmony_ciu16 hpi_subsys_get_adapter(int iterator, u32 *padapter_index,
11698c2ecf20Sopenharmony_ci	u16 *pw_adapter_type);
11708c2ecf20Sopenharmony_ci
11718c2ecf20Sopenharmony_ci/***********/
11728c2ecf20Sopenharmony_ci/* Adapter */
11738c2ecf20Sopenharmony_ci/***********/
11748c2ecf20Sopenharmony_ci
11758c2ecf20Sopenharmony_ciu16 hpi_adapter_open(u16 adapter_index);
11768c2ecf20Sopenharmony_ci
11778c2ecf20Sopenharmony_ciu16 hpi_adapter_close(u16 adapter_index);
11788c2ecf20Sopenharmony_ci
11798c2ecf20Sopenharmony_ciu16 hpi_adapter_get_info(u16 adapter_index, u16 *pw_num_outstreams,
11808c2ecf20Sopenharmony_ci	u16 *pw_num_instreams, u16 *pw_version, u32 *pserial_number,
11818c2ecf20Sopenharmony_ci	u16 *pw_adapter_type);
11828c2ecf20Sopenharmony_ci
11838c2ecf20Sopenharmony_ciu16 hpi_adapter_get_module_by_index(u16 adapter_index, u16 module_index,
11848c2ecf20Sopenharmony_ci	u16 *pw_num_outputs, u16 *pw_num_inputs, u16 *pw_version,
11858c2ecf20Sopenharmony_ci	u32 *pserial_number, u16 *pw_module_type, u32 *ph_module);
11868c2ecf20Sopenharmony_ci
11878c2ecf20Sopenharmony_ciu16 hpi_adapter_set_mode(u16 adapter_index, u32 adapter_mode);
11888c2ecf20Sopenharmony_ci
11898c2ecf20Sopenharmony_ciu16 hpi_adapter_set_mode_ex(u16 adapter_index, u32 adapter_mode,
11908c2ecf20Sopenharmony_ci	u16 query_or_set);
11918c2ecf20Sopenharmony_ci
11928c2ecf20Sopenharmony_ciu16 hpi_adapter_get_mode(u16 adapter_index, u32 *padapter_mode);
11938c2ecf20Sopenharmony_ci
11948c2ecf20Sopenharmony_ciu16 hpi_adapter_get_assert2(u16 adapter_index, u16 *p_assert_count,
11958c2ecf20Sopenharmony_ci	char *psz_assert, u32 *p_param1, u32 *p_param2,
11968c2ecf20Sopenharmony_ci	u32 *p_dsp_string_addr, u16 *p_processor_id);
11978c2ecf20Sopenharmony_ci
11988c2ecf20Sopenharmony_ciu16 hpi_adapter_test_assert(u16 adapter_index, u16 assert_id);
11998c2ecf20Sopenharmony_ci
12008c2ecf20Sopenharmony_ciu16 hpi_adapter_enable_capability(u16 adapter_index, u16 capability, u32 key);
12018c2ecf20Sopenharmony_ci
12028c2ecf20Sopenharmony_ciu16 hpi_adapter_self_test(u16 adapter_index);
12038c2ecf20Sopenharmony_ci
12048c2ecf20Sopenharmony_ciu16 hpi_adapter_debug_read(u16 adapter_index, u32 dsp_address, char *p_bytes,
12058c2ecf20Sopenharmony_ci	int *count_bytes);
12068c2ecf20Sopenharmony_ci
12078c2ecf20Sopenharmony_ciu16 hpi_adapter_set_property(u16 adapter_index, u16 property, u16 paramter1,
12088c2ecf20Sopenharmony_ci	u16 paramter2);
12098c2ecf20Sopenharmony_ci
12108c2ecf20Sopenharmony_ciu16 hpi_adapter_get_property(u16 adapter_index, u16 property,
12118c2ecf20Sopenharmony_ci	u16 *pw_paramter1, u16 *pw_paramter2);
12128c2ecf20Sopenharmony_ci
12138c2ecf20Sopenharmony_ciu16 hpi_adapter_enumerate_property(u16 adapter_index, u16 index,
12148c2ecf20Sopenharmony_ci	u16 what_to_enumerate, u16 property_index, u32 *psetting);
12158c2ecf20Sopenharmony_ci/*************/
12168c2ecf20Sopenharmony_ci/* OutStream */
12178c2ecf20Sopenharmony_ci/*************/
12188c2ecf20Sopenharmony_ciu16 hpi_outstream_open(u16 adapter_index, u16 outstream_index,
12198c2ecf20Sopenharmony_ci	u32 *ph_outstream);
12208c2ecf20Sopenharmony_ci
12218c2ecf20Sopenharmony_ciu16 hpi_outstream_close(u32 h_outstream);
12228c2ecf20Sopenharmony_ci
12238c2ecf20Sopenharmony_ciu16 hpi_outstream_get_info_ex(u32 h_outstream, u16 *pw_state,
12248c2ecf20Sopenharmony_ci	u32 *pbuffer_size, u32 *pdata_to_play, u32 *psamples_played,
12258c2ecf20Sopenharmony_ci	u32 *pauxiliary_data_to_play);
12268c2ecf20Sopenharmony_ci
12278c2ecf20Sopenharmony_ciu16 hpi_outstream_write_buf(u32 h_outstream, const u8 *pb_write_buf,
12288c2ecf20Sopenharmony_ci	u32 bytes_to_write, const struct hpi_format *p_format);
12298c2ecf20Sopenharmony_ci
12308c2ecf20Sopenharmony_ciu16 hpi_outstream_start(u32 h_outstream);
12318c2ecf20Sopenharmony_ci
12328c2ecf20Sopenharmony_ciu16 hpi_outstream_wait_start(u32 h_outstream);
12338c2ecf20Sopenharmony_ci
12348c2ecf20Sopenharmony_ciu16 hpi_outstream_stop(u32 h_outstream);
12358c2ecf20Sopenharmony_ci
12368c2ecf20Sopenharmony_ciu16 hpi_outstream_sinegen(u32 h_outstream);
12378c2ecf20Sopenharmony_ci
12388c2ecf20Sopenharmony_ciu16 hpi_outstream_reset(u32 h_outstream);
12398c2ecf20Sopenharmony_ci
12408c2ecf20Sopenharmony_ciu16 hpi_outstream_query_format(u32 h_outstream, struct hpi_format *p_format);
12418c2ecf20Sopenharmony_ci
12428c2ecf20Sopenharmony_ciu16 hpi_outstream_set_format(u32 h_outstream, struct hpi_format *p_format);
12438c2ecf20Sopenharmony_ci
12448c2ecf20Sopenharmony_ciu16 hpi_outstream_set_punch_in_out(u32 h_outstream, u32 punch_in_sample,
12458c2ecf20Sopenharmony_ci	u32 punch_out_sample);
12468c2ecf20Sopenharmony_ci
12478c2ecf20Sopenharmony_ciu16 hpi_outstream_set_velocity(u32 h_outstream, short velocity);
12488c2ecf20Sopenharmony_ci
12498c2ecf20Sopenharmony_ciu16 hpi_outstream_ancillary_reset(u32 h_outstream, u16 mode);
12508c2ecf20Sopenharmony_ci
12518c2ecf20Sopenharmony_ciu16 hpi_outstream_ancillary_get_info(u32 h_outstream, u32 *pframes_available);
12528c2ecf20Sopenharmony_ci
12538c2ecf20Sopenharmony_ciu16 hpi_outstream_ancillary_read(u32 h_outstream,
12548c2ecf20Sopenharmony_ci	struct hpi_anc_frame *p_anc_frame_buffer,
12558c2ecf20Sopenharmony_ci	u32 anc_frame_buffer_size_in_bytes,
12568c2ecf20Sopenharmony_ci	u32 number_of_ancillary_frames_to_read);
12578c2ecf20Sopenharmony_ci
12588c2ecf20Sopenharmony_ciu16 hpi_outstream_set_time_scale(u32 h_outstream, u32 time_scaleX10000);
12598c2ecf20Sopenharmony_ci
12608c2ecf20Sopenharmony_ciu16 hpi_outstream_host_buffer_allocate(u32 h_outstream, u32 size_in_bytes);
12618c2ecf20Sopenharmony_ci
12628c2ecf20Sopenharmony_ciu16 hpi_outstream_host_buffer_free(u32 h_outstream);
12638c2ecf20Sopenharmony_ci
12648c2ecf20Sopenharmony_ciu16 hpi_outstream_group_add(u32 h_outstream, u32 h_stream);
12658c2ecf20Sopenharmony_ci
12668c2ecf20Sopenharmony_ciu16 hpi_outstream_group_get_map(u32 h_outstream, u32 *poutstream_map,
12678c2ecf20Sopenharmony_ci	u32 *pinstream_map);
12688c2ecf20Sopenharmony_ci
12698c2ecf20Sopenharmony_ciu16 hpi_outstream_group_reset(u32 h_outstream);
12708c2ecf20Sopenharmony_ci
12718c2ecf20Sopenharmony_ci/************/
12728c2ecf20Sopenharmony_ci/* InStream */
12738c2ecf20Sopenharmony_ci/************/
12748c2ecf20Sopenharmony_ciu16 hpi_instream_open(u16 adapter_index, u16 instream_index,
12758c2ecf20Sopenharmony_ci	u32 *ph_instream);
12768c2ecf20Sopenharmony_ci
12778c2ecf20Sopenharmony_ciu16 hpi_instream_close(u32 h_instream);
12788c2ecf20Sopenharmony_ci
12798c2ecf20Sopenharmony_ciu16 hpi_instream_query_format(u32 h_instream,
12808c2ecf20Sopenharmony_ci	const struct hpi_format *p_format);
12818c2ecf20Sopenharmony_ci
12828c2ecf20Sopenharmony_ciu16 hpi_instream_set_format(u32 h_instream,
12838c2ecf20Sopenharmony_ci	const struct hpi_format *p_format);
12848c2ecf20Sopenharmony_ci
12858c2ecf20Sopenharmony_ciu16 hpi_instream_read_buf(u32 h_instream, u8 *pb_read_buf, u32 bytes_to_read);
12868c2ecf20Sopenharmony_ci
12878c2ecf20Sopenharmony_ciu16 hpi_instream_start(u32 h_instream);
12888c2ecf20Sopenharmony_ci
12898c2ecf20Sopenharmony_ciu16 hpi_instream_wait_start(u32 h_instream);
12908c2ecf20Sopenharmony_ci
12918c2ecf20Sopenharmony_ciu16 hpi_instream_stop(u32 h_instream);
12928c2ecf20Sopenharmony_ci
12938c2ecf20Sopenharmony_ciu16 hpi_instream_reset(u32 h_instream);
12948c2ecf20Sopenharmony_ci
12958c2ecf20Sopenharmony_ciu16 hpi_instream_get_info_ex(u32 h_instream, u16 *pw_state, u32 *pbuffer_size,
12968c2ecf20Sopenharmony_ci	u32 *pdata_recorded, u32 *psamples_recorded,
12978c2ecf20Sopenharmony_ci	u32 *pauxiliary_data_recorded);
12988c2ecf20Sopenharmony_ci
12998c2ecf20Sopenharmony_ciu16 hpi_instream_ancillary_reset(u32 h_instream, u16 bytes_per_frame,
13008c2ecf20Sopenharmony_ci	u16 mode, u16 alignment, u16 idle_bit);
13018c2ecf20Sopenharmony_ci
13028c2ecf20Sopenharmony_ciu16 hpi_instream_ancillary_get_info(u32 h_instream, u32 *pframe_space);
13038c2ecf20Sopenharmony_ci
13048c2ecf20Sopenharmony_ciu16 hpi_instream_ancillary_write(u32 h_instream,
13058c2ecf20Sopenharmony_ci	const struct hpi_anc_frame *p_anc_frame_buffer,
13068c2ecf20Sopenharmony_ci	u32 anc_frame_buffer_size_in_bytes,
13078c2ecf20Sopenharmony_ci	u32 number_of_ancillary_frames_to_write);
13088c2ecf20Sopenharmony_ci
13098c2ecf20Sopenharmony_ciu16 hpi_instream_host_buffer_allocate(u32 h_instream, u32 size_in_bytes);
13108c2ecf20Sopenharmony_ci
13118c2ecf20Sopenharmony_ciu16 hpi_instream_host_buffer_free(u32 h_instream);
13128c2ecf20Sopenharmony_ci
13138c2ecf20Sopenharmony_ciu16 hpi_instream_group_add(u32 h_instream, u32 h_stream);
13148c2ecf20Sopenharmony_ci
13158c2ecf20Sopenharmony_ciu16 hpi_instream_group_get_map(u32 h_instream, u32 *poutstream_map,
13168c2ecf20Sopenharmony_ci	u32 *pinstream_map);
13178c2ecf20Sopenharmony_ci
13188c2ecf20Sopenharmony_ciu16 hpi_instream_group_reset(u32 h_instream);
13198c2ecf20Sopenharmony_ci
13208c2ecf20Sopenharmony_ci/*********/
13218c2ecf20Sopenharmony_ci/* Mixer */
13228c2ecf20Sopenharmony_ci/*********/
13238c2ecf20Sopenharmony_ciu16 hpi_mixer_open(u16 adapter_index, u32 *ph_mixer);
13248c2ecf20Sopenharmony_ci
13258c2ecf20Sopenharmony_ciu16 hpi_mixer_close(u32 h_mixer);
13268c2ecf20Sopenharmony_ci
13278c2ecf20Sopenharmony_ciu16 hpi_mixer_get_control(u32 h_mixer, u16 src_node_type,
13288c2ecf20Sopenharmony_ci	u16 src_node_type_index, u16 dst_node_type, u16 dst_node_type_index,
13298c2ecf20Sopenharmony_ci	u16 control_type, u32 *ph_control);
13308c2ecf20Sopenharmony_ci
13318c2ecf20Sopenharmony_ciu16 hpi_mixer_get_control_by_index(u32 h_mixer, u16 control_index,
13328c2ecf20Sopenharmony_ci	u16 *pw_src_node_type, u16 *pw_src_node_index, u16 *pw_dst_node_type,
13338c2ecf20Sopenharmony_ci	u16 *pw_dst_node_index, u16 *pw_control_type, u32 *ph_control);
13348c2ecf20Sopenharmony_ci
13358c2ecf20Sopenharmony_ciu16 hpi_mixer_store(u32 h_mixer, enum HPI_MIXER_STORE_COMMAND command,
13368c2ecf20Sopenharmony_ci	u16 index);
13378c2ecf20Sopenharmony_ci/************/
13388c2ecf20Sopenharmony_ci/* Controls */
13398c2ecf20Sopenharmony_ci/************/
13408c2ecf20Sopenharmony_ci/******************/
13418c2ecf20Sopenharmony_ci/* Volume control */
13428c2ecf20Sopenharmony_ci/******************/
13438c2ecf20Sopenharmony_ciu16 hpi_volume_set_gain(u32 h_control, short an_gain0_01dB[HPI_MAX_CHANNELS]
13448c2ecf20Sopenharmony_ci	);
13458c2ecf20Sopenharmony_ci
13468c2ecf20Sopenharmony_ciu16 hpi_volume_get_gain(u32 h_control,
13478c2ecf20Sopenharmony_ci	short an_gain0_01dB_out[HPI_MAX_CHANNELS]
13488c2ecf20Sopenharmony_ci	);
13498c2ecf20Sopenharmony_ci
13508c2ecf20Sopenharmony_ciu16 hpi_volume_set_mute(u32 h_control, u32 mute);
13518c2ecf20Sopenharmony_ci
13528c2ecf20Sopenharmony_ciu16 hpi_volume_get_mute(u32 h_control, u32 *mute);
13538c2ecf20Sopenharmony_ci
13548c2ecf20Sopenharmony_ci#define hpi_volume_get_range hpi_volume_query_range
13558c2ecf20Sopenharmony_ciu16 hpi_volume_query_range(u32 h_control, short *min_gain_01dB,
13568c2ecf20Sopenharmony_ci	short *max_gain_01dB, short *step_gain_01dB);
13578c2ecf20Sopenharmony_ci
13588c2ecf20Sopenharmony_ciu16 hpi_volume_query_channels(const u32 h_control, u32 *p_channels);
13598c2ecf20Sopenharmony_ci
13608c2ecf20Sopenharmony_ciu16 hpi_volume_auto_fade(u32 h_control,
13618c2ecf20Sopenharmony_ci	short an_stop_gain0_01dB[HPI_MAX_CHANNELS], u32 duration_ms);
13628c2ecf20Sopenharmony_ci
13638c2ecf20Sopenharmony_ciu16 hpi_volume_auto_fade_profile(u32 h_control,
13648c2ecf20Sopenharmony_ci	short an_stop_gain0_01dB[HPI_MAX_CHANNELS], u32 duration_ms,
13658c2ecf20Sopenharmony_ci	u16 profile);
13668c2ecf20Sopenharmony_ci
13678c2ecf20Sopenharmony_ciu16 hpi_volume_query_auto_fade_profile(const u32 h_control, const u32 i,
13688c2ecf20Sopenharmony_ci	u16 *profile);
13698c2ecf20Sopenharmony_ci
13708c2ecf20Sopenharmony_ci/*****************/
13718c2ecf20Sopenharmony_ci/* Level control */
13728c2ecf20Sopenharmony_ci/*****************/
13738c2ecf20Sopenharmony_ciu16 hpi_level_query_range(u32 h_control, short *min_gain_01dB,
13748c2ecf20Sopenharmony_ci	short *max_gain_01dB, short *step_gain_01dB);
13758c2ecf20Sopenharmony_ci
13768c2ecf20Sopenharmony_ciu16 hpi_level_set_gain(u32 h_control, short an_gain0_01dB[HPI_MAX_CHANNELS]
13778c2ecf20Sopenharmony_ci	);
13788c2ecf20Sopenharmony_ci
13798c2ecf20Sopenharmony_ciu16 hpi_level_get_gain(u32 h_control,
13808c2ecf20Sopenharmony_ci	short an_gain0_01dB_out[HPI_MAX_CHANNELS]
13818c2ecf20Sopenharmony_ci	);
13828c2ecf20Sopenharmony_ci
13838c2ecf20Sopenharmony_ci/*****************/
13848c2ecf20Sopenharmony_ci/* Meter control */
13858c2ecf20Sopenharmony_ci/*****************/
13868c2ecf20Sopenharmony_ciu16 hpi_meter_query_channels(const u32 h_meter, u32 *p_channels);
13878c2ecf20Sopenharmony_ci
13888c2ecf20Sopenharmony_ciu16 hpi_meter_get_peak(u32 h_control,
13898c2ecf20Sopenharmony_ci	short an_peak0_01dB_out[HPI_MAX_CHANNELS]
13908c2ecf20Sopenharmony_ci	);
13918c2ecf20Sopenharmony_ci
13928c2ecf20Sopenharmony_ciu16 hpi_meter_get_rms(u32 h_control, short an_peak0_01dB_out[HPI_MAX_CHANNELS]
13938c2ecf20Sopenharmony_ci	);
13948c2ecf20Sopenharmony_ci
13958c2ecf20Sopenharmony_ciu16 hpi_meter_set_peak_ballistics(u32 h_control, u16 attack, u16 decay);
13968c2ecf20Sopenharmony_ci
13978c2ecf20Sopenharmony_ciu16 hpi_meter_set_rms_ballistics(u32 h_control, u16 attack, u16 decay);
13988c2ecf20Sopenharmony_ci
13998c2ecf20Sopenharmony_ciu16 hpi_meter_get_peak_ballistics(u32 h_control, u16 *attack, u16 *decay);
14008c2ecf20Sopenharmony_ci
14018c2ecf20Sopenharmony_ciu16 hpi_meter_get_rms_ballistics(u32 h_control, u16 *attack, u16 *decay);
14028c2ecf20Sopenharmony_ci
14038c2ecf20Sopenharmony_ci/************************/
14048c2ecf20Sopenharmony_ci/* ChannelMode control */
14058c2ecf20Sopenharmony_ci/************************/
14068c2ecf20Sopenharmony_ciu16 hpi_channel_mode_query_mode(const u32 h_mode, const u32 index,
14078c2ecf20Sopenharmony_ci	u16 *pw_mode);
14088c2ecf20Sopenharmony_ci
14098c2ecf20Sopenharmony_ciu16 hpi_channel_mode_set(u32 h_control, u16 mode);
14108c2ecf20Sopenharmony_ci
14118c2ecf20Sopenharmony_ciu16 hpi_channel_mode_get(u32 h_control, u16 *mode);
14128c2ecf20Sopenharmony_ci
14138c2ecf20Sopenharmony_ci/*****************/
14148c2ecf20Sopenharmony_ci/* Tuner control */
14158c2ecf20Sopenharmony_ci/*****************/
14168c2ecf20Sopenharmony_ciu16 hpi_tuner_query_band(const u32 h_tuner, const u32 index, u16 *pw_band);
14178c2ecf20Sopenharmony_ci
14188c2ecf20Sopenharmony_ciu16 hpi_tuner_set_band(u32 h_control, u16 band);
14198c2ecf20Sopenharmony_ci
14208c2ecf20Sopenharmony_ciu16 hpi_tuner_get_band(u32 h_control, u16 *pw_band);
14218c2ecf20Sopenharmony_ci
14228c2ecf20Sopenharmony_ciu16 hpi_tuner_query_frequency(const u32 h_tuner, const u32 index,
14238c2ecf20Sopenharmony_ci	const u16 band, u32 *pfreq);
14248c2ecf20Sopenharmony_ci
14258c2ecf20Sopenharmony_ciu16 hpi_tuner_set_frequency(u32 h_control, u32 freq_ink_hz);
14268c2ecf20Sopenharmony_ci
14278c2ecf20Sopenharmony_ciu16 hpi_tuner_get_frequency(u32 h_control, u32 *pw_freq_ink_hz);
14288c2ecf20Sopenharmony_ci
14298c2ecf20Sopenharmony_ciu16 hpi_tuner_get_rf_level(u32 h_control, short *pw_level);
14308c2ecf20Sopenharmony_ci
14318c2ecf20Sopenharmony_ciu16 hpi_tuner_get_raw_rf_level(u32 h_control, short *pw_level);
14328c2ecf20Sopenharmony_ci
14338c2ecf20Sopenharmony_ciu16 hpi_tuner_query_gain(const u32 h_tuner, const u32 index, u16 *pw_gain);
14348c2ecf20Sopenharmony_ci
14358c2ecf20Sopenharmony_ciu16 hpi_tuner_set_gain(u32 h_control, short gain);
14368c2ecf20Sopenharmony_ci
14378c2ecf20Sopenharmony_ciu16 hpi_tuner_get_gain(u32 h_control, short *pn_gain);
14388c2ecf20Sopenharmony_ci
14398c2ecf20Sopenharmony_ciu16 hpi_tuner_get_status(u32 h_control, u16 *pw_status_mask, u16 *pw_status);
14408c2ecf20Sopenharmony_ci
14418c2ecf20Sopenharmony_ciu16 hpi_tuner_set_mode(u32 h_control, u32 mode, u32 value);
14428c2ecf20Sopenharmony_ci
14438c2ecf20Sopenharmony_ciu16 hpi_tuner_get_mode(u32 h_control, u32 mode, u32 *pn_value);
14448c2ecf20Sopenharmony_ci
14458c2ecf20Sopenharmony_ciu16 hpi_tuner_get_rds(u32 h_control, char *p_rds_data);
14468c2ecf20Sopenharmony_ci
14478c2ecf20Sopenharmony_ciu16 hpi_tuner_query_deemphasis(const u32 h_tuner, const u32 index,
14488c2ecf20Sopenharmony_ci	const u16 band, u32 *pdeemphasis);
14498c2ecf20Sopenharmony_ci
14508c2ecf20Sopenharmony_ciu16 hpi_tuner_set_deemphasis(u32 h_control, u32 deemphasis);
14518c2ecf20Sopenharmony_ciu16 hpi_tuner_get_deemphasis(u32 h_control, u32 *pdeemphasis);
14528c2ecf20Sopenharmony_ci
14538c2ecf20Sopenharmony_ciu16 hpi_tuner_query_program(const u32 h_tuner, u32 *pbitmap_program);
14548c2ecf20Sopenharmony_ci
14558c2ecf20Sopenharmony_ciu16 hpi_tuner_set_program(u32 h_control, u32 program);
14568c2ecf20Sopenharmony_ci
14578c2ecf20Sopenharmony_ciu16 hpi_tuner_get_program(u32 h_control, u32 *pprogram);
14588c2ecf20Sopenharmony_ci
14598c2ecf20Sopenharmony_ciu16 hpi_tuner_get_hd_radio_dsp_version(u32 h_control, char *psz_dsp_version,
14608c2ecf20Sopenharmony_ci	const u32 string_size);
14618c2ecf20Sopenharmony_ci
14628c2ecf20Sopenharmony_ciu16 hpi_tuner_get_hd_radio_sdk_version(u32 h_control, char *psz_sdk_version,
14638c2ecf20Sopenharmony_ci	const u32 string_size);
14648c2ecf20Sopenharmony_ci
14658c2ecf20Sopenharmony_ciu16 hpi_tuner_get_hd_radio_signal_quality(u32 h_control, u32 *pquality);
14668c2ecf20Sopenharmony_ci
14678c2ecf20Sopenharmony_ciu16 hpi_tuner_get_hd_radio_signal_blend(u32 h_control, u32 *pblend);
14688c2ecf20Sopenharmony_ci
14698c2ecf20Sopenharmony_ciu16 hpi_tuner_set_hd_radio_signal_blend(u32 h_control, const u32 blend);
14708c2ecf20Sopenharmony_ci
14718c2ecf20Sopenharmony_ci/***************/
14728c2ecf20Sopenharmony_ci/* PAD control */
14738c2ecf20Sopenharmony_ci/***************/
14748c2ecf20Sopenharmony_ci
14758c2ecf20Sopenharmony_ciu16 hpi_pad_get_channel_name(u32 h_control, char *psz_string,
14768c2ecf20Sopenharmony_ci	const u32 string_length);
14778c2ecf20Sopenharmony_ci
14788c2ecf20Sopenharmony_ciu16 hpi_pad_get_artist(u32 h_control, char *psz_string,
14798c2ecf20Sopenharmony_ci	const u32 string_length);
14808c2ecf20Sopenharmony_ci
14818c2ecf20Sopenharmony_ciu16 hpi_pad_get_title(u32 h_control, char *psz_string,
14828c2ecf20Sopenharmony_ci	const u32 string_length);
14838c2ecf20Sopenharmony_ci
14848c2ecf20Sopenharmony_ciu16 hpi_pad_get_comment(u32 h_control, char *psz_string,
14858c2ecf20Sopenharmony_ci	const u32 string_length);
14868c2ecf20Sopenharmony_ci
14878c2ecf20Sopenharmony_ciu16 hpi_pad_get_program_type(u32 h_control, u32 *ppTY);
14888c2ecf20Sopenharmony_ci
14898c2ecf20Sopenharmony_ciu16 hpi_pad_get_rdsPI(u32 h_control, u32 *ppI);
14908c2ecf20Sopenharmony_ci
14918c2ecf20Sopenharmony_ciu16 hpi_pad_get_program_type_string(u32 h_control, const u32 data_type,
14928c2ecf20Sopenharmony_ci	const u32 pTY, char *psz_string, const u32 string_length);
14938c2ecf20Sopenharmony_ci
14948c2ecf20Sopenharmony_ci/****************************/
14958c2ecf20Sopenharmony_ci/* AES/EBU Receiver control */
14968c2ecf20Sopenharmony_ci/****************************/
14978c2ecf20Sopenharmony_ciu16 hpi_aesebu_receiver_query_format(const u32 h_aes_rx, const u32 index,
14988c2ecf20Sopenharmony_ci	u16 *pw_format);
14998c2ecf20Sopenharmony_ci
15008c2ecf20Sopenharmony_ciu16 hpi_aesebu_receiver_set_format(u32 h_control, u16 source);
15018c2ecf20Sopenharmony_ci
15028c2ecf20Sopenharmony_ciu16 hpi_aesebu_receiver_get_format(u32 h_control, u16 *pw_source);
15038c2ecf20Sopenharmony_ci
15048c2ecf20Sopenharmony_ciu16 hpi_aesebu_receiver_get_sample_rate(u32 h_control, u32 *psample_rate);
15058c2ecf20Sopenharmony_ci
15068c2ecf20Sopenharmony_ciu16 hpi_aesebu_receiver_get_user_data(u32 h_control, u16 index, u16 *pw_data);
15078c2ecf20Sopenharmony_ci
15088c2ecf20Sopenharmony_ciu16 hpi_aesebu_receiver_get_channel_status(u32 h_control, u16 index,
15098c2ecf20Sopenharmony_ci	u16 *pw_data);
15108c2ecf20Sopenharmony_ci
15118c2ecf20Sopenharmony_ciu16 hpi_aesebu_receiver_get_error_status(u32 h_control, u16 *pw_error_data);
15128c2ecf20Sopenharmony_ci
15138c2ecf20Sopenharmony_ci/*******************************/
15148c2ecf20Sopenharmony_ci/* AES/EBU Transmitter control */
15158c2ecf20Sopenharmony_ci/*******************************/
15168c2ecf20Sopenharmony_ciu16 hpi_aesebu_transmitter_set_sample_rate(u32 h_control, u32 sample_rate);
15178c2ecf20Sopenharmony_ci
15188c2ecf20Sopenharmony_ciu16 hpi_aesebu_transmitter_set_user_data(u32 h_control, u16 index, u16 data);
15198c2ecf20Sopenharmony_ci
15208c2ecf20Sopenharmony_ciu16 hpi_aesebu_transmitter_set_channel_status(u32 h_control, u16 index,
15218c2ecf20Sopenharmony_ci	u16 data);
15228c2ecf20Sopenharmony_ci
15238c2ecf20Sopenharmony_ciu16 hpi_aesebu_transmitter_get_channel_status(u32 h_control, u16 index,
15248c2ecf20Sopenharmony_ci	u16 *pw_data);
15258c2ecf20Sopenharmony_ci
15268c2ecf20Sopenharmony_ciu16 hpi_aesebu_transmitter_query_format(const u32 h_aes_tx, const u32 index,
15278c2ecf20Sopenharmony_ci	u16 *pw_format);
15288c2ecf20Sopenharmony_ci
15298c2ecf20Sopenharmony_ciu16 hpi_aesebu_transmitter_set_format(u32 h_control, u16 output_format);
15308c2ecf20Sopenharmony_ci
15318c2ecf20Sopenharmony_ciu16 hpi_aesebu_transmitter_get_format(u32 h_control, u16 *pw_output_format);
15328c2ecf20Sopenharmony_ci
15338c2ecf20Sopenharmony_ci/***********************/
15348c2ecf20Sopenharmony_ci/* Multiplexer control */
15358c2ecf20Sopenharmony_ci/***********************/
15368c2ecf20Sopenharmony_ciu16 hpi_multiplexer_set_source(u32 h_control, u16 source_node_type,
15378c2ecf20Sopenharmony_ci	u16 source_node_index);
15388c2ecf20Sopenharmony_ci
15398c2ecf20Sopenharmony_ciu16 hpi_multiplexer_get_source(u32 h_control, u16 *source_node_type,
15408c2ecf20Sopenharmony_ci	u16 *source_node_index);
15418c2ecf20Sopenharmony_ci
15428c2ecf20Sopenharmony_ciu16 hpi_multiplexer_query_source(u32 h_control, u16 index,
15438c2ecf20Sopenharmony_ci	u16 *source_node_type, u16 *source_node_index);
15448c2ecf20Sopenharmony_ci
15458c2ecf20Sopenharmony_ci/***************/
15468c2ecf20Sopenharmony_ci/* Vox control */
15478c2ecf20Sopenharmony_ci/***************/
15488c2ecf20Sopenharmony_ciu16 hpi_vox_set_threshold(u32 h_control, short an_gain0_01dB);
15498c2ecf20Sopenharmony_ci
15508c2ecf20Sopenharmony_ciu16 hpi_vox_get_threshold(u32 h_control, short *an_gain0_01dB);
15518c2ecf20Sopenharmony_ci
15528c2ecf20Sopenharmony_ci/*********************/
15538c2ecf20Sopenharmony_ci/* Bitstream control */
15548c2ecf20Sopenharmony_ci/*********************/
15558c2ecf20Sopenharmony_ciu16 hpi_bitstream_set_clock_edge(u32 h_control, u16 edge_type);
15568c2ecf20Sopenharmony_ci
15578c2ecf20Sopenharmony_ciu16 hpi_bitstream_set_data_polarity(u32 h_control, u16 polarity);
15588c2ecf20Sopenharmony_ci
15598c2ecf20Sopenharmony_ciu16 hpi_bitstream_get_activity(u32 h_control, u16 *pw_clk_activity,
15608c2ecf20Sopenharmony_ci	u16 *pw_data_activity);
15618c2ecf20Sopenharmony_ci
15628c2ecf20Sopenharmony_ci/***********************/
15638c2ecf20Sopenharmony_ci/* SampleClock control */
15648c2ecf20Sopenharmony_ci/***********************/
15658c2ecf20Sopenharmony_ci
15668c2ecf20Sopenharmony_ciu16 hpi_sample_clock_query_source(const u32 h_clock, const u32 index,
15678c2ecf20Sopenharmony_ci	u16 *pw_source);
15688c2ecf20Sopenharmony_ci
15698c2ecf20Sopenharmony_ciu16 hpi_sample_clock_set_source(u32 h_control, u16 source);
15708c2ecf20Sopenharmony_ci
15718c2ecf20Sopenharmony_ciu16 hpi_sample_clock_get_source(u32 h_control, u16 *pw_source);
15728c2ecf20Sopenharmony_ci
15738c2ecf20Sopenharmony_ciu16 hpi_sample_clock_query_source_index(const u32 h_clock, const u32 index,
15748c2ecf20Sopenharmony_ci	const u32 source, u16 *pw_source_index);
15758c2ecf20Sopenharmony_ci
15768c2ecf20Sopenharmony_ciu16 hpi_sample_clock_set_source_index(u32 h_control, u16 source_index);
15778c2ecf20Sopenharmony_ci
15788c2ecf20Sopenharmony_ciu16 hpi_sample_clock_get_source_index(u32 h_control, u16 *pw_source_index);
15798c2ecf20Sopenharmony_ci
15808c2ecf20Sopenharmony_ciu16 hpi_sample_clock_get_sample_rate(u32 h_control, u32 *psample_rate);
15818c2ecf20Sopenharmony_ci
15828c2ecf20Sopenharmony_ciu16 hpi_sample_clock_query_local_rate(const u32 h_clock, const u32 index,
15838c2ecf20Sopenharmony_ci	u32 *psource);
15848c2ecf20Sopenharmony_ci
15858c2ecf20Sopenharmony_ciu16 hpi_sample_clock_set_local_rate(u32 h_control, u32 sample_rate);
15868c2ecf20Sopenharmony_ci
15878c2ecf20Sopenharmony_ciu16 hpi_sample_clock_get_local_rate(u32 h_control, u32 *psample_rate);
15888c2ecf20Sopenharmony_ci
15898c2ecf20Sopenharmony_ciu16 hpi_sample_clock_set_auto(u32 h_control, u32 enable);
15908c2ecf20Sopenharmony_ci
15918c2ecf20Sopenharmony_ciu16 hpi_sample_clock_get_auto(u32 h_control, u32 *penable);
15928c2ecf20Sopenharmony_ci
15938c2ecf20Sopenharmony_ciu16 hpi_sample_clock_set_local_rate_lock(u32 h_control, u32 lock);
15948c2ecf20Sopenharmony_ci
15958c2ecf20Sopenharmony_ciu16 hpi_sample_clock_get_local_rate_lock(u32 h_control, u32 *plock);
15968c2ecf20Sopenharmony_ci
15978c2ecf20Sopenharmony_ci/***********************/
15988c2ecf20Sopenharmony_ci/* Microphone control */
15998c2ecf20Sopenharmony_ci/***********************/
16008c2ecf20Sopenharmony_ciu16 hpi_microphone_set_phantom_power(u32 h_control, u16 on_off);
16018c2ecf20Sopenharmony_ci
16028c2ecf20Sopenharmony_ciu16 hpi_microphone_get_phantom_power(u32 h_control, u16 *pw_on_off);
16038c2ecf20Sopenharmony_ci
16048c2ecf20Sopenharmony_ci/********************************/
16058c2ecf20Sopenharmony_ci/* Parametric Equalizer control */
16068c2ecf20Sopenharmony_ci/********************************/
16078c2ecf20Sopenharmony_ciu16 hpi_parametric_eq_get_info(u32 h_control, u16 *pw_number_of_bands,
16088c2ecf20Sopenharmony_ci	u16 *pw_enabled);
16098c2ecf20Sopenharmony_ci
16108c2ecf20Sopenharmony_ciu16 hpi_parametric_eq_set_state(u32 h_control, u16 on_off);
16118c2ecf20Sopenharmony_ci
16128c2ecf20Sopenharmony_ciu16 hpi_parametric_eq_set_band(u32 h_control, u16 index, u16 type,
16138c2ecf20Sopenharmony_ci	u32 frequency_hz, short q100, short gain0_01dB);
16148c2ecf20Sopenharmony_ci
16158c2ecf20Sopenharmony_ciu16 hpi_parametric_eq_get_band(u32 h_control, u16 index, u16 *pn_type,
16168c2ecf20Sopenharmony_ci	u32 *pfrequency_hz, short *pnQ100, short *pn_gain0_01dB);
16178c2ecf20Sopenharmony_ci
16188c2ecf20Sopenharmony_ciu16 hpi_parametric_eq_get_coeffs(u32 h_control, u16 index, short coeffs[5]
16198c2ecf20Sopenharmony_ci	);
16208c2ecf20Sopenharmony_ci
16218c2ecf20Sopenharmony_ci/*******************************/
16228c2ecf20Sopenharmony_ci/* Compressor Expander control */
16238c2ecf20Sopenharmony_ci/*******************************/
16248c2ecf20Sopenharmony_ci
16258c2ecf20Sopenharmony_ciu16 hpi_compander_set_enable(u32 h_control, u32 on);
16268c2ecf20Sopenharmony_ci
16278c2ecf20Sopenharmony_ciu16 hpi_compander_get_enable(u32 h_control, u32 *pon);
16288c2ecf20Sopenharmony_ci
16298c2ecf20Sopenharmony_ciu16 hpi_compander_set_makeup_gain(u32 h_control, short makeup_gain0_01dB);
16308c2ecf20Sopenharmony_ci
16318c2ecf20Sopenharmony_ciu16 hpi_compander_get_makeup_gain(u32 h_control, short *pn_makeup_gain0_01dB);
16328c2ecf20Sopenharmony_ci
16338c2ecf20Sopenharmony_ciu16 hpi_compander_set_attack_time_constant(u32 h_control, u32 index,
16348c2ecf20Sopenharmony_ci	u32 attack);
16358c2ecf20Sopenharmony_ci
16368c2ecf20Sopenharmony_ciu16 hpi_compander_get_attack_time_constant(u32 h_control, u32 index,
16378c2ecf20Sopenharmony_ci	u32 *pw_attack);
16388c2ecf20Sopenharmony_ci
16398c2ecf20Sopenharmony_ciu16 hpi_compander_set_decay_time_constant(u32 h_control, u32 index,
16408c2ecf20Sopenharmony_ci	u32 decay);
16418c2ecf20Sopenharmony_ci
16428c2ecf20Sopenharmony_ciu16 hpi_compander_get_decay_time_constant(u32 h_control, u32 index,
16438c2ecf20Sopenharmony_ci	u32 *pw_decay);
16448c2ecf20Sopenharmony_ci
16458c2ecf20Sopenharmony_ciu16 hpi_compander_set_threshold(u32 h_control, u32 index,
16468c2ecf20Sopenharmony_ci	short threshold0_01dB);
16478c2ecf20Sopenharmony_ci
16488c2ecf20Sopenharmony_ciu16 hpi_compander_get_threshold(u32 h_control, u32 index,
16498c2ecf20Sopenharmony_ci	short *pn_threshold0_01dB);
16508c2ecf20Sopenharmony_ci
16518c2ecf20Sopenharmony_ciu16 hpi_compander_set_ratio(u32 h_control, u32 index, u32 ratio100);
16528c2ecf20Sopenharmony_ci
16538c2ecf20Sopenharmony_ciu16 hpi_compander_get_ratio(u32 h_control, u32 index, u32 *pw_ratio100);
16548c2ecf20Sopenharmony_ci
16558c2ecf20Sopenharmony_ci/********************/
16568c2ecf20Sopenharmony_ci/* Cobranet control */
16578c2ecf20Sopenharmony_ci/********************/
16588c2ecf20Sopenharmony_ciu16 hpi_cobranet_hmi_write(u32 h_control, u32 hmi_address, u32 byte_count,
16598c2ecf20Sopenharmony_ci	u8 *pb_data);
16608c2ecf20Sopenharmony_ci
16618c2ecf20Sopenharmony_ciu16 hpi_cobranet_hmi_read(u32 h_control, u32 hmi_address, u32 max_byte_count,
16628c2ecf20Sopenharmony_ci	u32 *pbyte_count, u8 *pb_data);
16638c2ecf20Sopenharmony_ci
16648c2ecf20Sopenharmony_ciu16 hpi_cobranet_hmi_get_status(u32 h_control, u32 *pstatus,
16658c2ecf20Sopenharmony_ci	u32 *preadable_size, u32 *pwriteable_size);
16668c2ecf20Sopenharmony_ci
16678c2ecf20Sopenharmony_ciu16 hpi_cobranet_get_ip_address(u32 h_control, u32 *pdw_ip_address);
16688c2ecf20Sopenharmony_ci
16698c2ecf20Sopenharmony_ciu16 hpi_cobranet_set_ip_address(u32 h_control, u32 dw_ip_address);
16708c2ecf20Sopenharmony_ci
16718c2ecf20Sopenharmony_ciu16 hpi_cobranet_get_static_ip_address(u32 h_control, u32 *pdw_ip_address);
16728c2ecf20Sopenharmony_ci
16738c2ecf20Sopenharmony_ciu16 hpi_cobranet_set_static_ip_address(u32 h_control, u32 dw_ip_address);
16748c2ecf20Sopenharmony_ci
16758c2ecf20Sopenharmony_ciu16 hpi_cobranet_get_macaddress(u32 h_control, u32 *p_mac_msbs,
16768c2ecf20Sopenharmony_ci	u32 *p_mac_lsbs);
16778c2ecf20Sopenharmony_ci
16788c2ecf20Sopenharmony_ci/*************************/
16798c2ecf20Sopenharmony_ci/* Tone Detector control */
16808c2ecf20Sopenharmony_ci/*************************/
16818c2ecf20Sopenharmony_ciu16 hpi_tone_detector_get_state(u32 hC, u32 *state);
16828c2ecf20Sopenharmony_ci
16838c2ecf20Sopenharmony_ciu16 hpi_tone_detector_set_enable(u32 hC, u32 enable);
16848c2ecf20Sopenharmony_ci
16858c2ecf20Sopenharmony_ciu16 hpi_tone_detector_get_enable(u32 hC, u32 *enable);
16868c2ecf20Sopenharmony_ci
16878c2ecf20Sopenharmony_ciu16 hpi_tone_detector_set_event_enable(u32 hC, u32 event_enable);
16888c2ecf20Sopenharmony_ci
16898c2ecf20Sopenharmony_ciu16 hpi_tone_detector_get_event_enable(u32 hC, u32 *event_enable);
16908c2ecf20Sopenharmony_ci
16918c2ecf20Sopenharmony_ciu16 hpi_tone_detector_set_threshold(u32 hC, int threshold);
16928c2ecf20Sopenharmony_ci
16938c2ecf20Sopenharmony_ciu16 hpi_tone_detector_get_threshold(u32 hC, int *threshold);
16948c2ecf20Sopenharmony_ci
16958c2ecf20Sopenharmony_ciu16 hpi_tone_detector_get_frequency(u32 hC, u32 index, u32 *frequency);
16968c2ecf20Sopenharmony_ci
16978c2ecf20Sopenharmony_ci/****************************/
16988c2ecf20Sopenharmony_ci/* Silence Detector control */
16998c2ecf20Sopenharmony_ci/****************************/
17008c2ecf20Sopenharmony_ciu16 hpi_silence_detector_get_state(u32 hC, u32 *state);
17018c2ecf20Sopenharmony_ci
17028c2ecf20Sopenharmony_ciu16 hpi_silence_detector_set_enable(u32 hC, u32 enable);
17038c2ecf20Sopenharmony_ci
17048c2ecf20Sopenharmony_ciu16 hpi_silence_detector_get_enable(u32 hC, u32 *enable);
17058c2ecf20Sopenharmony_ci
17068c2ecf20Sopenharmony_ciu16 hpi_silence_detector_set_event_enable(u32 hC, u32 event_enable);
17078c2ecf20Sopenharmony_ci
17088c2ecf20Sopenharmony_ciu16 hpi_silence_detector_get_event_enable(u32 hC, u32 *event_enable);
17098c2ecf20Sopenharmony_ci
17108c2ecf20Sopenharmony_ciu16 hpi_silence_detector_set_delay(u32 hC, u32 delay);
17118c2ecf20Sopenharmony_ci
17128c2ecf20Sopenharmony_ciu16 hpi_silence_detector_get_delay(u32 hC, u32 *delay);
17138c2ecf20Sopenharmony_ci
17148c2ecf20Sopenharmony_ciu16 hpi_silence_detector_set_threshold(u32 hC, int threshold);
17158c2ecf20Sopenharmony_ci
17168c2ecf20Sopenharmony_ciu16 hpi_silence_detector_get_threshold(u32 hC, int *threshold);
17178c2ecf20Sopenharmony_ci/*********************/
17188c2ecf20Sopenharmony_ci/* Utility functions */
17198c2ecf20Sopenharmony_ci/*********************/
17208c2ecf20Sopenharmony_ci
17218c2ecf20Sopenharmony_ciu16 hpi_format_create(struct hpi_format *p_format, u16 channels, u16 format,
17228c2ecf20Sopenharmony_ci	u32 sample_rate, u32 bit_rate, u32 attributes);
17238c2ecf20Sopenharmony_ci
17248c2ecf20Sopenharmony_ci#endif	 /*_HPI_H_ */
1725