Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1 | /****************************************************************************** |
| 2 | |
| 3 | AudioScience HPI driver |
| 4 | Copyright (C) 1997-2010 AudioScience Inc. <support@audioscience.com> |
| 5 | |
| 6 | This program is free software; you can redistribute it and/or modify |
| 7 | it under the terms of version 2 of the GNU General Public License as |
| 8 | published by the Free Software Foundation; |
| 9 | |
| 10 | This program is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | GNU General Public License for more details. |
| 14 | |
| 15 | You should have received a copy of the GNU General Public License |
| 16 | along with this program; if not, write to the Free Software |
| 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 18 | |
| 19 | */ |
| 20 | /** \file hpi.h |
| 21 | |
| 22 | AudioScience Hardware Programming Interface (HPI) |
| 23 | public API definition. |
| 24 | |
| 25 | The HPI is a low-level hardware abstraction layer to all |
| 26 | AudioScience digital audio adapters |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 27 | |
| 28 | (C) Copyright AudioScience Inc. 1998-2010 |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 29 | */ |
| 30 | |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 31 | #ifndef _HPI_H_ |
| 32 | #define _HPI_H_ |
| 33 | /* HPI Version |
| 34 | If HPI_VER_MINOR is odd then its a development release not intended for the |
| 35 | public. If HPI_VER_MINOR is even then is a release version |
| 36 | i.e 3.05.02 is a development version |
| 37 | */ |
| 38 | #define HPI_VERSION_CONSTRUCTOR(maj, min, rel) \ |
| 39 | ((maj << 16) + (min << 8) + rel) |
| 40 | |
| 41 | #define HPI_VER_MAJOR(v) ((int)(v >> 16)) |
| 42 | #define HPI_VER_MINOR(v) ((int)((v >> 8) & 0xFF)) |
| 43 | #define HPI_VER_RELEASE(v) ((int)(v & 0xFF)) |
| 44 | |
| 45 | /* Use single digits for versions less that 10 to avoid octal. */ |
Eliot Blennerhassett | 0a00044 | 2011-02-10 17:26:05 +1300 | [diff] [blame] | 46 | #define HPI_VER HPI_VERSION_CONSTRUCTOR(4L, 5, 19) |
| 47 | #define HPI_VER_STRING "4.05.19" |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 48 | |
| 49 | /* Library version as documented in hpi-api-versions.txt */ |
| 50 | #define HPI_LIB_VER HPI_VERSION_CONSTRUCTOR(9, 0, 0) |
| 51 | |
| 52 | #include <linux/types.h> |
| 53 | #define HPI_EXCLUDE_DEPRECATED |
| 54 | |
| 55 | /******************************************************************************/ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 56 | /******** HPI API DEFINITIONS *****/ |
| 57 | /******************************************************************************/ |
Eliot Blennerhassett | ad210ad | 2011-02-10 17:25:57 +1300 | [diff] [blame] | 58 | |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 59 | /*******************************************/ |
| 60 | /** Audio format types |
| 61 | \ingroup stream |
| 62 | */ |
| 63 | enum HPI_FORMATS { |
| 64 | /** Used internally on adapter. */ |
| 65 | HPI_FORMAT_MIXER_NATIVE = 0, |
| 66 | /** 8-bit unsigned PCM. Windows equivalent is WAVE_FORMAT_PCM. */ |
| 67 | HPI_FORMAT_PCM8_UNSIGNED = 1, |
| 68 | /** 16-bit signed PCM. Windows equivalent is WAVE_FORMAT_PCM. */ |
| 69 | HPI_FORMAT_PCM16_SIGNED = 2, |
| 70 | /** MPEG-1 Layer-1. */ |
| 71 | HPI_FORMAT_MPEG_L1 = 3, |
| 72 | /** MPEG-1 Layer-2. |
| 73 | |
| 74 | Windows equivalent is WAVE_FORMAT_MPEG. |
| 75 | |
| 76 | The following table shows what combinations of mode and bitrate are possible: |
| 77 | |
| 78 | <table border=1 cellspacing=0 cellpadding=5> |
| 79 | <tr> |
| 80 | <td><p><b>Bitrate (kbs)</b></p> |
| 81 | <td><p><b>Mono</b></p> |
| 82 | <td><p><b>Stereo,<br>Joint Stereo or<br>Dual Channel</b></p> |
| 83 | |
| 84 | <tr><td>32<td>X<td>_ |
| 85 | <tr><td>40<td>_<td>_ |
| 86 | <tr><td>48<td>X<td>_ |
| 87 | <tr><td>56<td>X<td>_ |
| 88 | <tr><td>64<td>X<td>X |
| 89 | <tr><td>80<td>X<td>_ |
| 90 | <tr><td>96<td>X<td>X |
| 91 | <tr><td>112<td>X<td>X |
| 92 | <tr><td>128<td>X<td>X |
| 93 | <tr><td>160<td>X<td>X |
| 94 | <tr><td>192<td>X<td>X |
| 95 | <tr><td>224<td>_<td>X |
| 96 | <tr><td>256<td>-<td>X |
| 97 | <tr><td>320<td>-<td>X |
| 98 | <tr><td>384<td>_<td>X |
| 99 | </table> |
| 100 | */ |
| 101 | HPI_FORMAT_MPEG_L2 = 4, |
| 102 | /** MPEG-1 Layer-3. |
| 103 | Windows equivalent is WAVE_FORMAT_MPEG. |
| 104 | |
| 105 | The following table shows what combinations of mode and bitrate are possible: |
| 106 | |
| 107 | <table border=1 cellspacing=0 cellpadding=5> |
| 108 | <tr> |
| 109 | <td><p><b>Bitrate (kbs)</b></p> |
| 110 | <td><p><b>Mono<br>Stereo @ 8,<br>11.025 and<br>12kHz*</b></p> |
| 111 | <td><p><b>Mono<br>Stereo @ 16,<br>22.050 and<br>24kHz*</b></p> |
| 112 | <td><p><b>Mono<br>Stereo @ 32,<br>44.1 and<br>48kHz</b></p> |
| 113 | |
| 114 | <tr><td>16<td>X<td>X<td>_ |
| 115 | <tr><td>24<td>X<td>X<td>_ |
| 116 | <tr><td>32<td>X<td>X<td>X |
| 117 | <tr><td>40<td>X<td>X<td>X |
| 118 | <tr><td>48<td>X<td>X<td>X |
| 119 | <tr><td>56<td>X<td>X<td>X |
| 120 | <tr><td>64<td>X<td>X<td>X |
| 121 | <tr><td>80<td>_<td>X<td>X |
| 122 | <tr><td>96<td>_<td>X<td>X |
| 123 | <tr><td>112<td>_<td>X<td>X |
| 124 | <tr><td>128<td>_<td>X<td>X |
| 125 | <tr><td>144<td>_<td>X<td>_ |
| 126 | <tr><td>160<td>_<td>X<td>X |
| 127 | <tr><td>192<td>_<td>_<td>X |
| 128 | <tr><td>224<td>_<td>_<td>X |
| 129 | <tr><td>256<td>-<td>_<td>X |
| 130 | <tr><td>320<td>-<td>_<td>X |
| 131 | </table> |
| 132 | \b * Available on the ASI6000 series only |
| 133 | */ |
| 134 | HPI_FORMAT_MPEG_L3 = 5, |
| 135 | /** Dolby AC-2. */ |
| 136 | HPI_FORMAT_DOLBY_AC2 = 6, |
| 137 | /** Dolbt AC-3. */ |
| 138 | HPI_FORMAT_DOLBY_AC3 = 7, |
| 139 | /** 16-bit PCM big-endian. */ |
| 140 | HPI_FORMAT_PCM16_BIGENDIAN = 8, |
| 141 | /** TAGIT-1 algorithm - hits. */ |
| 142 | HPI_FORMAT_AA_TAGIT1_HITS = 9, |
| 143 | /** TAGIT-1 algorithm - inserts. */ |
| 144 | HPI_FORMAT_AA_TAGIT1_INSERTS = 10, |
| 145 | /** 32-bit signed PCM. Windows equivalent is WAVE_FORMAT_PCM. |
| 146 | Each sample is a 32bit word. The most significant 24 bits contain a 24-bit |
| 147 | sample and the least significant 8 bits are set to 0. |
| 148 | */ |
| 149 | HPI_FORMAT_PCM32_SIGNED = 11, |
| 150 | /** Raw bitstream - unknown format. */ |
| 151 | HPI_FORMAT_RAW_BITSTREAM = 12, |
| 152 | /** TAGIT-1 algorithm hits - extended. */ |
| 153 | HPI_FORMAT_AA_TAGIT1_HITS_EX1 = 13, |
| 154 | /** 32-bit PCM as an IEEE float. Windows equivalent is WAVE_FORMAT_IEEE_FLOAT. |
| 155 | Each sample is a 32bit word in IEEE754 floating point format. |
| 156 | The range is +1.0 to -1.0, which corresponds to digital fullscale. |
| 157 | */ |
| 158 | HPI_FORMAT_PCM32_FLOAT = 14, |
| 159 | /** 24-bit PCM signed. Windows equivalent is WAVE_FORMAT_PCM. */ |
| 160 | HPI_FORMAT_PCM24_SIGNED = 15, |
| 161 | /** OEM format 1 - private. */ |
| 162 | HPI_FORMAT_OEM1 = 16, |
| 163 | /** OEM format 2 - private. */ |
| 164 | HPI_FORMAT_OEM2 = 17, |
| 165 | /** Undefined format. */ |
| 166 | HPI_FORMAT_UNDEFINED = 0xffff |
| 167 | }; |
| 168 | |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 169 | /*******************************************/ |
| 170 | /** Stream States |
| 171 | \ingroup stream |
| 172 | */ |
| 173 | enum HPI_STREAM_STATES { |
| 174 | /** State stopped - stream is stopped. */ |
| 175 | HPI_STATE_STOPPED = 1, |
| 176 | /** State playing - stream is playing audio. */ |
| 177 | HPI_STATE_PLAYING = 2, |
| 178 | /** State recording - stream is recording. */ |
| 179 | HPI_STATE_RECORDING = 3, |
| 180 | /** State drained - playing stream ran out of data to play. */ |
| 181 | HPI_STATE_DRAINED = 4, |
| 182 | /** State generate sine - to be implemented. */ |
| 183 | HPI_STATE_SINEGEN = 5, |
| 184 | /** State wait - used for inter-card sync to mean waiting for all |
| 185 | cards to be ready. */ |
| 186 | HPI_STATE_WAIT = 6 |
| 187 | }; |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 188 | /*******************************************/ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 189 | /** Source node types |
| 190 | \ingroup mixer |
| 191 | */ |
| 192 | enum HPI_SOURCENODES { |
| 193 | /** This define can be used instead of 0 to indicate |
| 194 | that there is no valid source node. A control that |
| 195 | exists on a destination node can be searched for using a source |
| 196 | node value of either 0, or HPI_SOURCENODE_NONE */ |
| 197 | HPI_SOURCENODE_NONE = 100, |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 198 | /** Out Stream (Play) node. */ |
| 199 | HPI_SOURCENODE_OSTREAM = 101, |
| 200 | /** Line in node - could be analog, AES/EBU or network. */ |
| 201 | HPI_SOURCENODE_LINEIN = 102, |
| 202 | HPI_SOURCENODE_AESEBU_IN = 103, /**< AES/EBU input node. */ |
| 203 | HPI_SOURCENODE_TUNER = 104, /**< tuner node. */ |
| 204 | HPI_SOURCENODE_RF = 105, /**< RF input node. */ |
| 205 | HPI_SOURCENODE_CLOCK_SOURCE = 106, /**< clock source node. */ |
| 206 | HPI_SOURCENODE_RAW_BITSTREAM = 107, /**< raw bitstream node. */ |
| 207 | HPI_SOURCENODE_MICROPHONE = 108, /**< microphone node. */ |
| 208 | /** Cobranet input node - |
| 209 | Audio samples come from the Cobranet network and into the device. */ |
| 210 | HPI_SOURCENODE_COBRANET = 109, |
| 211 | HPI_SOURCENODE_ANALOG = 110, /**< analog input node. */ |
| 212 | HPI_SOURCENODE_ADAPTER = 111, /**< adapter node. */ |
| 213 | /* !!!Update this AND hpidebug.h if you add a new sourcenode type!!! */ |
| 214 | HPI_SOURCENODE_LAST_INDEX = 111 /**< largest ID */ |
| 215 | /* AX6 max sourcenode types = 15 */ |
| 216 | }; |
| 217 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 218 | /*******************************************/ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 219 | /** Destination node types |
| 220 | \ingroup mixer |
| 221 | */ |
| 222 | enum HPI_DESTNODES { |
| 223 | /** This define can be used instead of 0 to indicate |
| 224 | that there is no valid destination node. A control that |
| 225 | exists on a source node can be searched for using a destination |
| 226 | node value of either 0, or HPI_DESTNODE_NONE */ |
| 227 | HPI_DESTNODE_NONE = 200, |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 228 | /** In Stream (Record) node. */ |
| 229 | HPI_DESTNODE_ISTREAM = 201, |
| 230 | HPI_DESTNODE_LINEOUT = 202, /**< line out node. */ |
| 231 | HPI_DESTNODE_AESEBU_OUT = 203, /**< AES/EBU output node. */ |
| 232 | HPI_DESTNODE_RF = 204, /**< RF output node. */ |
| 233 | HPI_DESTNODE_SPEAKER = 205, /**< speaker output node. */ |
| 234 | /** Cobranet output node - |
| 235 | Audio samples from the device are sent out on the Cobranet network.*/ |
| 236 | HPI_DESTNODE_COBRANET = 206, |
| 237 | HPI_DESTNODE_ANALOG = 207, /**< analog output node. */ |
| 238 | |
| 239 | /* !!!Update this AND hpidebug.h if you add a new destnode type!!! */ |
| 240 | HPI_DESTNODE_LAST_INDEX = 207 /**< largest ID */ |
| 241 | /* AX6 max destnode types = 15 */ |
| 242 | }; |
| 243 | |
| 244 | /*******************************************/ |
| 245 | /** Mixer control types |
| 246 | \ingroup mixer |
| 247 | */ |
| 248 | enum HPI_CONTROLS { |
| 249 | HPI_CONTROL_GENERIC = 0, /**< generic control. */ |
| 250 | HPI_CONTROL_CONNECTION = 1, /**< A connection between nodes. */ |
| 251 | HPI_CONTROL_VOLUME = 2, /**< volume control - works in dB_fs. */ |
| 252 | HPI_CONTROL_METER = 3, /**< peak meter control. */ |
| 253 | HPI_CONTROL_MUTE = 4, /*mute control - not used at present. */ |
| 254 | HPI_CONTROL_MULTIPLEXER = 5, /**< multiplexer control. */ |
| 255 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 256 | HPI_CONTROL_AESEBU_TRANSMITTER = 6, /**< AES/EBU transmitter control */ |
Eliot Blennerhassett | ad210ad | 2011-02-10 17:25:57 +1300 | [diff] [blame] | 257 | HPI_CONTROL_AESEBUTX = 6, /* HPI_CONTROL_AESEBU_TRANSMITTER */ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 258 | |
| 259 | HPI_CONTROL_AESEBU_RECEIVER = 7, /**< AES/EBU receiver control. */ |
Eliot Blennerhassett | ad210ad | 2011-02-10 17:25:57 +1300 | [diff] [blame] | 260 | HPI_CONTROL_AESEBURX = 7, /* HPI_CONTROL_AESEBU_RECEIVER */ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 261 | |
| 262 | HPI_CONTROL_LEVEL = 8, /**< level/trim control - works in d_bu. */ |
| 263 | HPI_CONTROL_TUNER = 9, /**< tuner control. */ |
| 264 | /* HPI_CONTROL_ONOFFSWITCH = 10 */ |
| 265 | HPI_CONTROL_VOX = 11, /**< vox control. */ |
| 266 | /* HPI_CONTROL_AES18_TRANSMITTER = 12 */ |
| 267 | /* HPI_CONTROL_AES18_RECEIVER = 13 */ |
| 268 | /* HPI_CONTROL_AES18_BLOCKGENERATOR = 14 */ |
| 269 | HPI_CONTROL_CHANNEL_MODE = 15, /**< channel mode control. */ |
| 270 | |
| 271 | HPI_CONTROL_BITSTREAM = 16, /**< bitstream control. */ |
| 272 | HPI_CONTROL_SAMPLECLOCK = 17, /**< sample clock control. */ |
| 273 | HPI_CONTROL_MICROPHONE = 18, /**< microphone control. */ |
| 274 | HPI_CONTROL_PARAMETRIC_EQ = 19, /**< parametric EQ control. */ |
Eliot Blennerhassett | ad210ad | 2011-02-10 17:25:57 +1300 | [diff] [blame] | 275 | HPI_CONTROL_EQUALIZER = 19, /*HPI_CONTROL_PARAMETRIC_EQ */ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 276 | |
| 277 | HPI_CONTROL_COMPANDER = 20, /**< compander control. */ |
| 278 | HPI_CONTROL_COBRANET = 21, /**< cobranet control. */ |
| 279 | HPI_CONTROL_TONEDETECTOR = 22, /**< tone detector control. */ |
| 280 | HPI_CONTROL_SILENCEDETECTOR = 23, /**< silence detector control. */ |
| 281 | HPI_CONTROL_PAD = 24, /**< tuner PAD control. */ |
| 282 | HPI_CONTROL_SRC = 25, /**< samplerate converter control. */ |
| 283 | HPI_CONTROL_UNIVERSAL = 26, /**< universal control. */ |
| 284 | |
| 285 | /* !!! Update this AND hpidebug.h if you add a new control type!!!*/ |
| 286 | HPI_CONTROL_LAST_INDEX = 26 /**<highest control type ID */ |
| 287 | /* WARNING types 256 or greater impact bit packing in all AX6 DSP code */ |
| 288 | }; |
| 289 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 290 | /*******************************************/ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 291 | /** Adapter properties |
| 292 | These are used in HPI_AdapterSetProperty() and HPI_AdapterGetProperty() |
| 293 | \ingroup adapter |
| 294 | */ |
| 295 | enum HPI_ADAPTER_PROPERTIES { |
| 296 | /** \internal Used in dwProperty field of HPI_AdapterSetProperty() and |
| 297 | HPI_AdapterGetProperty(). This errata applies to all ASI6000 cards with both |
| 298 | analog and digital outputs. The CS4224 A/D+D/A has a one sample delay between |
| 299 | left and right channels on both its input (ADC) and output (DAC). |
| 300 | More details are available in Cirrus Logic errata ER284B2. |
| 301 | PDF available from www.cirrus.com, released by Cirrus in 2001. |
| 302 | */ |
| 303 | HPI_ADAPTER_PROPERTY_ERRATA_1 = 1, |
| 304 | |
| 305 | /** Adapter grouping property |
| 306 | Indicates whether the adapter supports the grouping API (for ASIO and SSX2) |
| 307 | */ |
| 308 | HPI_ADAPTER_PROPERTY_GROUPING = 2, |
| 309 | |
| 310 | /** Driver SSX2 property |
| 311 | Tells the kernel driver to turn on SSX2 stream mapping. |
| 312 | This feature is not used by the DSP. In fact the call is completely processed |
| 313 | by the driver and is not passed on to the DSP at all. |
| 314 | */ |
| 315 | HPI_ADAPTER_PROPERTY_ENABLE_SSX2 = 3, |
| 316 | |
| 317 | /** Adapter SSX2 property |
| 318 | Indicates the state of the adapter's SSX2 setting. This setting is stored in |
| 319 | non-volatile memory on the adapter. A typical call sequence would be to use |
| 320 | HPI_ADAPTER_PROPERTY_SSX2_SETTING to set SSX2 on the adapter and then to reload |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 321 | the driver. The driver would query HPI_ADAPTER_PROPERTY_SSX2_SETTING during |
| 322 | startup and if SSX2 is set, it would then call HPI_ADAPTER_PROPERTY_ENABLE_SSX2 |
| 323 | to enable SSX2 stream mapping within the kernel level of the driver. |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 324 | */ |
| 325 | HPI_ADAPTER_PROPERTY_SSX2_SETTING = 4, |
| 326 | |
| 327 | /** Base number for readonly properties */ |
| 328 | HPI_ADAPTER_PROPERTY_READONLYBASE = 256, |
| 329 | |
| 330 | /** Readonly adapter latency property. |
| 331 | This property returns in the input and output latency in samples. |
| 332 | Property 1 is the estimated input latency |
| 333 | in samples, while Property 2 is that output latency in samples. |
| 334 | */ |
| 335 | HPI_ADAPTER_PROPERTY_LATENCY = 256, |
| 336 | |
| 337 | /** Readonly adapter granularity property. |
| 338 | The granulariy is the smallest size chunk of stereo samples that is processed by |
| 339 | the adapter. |
| 340 | This property returns the record granularity in samples in Property 1. |
| 341 | Property 2 returns the play granularity. |
| 342 | */ |
| 343 | HPI_ADAPTER_PROPERTY_GRANULARITY = 257, |
| 344 | |
| 345 | /** Readonly adapter number of current channels property. |
| 346 | Property 1 is the number of record channels per record device. |
| 347 | Property 2 is the number of play channels per playback device.*/ |
| 348 | HPI_ADAPTER_PROPERTY_CURCHANNELS = 258, |
| 349 | |
| 350 | /** Readonly adapter software version. |
| 351 | The SOFTWARE_VERSION property returns the version of the software running |
| 352 | on the adapter as Major.Minor.Release. |
| 353 | Property 1 contains Major in bits 15..8 and Minor in bits 7..0. |
| 354 | Property 2 contains Release in bits 7..0. */ |
| 355 | HPI_ADAPTER_PROPERTY_SOFTWARE_VERSION = 259, |
| 356 | |
| 357 | /** Readonly adapter MAC address MSBs. |
| 358 | The MAC_ADDRESS_MSB property returns |
| 359 | the most significant 32 bits of the MAC address. |
| 360 | Property 1 contains bits 47..32 of the MAC address. |
| 361 | Property 2 contains bits 31..16 of the MAC address. */ |
| 362 | HPI_ADAPTER_PROPERTY_MAC_ADDRESS_MSB = 260, |
| 363 | |
| 364 | /** Readonly adapter MAC address LSBs |
| 365 | The MAC_ADDRESS_LSB property returns |
| 366 | the least significant 16 bits of the MAC address. |
| 367 | Property 1 contains bits 15..0 of the MAC address. */ |
| 368 | HPI_ADAPTER_PROPERTY_MAC_ADDRESS_LSB = 261, |
| 369 | |
| 370 | /** Readonly extended adapter type number |
| 371 | The EXTENDED_ADAPTER_TYPE property returns the 4 digits of an extended |
| 372 | adapter type, i.e ASI8920-0022, 0022 is the extended type. |
| 373 | The digits are returned as ASCII characters rather than the hex digits that |
| 374 | are returned for the main type |
| 375 | Property 1 returns the 1st two (left most) digits, i.e "00" |
| 376 | in the example above, the upper byte being the left most digit. |
| 377 | Property 2 returns the 2nd two digits, i.e "22" in the example above*/ |
| 378 | HPI_ADAPTER_PROPERTY_EXTENDED_ADAPTER_TYPE = 262, |
| 379 | |
| 380 | /** Readonly debug log buffer information */ |
| 381 | HPI_ADAPTER_PROPERTY_LOGTABLEN = 263, |
| 382 | HPI_ADAPTER_PROPERTY_LOGTABBEG = 264, |
| 383 | |
| 384 | /** Readonly adapter IP address |
| 385 | For 192.168.1.101 |
| 386 | Property 1 returns the 1st two (left most) digits, i.e 192*256 + 168 |
| 387 | in the example above, the upper byte being the left most digit. |
| 388 | Property 2 returns the 2nd two digits, i.e 1*256 + 101 in the example above, */ |
| 389 | HPI_ADAPTER_PROPERTY_IP_ADDRESS = 265, |
| 390 | |
| 391 | /** Readonly adapter buffer processed count. Returns a buffer processed count |
| 392 | that is incremented every time all buffers for all streams are updated. This |
| 393 | is useful for checking completion of all stream operations across the adapter |
| 394 | when using grouped streams. |
| 395 | */ |
| 396 | HPI_ADAPTER_PROPERTY_BUFFER_UPDATE_COUNT = 266, |
| 397 | |
| 398 | /** Readonly mixer and stream intervals |
| 399 | |
| 400 | These intervals are measured in mixer frames. |
| 401 | To convert to time, divide by the adapter samplerate. |
| 402 | |
| 403 | The mixer interval is the number of frames processed in one mixer iteration. |
| 404 | The stream update interval is the interval at which streams check for and |
| 405 | process data, and BBM host buffer counters are updated. |
| 406 | |
| 407 | Property 1 is the mixer interval in mixer frames. |
| 408 | Property 2 is the stream update interval in mixer frames. |
| 409 | */ |
| 410 | HPI_ADAPTER_PROPERTY_INTERVAL = 267, |
| 411 | /** Adapter capabilities 1 |
| 412 | Property 1 - adapter can do multichannel (SSX1) |
| 413 | Property 2 - adapter can do stream grouping (supports SSX2) |
| 414 | */ |
| 415 | HPI_ADAPTER_PROPERTY_CAPS1 = 268, |
| 416 | /** Adapter capabilities 2 |
| 417 | Property 1 - adapter can do samplerate conversion (MRX) |
| 418 | Property 2 - adapter can do timestretch (TSX) |
| 419 | */ |
Eliot Blennerhassett | 168f1b0 | 2010-07-06 08:37:06 +1200 | [diff] [blame] | 420 | HPI_ADAPTER_PROPERTY_CAPS2 = 269, |
| 421 | |
| 422 | /** Readonly adapter sync header connection count. |
| 423 | */ |
| 424 | HPI_ADAPTER_PROPERTY_SYNC_HEADER_CONNECTIONS = 270, |
| 425 | /** Readonly supports SSX2 property. |
| 426 | Indicates the adapter supports SSX2 in some mode setting. The |
| 427 | return value is true (1) or false (0). If the current adapter |
| 428 | mode is MONO SSX2 is disabled, even though this property will |
| 429 | return true. |
| 430 | */ |
| 431 | HPI_ADAPTER_PROPERTY_SUPPORTS_SSX2 = 271 |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 432 | }; |
| 433 | |
| 434 | /** Adapter mode commands |
| 435 | |
Eliot Blennerhassett | 0a00044 | 2011-02-10 17:26:05 +1300 | [diff] [blame] | 436 | Used in wQueryOrSet parameter of HPI_AdapterSetModeEx(). |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 437 | \ingroup adapter |
| 438 | */ |
| 439 | enum HPI_ADAPTER_MODE_CMDS { |
Eliot Blennerhassett | 0a00044 | 2011-02-10 17:26:05 +1300 | [diff] [blame] | 440 | /** Set the mode to the given parameter */ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 441 | HPI_ADAPTER_MODE_SET = 0, |
Eliot Blennerhassett | 0a00044 | 2011-02-10 17:26:05 +1300 | [diff] [blame] | 442 | /** Return 0 or error depending whether mode is valid, |
| 443 | but don't set the mode */ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 444 | HPI_ADAPTER_MODE_QUERY = 1 |
| 445 | }; |
| 446 | |
| 447 | /** Adapter Modes |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 448 | These are used by HPI_AdapterSetModeEx() |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 449 | |
| 450 | \warning - more than 16 possible modes breaks |
| 451 | a bitmask in the Windows WAVE DLL |
| 452 | \ingroup adapter |
| 453 | */ |
| 454 | enum HPI_ADAPTER_MODES { |
| 455 | /** 4 outstream mode. |
| 456 | - ASI6114: 1 instream |
| 457 | - ASI6044: 4 instreams |
| 458 | - ASI6012: 1 instream |
| 459 | - ASI6102: no instreams |
| 460 | - ASI6022, ASI6122: 2 instreams |
| 461 | - ASI5111, ASI5101: 2 instreams |
| 462 | - ASI652x, ASI662x: 2 instreams |
| 463 | - ASI654x, ASI664x: 4 instreams |
| 464 | */ |
| 465 | HPI_ADAPTER_MODE_4OSTREAM = 1, |
| 466 | |
| 467 | /** 6 outstream mode. |
| 468 | - ASI6012: 1 instream, |
| 469 | - ASI6022, ASI6122: 2 instreams |
| 470 | - ASI652x, ASI662x: 4 instreams |
| 471 | */ |
| 472 | HPI_ADAPTER_MODE_6OSTREAM = 2, |
| 473 | |
| 474 | /** 8 outstream mode. |
| 475 | - ASI6114: 8 instreams |
| 476 | - ASI6118: 8 instreams |
| 477 | - ASI6585: 8 instreams |
| 478 | */ |
| 479 | HPI_ADAPTER_MODE_8OSTREAM = 3, |
| 480 | |
| 481 | /** 16 outstream mode. |
| 482 | - ASI6416 16 instreams |
| 483 | - ASI6518, ASI6618 16 instreams |
| 484 | - ASI6118 16 mono out and in streams |
| 485 | */ |
| 486 | HPI_ADAPTER_MODE_16OSTREAM = 4, |
| 487 | |
| 488 | /** one outstream mode. |
| 489 | - ASI5111 1 outstream, 1 instream |
| 490 | */ |
| 491 | HPI_ADAPTER_MODE_1OSTREAM = 5, |
| 492 | |
| 493 | /** ASI504X mode 1. 12 outstream, 4 instream 0 to 48kHz sample rates |
| 494 | (see ASI504X datasheet for more info). |
| 495 | */ |
| 496 | HPI_ADAPTER_MODE_1 = 6, |
| 497 | |
| 498 | /** ASI504X mode 2. 4 outstreams, 4 instreams at 0 to 192kHz sample rates |
| 499 | (see ASI504X datasheet for more info). |
| 500 | */ |
| 501 | HPI_ADAPTER_MODE_2 = 7, |
| 502 | |
| 503 | /** ASI504X mode 3. 4 outstreams, 4 instreams at 0 to 192kHz sample rates |
| 504 | (see ASI504X datasheet for more info). |
| 505 | */ |
| 506 | HPI_ADAPTER_MODE_3 = 8, |
| 507 | |
| 508 | /** ASI504X multichannel mode. |
| 509 | 2 outstreams -> 4 line outs = 1 to 8 channel streams), |
| 510 | 4 lineins -> 1 instream (1 to 8 channel streams) at 0-48kHz. |
| 511 | For more info see the SSX Specification. |
| 512 | */ |
| 513 | HPI_ADAPTER_MODE_MULTICHANNEL = 9, |
| 514 | |
| 515 | /** 12 outstream mode. |
| 516 | - ASI6514, ASI6614: 2 instreams |
| 517 | - ASI6540,ASI6544: 8 instreams |
| 518 | - ASI6640,ASI6644: 8 instreams |
| 519 | */ |
| 520 | HPI_ADAPTER_MODE_12OSTREAM = 10, |
| 521 | |
| 522 | /** 9 outstream mode. |
| 523 | - ASI6044: 8 instreams |
| 524 | */ |
| 525 | HPI_ADAPTER_MODE_9OSTREAM = 11, |
| 526 | |
| 527 | /** mono mode. |
| 528 | - ASI6416: 16 outstreams/instreams |
| 529 | - ASI5402: 2 outstreams/instreams |
| 530 | */ |
| 531 | HPI_ADAPTER_MODE_MONO = 12, |
| 532 | |
| 533 | /** Low latency mode. |
| 534 | - ASI6416/ASI6316: 1 16 channel outstream and instream |
| 535 | */ |
| 536 | HPI_ADAPTER_MODE_LOW_LATENCY = 13 |
| 537 | }; |
| 538 | |
| 539 | /* Note, adapters can have more than one capability - |
| 540 | encoding as bitfield is recommended. */ |
| 541 | #define HPI_CAPABILITY_NONE (0) |
| 542 | #define HPI_CAPABILITY_MPEG_LAYER3 (1) |
| 543 | |
| 544 | /* Set this equal to maximum capability index, |
| 545 | Must not be greater than 32 - see axnvdef.h */ |
| 546 | #define HPI_CAPABILITY_MAX 1 |
| 547 | /* #define HPI_CAPABILITY_AAC 2 */ |
| 548 | |
| 549 | /******************************************* STREAM ATTRIBUTES ****/ |
| 550 | |
| 551 | /** MPEG Ancillary Data modes |
| 552 | |
| 553 | The mode for the ancillary data insertion or extraction to operate in. |
| 554 | \ingroup stream |
| 555 | */ |
| 556 | enum HPI_MPEG_ANC_MODES { |
| 557 | /** the MPEG frames have energy information stored in them (5 bytes per stereo frame, 3 per mono) */ |
| 558 | HPI_MPEG_ANC_HASENERGY = 0, |
| 559 | /** the entire ancillary data field is taken up by data from the Anc data buffer |
| 560 | On encode, the encoder will insert the energy bytes before filling the remainder |
| 561 | of the ancillary data space with data from the ancillary data buffer. |
| 562 | */ |
| 563 | HPI_MPEG_ANC_RAW = 1 |
| 564 | }; |
| 565 | |
| 566 | /** Ancillary Data Alignment |
| 567 | \ingroup instream |
| 568 | */ |
| 569 | enum HPI_ISTREAM_MPEG_ANC_ALIGNS { |
| 570 | /** data is packed against the end of data, then padded to the end of frame */ |
| 571 | HPI_MPEG_ANC_ALIGN_LEFT = 0, |
| 572 | /** data is packed against the end of the frame */ |
| 573 | HPI_MPEG_ANC_ALIGN_RIGHT = 1 |
| 574 | }; |
| 575 | |
| 576 | /** MPEG modes |
| 577 | MPEG modes - can be used optionally for HPI_FormatCreate() |
| 578 | parameter dwAttributes. |
| 579 | |
| 580 | Using any mode setting other than HPI_MPEG_MODE_DEFAULT |
| 581 | with single channel format will return an error. |
| 582 | \ingroup stream |
| 583 | */ |
| 584 | enum HPI_MPEG_MODES { |
| 585 | /** Causes the MPEG-1 Layer II bitstream to be recorded |
| 586 | in single_channel mode when the number of channels is 1 and in stereo when the |
| 587 | number of channels is 2. */ |
| 588 | HPI_MPEG_MODE_DEFAULT = 0, |
| 589 | /** Standard stereo without joint-stereo compression */ |
| 590 | HPI_MPEG_MODE_STEREO = 1, |
| 591 | /** Joint stereo */ |
| 592 | HPI_MPEG_MODE_JOINTSTEREO = 2, |
| 593 | /** Left and Right channels are completely independent */ |
| 594 | HPI_MPEG_MODE_DUALCHANNEL = 3 |
| 595 | }; |
| 596 | /******************************************* MIXER ATTRIBUTES ****/ |
| 597 | |
| 598 | /* \defgroup mixer_flags Mixer flags for HPI_MIXER_GET_CONTROL_MULTIPLE_VALUES |
| 599 | { |
| 600 | */ |
| 601 | #define HPI_MIXER_GET_CONTROL_MULTIPLE_CHANGED (0) |
| 602 | #define HPI_MIXER_GET_CONTROL_MULTIPLE_RESET (1) |
| 603 | /*}*/ |
| 604 | |
| 605 | /** Commands used by HPI_MixerStore() |
| 606 | \ingroup mixer |
| 607 | */ |
| 608 | enum HPI_MIXER_STORE_COMMAND { |
| 609 | /** Save all mixer control settings. */ |
| 610 | HPI_MIXER_STORE_SAVE = 1, |
| 611 | /** Restore all controls from saved. */ |
| 612 | HPI_MIXER_STORE_RESTORE = 2, |
| 613 | /** Delete saved control settings. */ |
| 614 | HPI_MIXER_STORE_DELETE = 3, |
| 615 | /** Enable auto storage of some control settings. */ |
| 616 | HPI_MIXER_STORE_ENABLE = 4, |
| 617 | /** Disable auto storage of some control settings. */ |
| 618 | HPI_MIXER_STORE_DISABLE = 5, |
| 619 | /** Save the attributes of a single control. */ |
| 620 | HPI_MIXER_STORE_SAVE_SINGLE = 6 |
| 621 | }; |
| 622 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 623 | /****************************/ |
| 624 | /* CONTROL ATTRIBUTE VALUES */ |
| 625 | /****************************/ |
| 626 | |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 627 | /** Used by mixer plugin enable functions |
| 628 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 629 | E.g. HPI_ParametricEq_SetState() |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 630 | \ingroup mixer |
| 631 | */ |
| 632 | enum HPI_SWITCH_STATES { |
| 633 | HPI_SWITCH_OFF = 0, /**< turn the mixer plugin on. */ |
| 634 | HPI_SWITCH_ON = 1 /**< turn the mixer plugin off. */ |
| 635 | }; |
| 636 | |
| 637 | /* Volume control special gain values */ |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 638 | |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 639 | /** volumes units are 100ths of a dB |
| 640 | \ingroup volume |
| 641 | */ |
| 642 | #define HPI_UNITS_PER_dB 100 |
| 643 | /** turns volume control OFF or MUTE |
| 644 | \ingroup volume |
| 645 | */ |
| 646 | #define HPI_GAIN_OFF (-100 * HPI_UNITS_PER_dB) |
| 647 | |
| 648 | /** value returned for no signal |
| 649 | \ingroup meter |
| 650 | */ |
| 651 | #define HPI_METER_MINIMUM (-150 * HPI_UNITS_PER_dB) |
| 652 | |
| 653 | /** autofade profiles |
| 654 | \ingroup volume |
| 655 | */ |
| 656 | enum HPI_VOLUME_AUTOFADES { |
| 657 | /** log fade - dB attenuation changes linearly over time */ |
| 658 | HPI_VOLUME_AUTOFADE_LOG = 2, |
| 659 | /** linear fade - amplitude changes linearly */ |
| 660 | HPI_VOLUME_AUTOFADE_LINEAR = 3 |
| 661 | }; |
| 662 | |
| 663 | /** The physical encoding format of the AESEBU I/O. |
| 664 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 665 | Used in HPI_Aesebu_Transmitter_SetFormat(), HPI_Aesebu_Receiver_SetFormat() |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 666 | along with related Get and Query functions |
| 667 | \ingroup aestx |
| 668 | */ |
| 669 | enum HPI_AESEBU_FORMATS { |
| 670 | /** AES/EBU physical format - AES/EBU balanced "professional" */ |
| 671 | HPI_AESEBU_FORMAT_AESEBU = 1, |
| 672 | /** AES/EBU physical format - S/PDIF unbalanced "consumer" */ |
| 673 | HPI_AESEBU_FORMAT_SPDIF = 2 |
| 674 | }; |
| 675 | |
| 676 | /** AES/EBU error status bits |
| 677 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 678 | Returned by HPI_Aesebu_Receiver_GetErrorStatus() |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 679 | \ingroup aesrx |
| 680 | */ |
| 681 | enum HPI_AESEBU_ERRORS { |
| 682 | /** bit0: 1 when PLL is not locked */ |
| 683 | HPI_AESEBU_ERROR_NOT_LOCKED = 0x01, |
| 684 | /** bit1: 1 when signal quality is poor */ |
| 685 | HPI_AESEBU_ERROR_POOR_QUALITY = 0x02, |
| 686 | /** bit2: 1 when there is a parity error */ |
| 687 | HPI_AESEBU_ERROR_PARITY_ERROR = 0x04, |
| 688 | /** bit3: 1 when there is a bi-phase coding violation */ |
| 689 | HPI_AESEBU_ERROR_BIPHASE_VIOLATION = 0x08, |
| 690 | /** bit4: 1 when the validity bit is high */ |
| 691 | HPI_AESEBU_ERROR_VALIDITY = 0x10, |
| 692 | /** bit5: 1 when the CRC error bit is high */ |
| 693 | HPI_AESEBU_ERROR_CRC = 0x20 |
| 694 | }; |
| 695 | |
| 696 | /** \addtogroup pad |
| 697 | \{ |
| 698 | */ |
| 699 | /** The text string containing the station/channel combination. */ |
| 700 | #define HPI_PAD_CHANNEL_NAME_LEN 16 |
| 701 | /** The text string containing the artist. */ |
| 702 | #define HPI_PAD_ARTIST_LEN 64 |
| 703 | /** The text string containing the title. */ |
| 704 | #define HPI_PAD_TITLE_LEN 64 |
| 705 | /** The text string containing the comment. */ |
| 706 | #define HPI_PAD_COMMENT_LEN 256 |
| 707 | /** The PTY when the tuner has not recieved any PTY. */ |
| 708 | #define HPI_PAD_PROGRAM_TYPE_INVALID 0xffff |
| 709 | /** \} */ |
| 710 | |
| 711 | /** Data types for PTY string translation. |
| 712 | \ingroup rds |
| 713 | */ |
| 714 | enum eHPI_RDS_type { |
| 715 | HPI_RDS_DATATYPE_RDS = 0, /**< RDS bitstream.*/ |
| 716 | HPI_RDS_DATATYPE_RBDS = 1 /**< RBDS bitstream.*/ |
| 717 | }; |
| 718 | |
| 719 | /** Tuner bands |
| 720 | |
| 721 | Used for HPI_Tuner_SetBand(),HPI_Tuner_GetBand() |
| 722 | \ingroup tuner |
| 723 | */ |
| 724 | enum HPI_TUNER_BAND { |
| 725 | HPI_TUNER_BAND_AM = 1, /**< AM band */ |
| 726 | HPI_TUNER_BAND_FM = 2, /**< FM band (mono) */ |
| 727 | HPI_TUNER_BAND_TV_NTSC_M = 3, /**< NTSC-M TV band*/ |
| 728 | HPI_TUNER_BAND_TV = 3, /* use TV_NTSC_M */ |
| 729 | HPI_TUNER_BAND_FM_STEREO = 4, /**< FM band (stereo) */ |
| 730 | HPI_TUNER_BAND_AUX = 5, /**< auxiliary input */ |
| 731 | HPI_TUNER_BAND_TV_PAL_BG = 6, /**< PAL-B/G TV band*/ |
| 732 | HPI_TUNER_BAND_TV_PAL_I = 7, /**< PAL-I TV band*/ |
| 733 | HPI_TUNER_BAND_TV_PAL_DK = 8, /**< PAL-D/K TV band*/ |
| 734 | HPI_TUNER_BAND_TV_SECAM_L = 9, /**< SECAM-L TV band*/ |
| 735 | HPI_TUNER_BAND_LAST = 9 /**< the index of the last tuner band. */ |
| 736 | }; |
| 737 | |
| 738 | /** Tuner mode attributes |
| 739 | |
| 740 | Used by HPI_Tuner_SetMode(), HPI_Tuner_GetMode() |
| 741 | \ingroup tuner |
| 742 | |
| 743 | */ |
| 744 | enum HPI_TUNER_MODES { |
| 745 | HPI_TUNER_MODE_RSS = 1, /**< control RSS */ |
| 746 | HPI_TUNER_MODE_RDS = 2 /**< control RBDS/RDS */ |
| 747 | }; |
| 748 | |
| 749 | /** Tuner mode attribute values |
| 750 | |
| 751 | Used by HPI_Tuner_SetMode(), HPI_Tuner_GetMode() |
| 752 | \ingroup tuner |
| 753 | */ |
| 754 | enum HPI_TUNER_MODE_VALUES { |
| 755 | /* RSS attribute values */ |
| 756 | HPI_TUNER_MODE_RSS_DISABLE = 0, /**< RSS disable */ |
| 757 | HPI_TUNER_MODE_RSS_ENABLE = 1, /**< RSS enable */ |
| 758 | |
| 759 | /* RDS mode attributes */ |
| 760 | HPI_TUNER_MODE_RDS_DISABLE = 0, /**< RDS - disabled */ |
| 761 | HPI_TUNER_MODE_RDS_RDS = 1, /**< RDS - RDS mode */ |
| 762 | HPI_TUNER_MODE_RDS_RBDS = 2 /**< RDS - RBDS mode */ |
| 763 | }; |
| 764 | |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 765 | /** Tuner Status Bits |
| 766 | |
| 767 | These bitfield values are returned by a call to HPI_Tuner_GetStatus(). |
| 768 | Multiple fields are returned from a single call. |
| 769 | \ingroup tuner |
| 770 | */ |
| 771 | enum HPI_TUNER_STATUS_BITS { |
| 772 | HPI_TUNER_VIDEO_COLOR_PRESENT = 0x0001, /**< video color is present. */ |
Eliot Blennerhassett | ad210ad | 2011-02-10 17:25:57 +1300 | [diff] [blame] | 773 | HPI_TUNER_VIDEO_IS_60HZ = 0x0020, /**< 60 hz video detected. */ |
| 774 | HPI_TUNER_VIDEO_HORZ_SYNC_MISSING = 0x0040, /**< video HSYNC is missing. */ |
| 775 | HPI_TUNER_VIDEO_STATUS_VALID = 0x0100, /**< video status is valid. */ |
| 776 | HPI_TUNER_DIGITAL = 0x0200, /**< tuner reports digital programming. */ |
| 777 | HPI_TUNER_MULTIPROGRAM = 0x0400, /**< tuner reports multiple programs. */ |
| 778 | HPI_TUNER_PLL_LOCKED = 0x1000, /**< the tuner's PLL is locked. */ |
| 779 | HPI_TUNER_FM_STEREO = 0x2000 /**< tuner reports back FM stereo. */ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 780 | }; |
| 781 | |
| 782 | /** Channel Modes |
| 783 | Used for HPI_ChannelModeSet/Get() |
| 784 | \ingroup channelmode |
| 785 | */ |
| 786 | enum HPI_CHANNEL_MODES { |
| 787 | /** Left channel out = left channel in, Right channel out = right channel in. */ |
| 788 | HPI_CHANNEL_MODE_NORMAL = 1, |
| 789 | /** Left channel out = right channel in, Right channel out = left channel in. */ |
| 790 | HPI_CHANNEL_MODE_SWAP = 2, |
| 791 | /** Left channel out = left channel in, Right channel out = left channel in. */ |
| 792 | HPI_CHANNEL_MODE_LEFT_TO_STEREO = 3, |
| 793 | /** Left channel out = right channel in, Right channel out = right channel in.*/ |
| 794 | HPI_CHANNEL_MODE_RIGHT_TO_STEREO = 4, |
| 795 | /** Left channel out = (left channel in + right channel in)/2, |
| 796 | Right channel out = mute. */ |
| 797 | HPI_CHANNEL_MODE_STEREO_TO_LEFT = 5, |
| 798 | /** Left channel out = mute, |
| 799 | Right channel out = (right channel in + left channel in)/2. */ |
| 800 | HPI_CHANNEL_MODE_STEREO_TO_RIGHT = 6, |
| 801 | HPI_CHANNEL_MODE_LAST = 6 |
| 802 | }; |
| 803 | |
| 804 | /** SampleClock source values |
| 805 | \ingroup sampleclock |
| 806 | */ |
| 807 | enum HPI_SAMPLECLOCK_SOURCES { |
| 808 | /** The sampleclock output is derived from its local samplerate generator. |
| 809 | The local samplerate may be set using HPI_SampleClock_SetLocalRate(). */ |
| 810 | HPI_SAMPLECLOCK_SOURCE_LOCAL = 1, |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 811 | /** The adapter is clocked from a dedicated AES/EBU SampleClock input.*/ |
| 812 | HPI_SAMPLECLOCK_SOURCE_AESEBU_SYNC = 2, |
| 813 | /** From external wordclock connector */ |
| 814 | HPI_SAMPLECLOCK_SOURCE_WORD = 3, |
| 815 | /** Board-to-board header */ |
| 816 | HPI_SAMPLECLOCK_SOURCE_WORD_HEADER = 4, |
| 817 | /** FUTURE - SMPTE clock. */ |
| 818 | HPI_SAMPLECLOCK_SOURCE_SMPTE = 5, |
| 819 | /** One of the aesebu inputs */ |
| 820 | HPI_SAMPLECLOCK_SOURCE_AESEBU_INPUT = 6, |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 821 | /** From a network interface e.g. Cobranet or Livewire at either 48 or 96kHz */ |
| 822 | HPI_SAMPLECLOCK_SOURCE_NETWORK = 8, |
| 823 | /** From previous adjacent module (ASI2416 only)*/ |
| 824 | HPI_SAMPLECLOCK_SOURCE_PREV_MODULE = 10, |
| 825 | /*! Update this if you add a new clock source.*/ |
| 826 | HPI_SAMPLECLOCK_SOURCE_LAST = 10 |
| 827 | }; |
| 828 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 829 | /** Equalizer filter types. Used by HPI_ParametricEq_SetBand() |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 830 | \ingroup parmeq |
| 831 | */ |
| 832 | enum HPI_FILTER_TYPE { |
| 833 | HPI_FILTER_TYPE_BYPASS = 0, /**< filter is turned off */ |
| 834 | |
| 835 | HPI_FILTER_TYPE_LOWSHELF = 1, /**< EQ low shelf */ |
| 836 | HPI_FILTER_TYPE_HIGHSHELF = 2, /**< EQ high shelf */ |
| 837 | HPI_FILTER_TYPE_EQ_BAND = 3, /**< EQ gain */ |
| 838 | |
| 839 | HPI_FILTER_TYPE_LOWPASS = 4, /**< standard low pass */ |
| 840 | HPI_FILTER_TYPE_HIGHPASS = 5, /**< standard high pass */ |
| 841 | HPI_FILTER_TYPE_BANDPASS = 6, /**< standard band pass */ |
| 842 | HPI_FILTER_TYPE_BANDSTOP = 7 /**< standard band stop/notch */ |
| 843 | }; |
| 844 | |
| 845 | /** Async Event sources |
| 846 | \ingroup async |
| 847 | */ |
| 848 | enum ASYNC_EVENT_SOURCES { |
| 849 | HPI_ASYNC_EVENT_GPIO = 1, /**< GPIO event. */ |
| 850 | HPI_ASYNC_EVENT_SILENCE = 2, /**< silence event detected. */ |
| 851 | HPI_ASYNC_EVENT_TONE = 3 /**< tone event detected. */ |
| 852 | }; |
| 853 | /*******************************************/ |
| 854 | /** HPI Error codes |
| 855 | |
| 856 | Almost all HPI functions return an error code |
| 857 | A return value of zero means there was no error. |
| 858 | Otherwise one of these error codes is returned. |
| 859 | Error codes can be converted to a descriptive string using HPI_GetErrorText() |
| 860 | |
| 861 | \note When a new error code is added HPI_GetErrorText() MUST be updated. |
| 862 | \note Codes 1-100 are reserved for driver use |
| 863 | \ingroup utility |
| 864 | */ |
| 865 | enum HPI_ERROR_CODES { |
| 866 | /** Message type does not exist. */ |
| 867 | HPI_ERROR_INVALID_TYPE = 100, |
| 868 | /** Object type does not exist. */ |
| 869 | HPI_ERROR_INVALID_OBJ = 101, |
| 870 | /** Function does not exist. */ |
| 871 | HPI_ERROR_INVALID_FUNC = 102, |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 872 | /** The specified object does not exist. */ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 873 | HPI_ERROR_INVALID_OBJ_INDEX = 103, |
| 874 | /** Trying to access an object that has not been opened yet. */ |
| 875 | HPI_ERROR_OBJ_NOT_OPEN = 104, |
| 876 | /** Trying to open an already open object. */ |
| 877 | HPI_ERROR_OBJ_ALREADY_OPEN = 105, |
| 878 | /** PCI, ISA resource not valid. */ |
| 879 | HPI_ERROR_INVALID_RESOURCE = 106, |
Eliot Blennerhassett | 0a00044 | 2011-02-10 17:26:05 +1300 | [diff] [blame] | 880 | /* HPI_ERROR_SUBSYSFINDADAPTERS_GETINFO= 107 */ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 881 | /** Default response was never updated with actual error code. */ |
| 882 | HPI_ERROR_INVALID_RESPONSE = 108, |
| 883 | /** wSize field of response was not updated, |
| 884 | indicating that the message was not processed. */ |
| 885 | HPI_ERROR_PROCESSING_MESSAGE = 109, |
| 886 | /** The network did not respond in a timely manner. */ |
| 887 | HPI_ERROR_NETWORK_TIMEOUT = 110, |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 888 | /* An HPI handle is invalid (uninitialised?). */ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 889 | HPI_ERROR_INVALID_HANDLE = 111, |
| 890 | /** A function or attribute has not been implemented yet. */ |
| 891 | HPI_ERROR_UNIMPLEMENTED = 112, |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 892 | /** There are too many clients attempting |
| 893 | to access a network resource. */ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 894 | HPI_ERROR_NETWORK_TOO_MANY_CLIENTS = 113, |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 895 | /** Response buffer passed to HPI_Message |
| 896 | was smaller than returned response. |
| 897 | wSpecificError field of hpi response contains the required size. |
| 898 | */ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 899 | HPI_ERROR_RESPONSE_BUFFER_TOO_SMALL = 114, |
| 900 | /** The returned response did not match the sent message */ |
| 901 | HPI_ERROR_RESPONSE_MISMATCH = 115, |
Eliot Blennerhassett | ad210ad | 2011-02-10 17:25:57 +1300 | [diff] [blame] | 902 | /** A control setting that should have been cached was not. */ |
| 903 | HPI_ERROR_CONTROL_CACHING = 116, |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 904 | /** A message buffer in the path to the adapter was smaller |
| 905 | than the message size. |
| 906 | wSpecificError field of hpi response contains the actual size. |
| 907 | */ |
| 908 | HPI_ERROR_MESSAGE_BUFFER_TOO_SMALL = 117, |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 909 | |
Eliot Blennerhassett | 0a00044 | 2011-02-10 17:26:05 +1300 | [diff] [blame] | 910 | /* HPI_ERROR_TOO_MANY_ADAPTERS= 200 */ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 911 | /** Bad adpater. */ |
| 912 | HPI_ERROR_BAD_ADAPTER = 201, |
| 913 | /** Adapter number out of range or not set properly. */ |
| 914 | HPI_ERROR_BAD_ADAPTER_NUMBER = 202, |
| 915 | /** 2 adapters with the same adapter number. */ |
| 916 | HPI_DUPLICATE_ADAPTER_NUMBER = 203, |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 917 | /** DSP code failed to bootload. (unused?) */ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 918 | HPI_ERROR_DSP_BOOTLOAD = 204, |
Eliot Blennerhassett | 0a00044 | 2011-02-10 17:26:05 +1300 | [diff] [blame] | 919 | /** Communication with DSP failed */ |
| 920 | HPI_ERROR_DSP_COMMUNICATION = 205, |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 921 | /** Couldn't find or open the DSP code file. */ |
| 922 | HPI_ERROR_DSP_FILE_NOT_FOUND = 206, |
| 923 | /** Internal DSP hardware error. */ |
| 924 | HPI_ERROR_DSP_HARDWARE = 207, |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 925 | /** Could not allocate memory */ |
| 926 | HPI_ERROR_MEMORY_ALLOC = 208, |
Eliot Blennerhassett | 0a00044 | 2011-02-10 17:26:05 +1300 | [diff] [blame] | 927 | /** Failed to correctly load/config PLD. (unused) */ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 928 | HPI_ERROR_PLD_LOAD = 209, |
| 929 | /** Unexpected end of file, block length too big etc. */ |
| 930 | HPI_ERROR_DSP_FILE_FORMAT = 210, |
| 931 | |
| 932 | /** Found but could not open DSP code file. */ |
| 933 | HPI_ERROR_DSP_FILE_ACCESS_DENIED = 211, |
| 934 | /** First DSP code section header not found in DSP file. */ |
| 935 | HPI_ERROR_DSP_FILE_NO_HEADER = 212, |
Eliot Blennerhassett | 0a00044 | 2011-02-10 17:26:05 +1300 | [diff] [blame] | 936 | /* HPI_ERROR_DSP_FILE_READ_ERROR= 213, */ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 937 | /** DSP code for adapter family not found. */ |
| 938 | HPI_ERROR_DSP_SECTION_NOT_FOUND = 214, |
| 939 | /** Other OS specific error opening DSP file. */ |
| 940 | HPI_ERROR_DSP_FILE_OTHER_ERROR = 215, |
| 941 | /** Sharing violation opening DSP code file. */ |
| 942 | HPI_ERROR_DSP_FILE_SHARING_VIOLATION = 216, |
| 943 | /** DSP code section header had size == 0. */ |
| 944 | HPI_ERROR_DSP_FILE_NULL_HEADER = 217, |
| 945 | |
Eliot Blennerhassett | 0a00044 | 2011-02-10 17:26:05 +1300 | [diff] [blame] | 946 | /* HPI_ERROR_FLASH = 220, */ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 947 | |
| 948 | /** Flash has bad checksum */ |
Eliot Blennerhassett | ad210ad | 2011-02-10 17:25:57 +1300 | [diff] [blame] | 949 | HPI_ERROR_BAD_CHECKSUM = 221, |
| 950 | HPI_ERROR_BAD_SEQUENCE = 222, |
| 951 | HPI_ERROR_FLASH_ERASE = 223, |
| 952 | HPI_ERROR_FLASH_PROGRAM = 224, |
| 953 | HPI_ERROR_FLASH_VERIFY = 225, |
| 954 | HPI_ERROR_FLASH_TYPE = 226, |
| 955 | HPI_ERROR_FLASH_START = 227, |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 956 | |
| 957 | /** Reserved for OEMs. */ |
| 958 | HPI_ERROR_RESERVED_1 = 290, |
| 959 | |
Eliot Blennerhassett | 1d595d2 | 2011-02-10 17:26:08 +1300 | [diff] [blame^] | 960 | /* HPI_ERROR_INVALID_STREAM = 300 use HPI_ERROR_INVALID_OBJ_INDEX */ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 961 | /** Invalid compression format. */ |
| 962 | HPI_ERROR_INVALID_FORMAT = 301, |
| 963 | /** Invalid format samplerate */ |
| 964 | HPI_ERROR_INVALID_SAMPLERATE = 302, |
| 965 | /** Invalid format number of channels. */ |
| 966 | HPI_ERROR_INVALID_CHANNELS = 303, |
| 967 | /** Invalid format bitrate. */ |
| 968 | HPI_ERROR_INVALID_BITRATE = 304, |
| 969 | /** Invalid datasize used for stream read/write. */ |
| 970 | HPI_ERROR_INVALID_DATASIZE = 305, |
Eliot Blennerhassett | 1d595d2 | 2011-02-10 17:26:08 +1300 | [diff] [blame^] | 971 | /* HPI_ERROR_BUFFER_FULL = 306 use HPI_ERROR_INVALID_DATASIZE */ |
| 972 | /* HPI_ERROR_BUFFER_EMPTY = 307 use HPI_ERROR_INVALID_DATASIZE */ |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 973 | /** Null data pointer used for stream read/write. */ |
| 974 | HPI_ERROR_INVALID_DATA_POINTER = 308, |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 975 | /** Packet ordering error for stream read/write. */ |
| 976 | HPI_ERROR_INVALID_PACKET_ORDER = 309, |
| 977 | |
| 978 | /** Object can't do requested operation in its current |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 979 | state, eg set format, change rec mux state while recording.*/ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 980 | HPI_ERROR_INVALID_OPERATION = 310, |
| 981 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 982 | /** Where a SRG is shared amongst streams, an incompatible samplerate |
| 983 | is one that is different to any currently active stream. */ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 984 | HPI_ERROR_INCOMPATIBLE_SAMPLERATE = 311, |
| 985 | /** Adapter mode is illegal.*/ |
| 986 | HPI_ERROR_BAD_ADAPTER_MODE = 312, |
| 987 | |
| 988 | /** There have been too many attempts to set the adapter's |
| 989 | capabilities (using bad keys), the card should be returned |
| 990 | to ASI if further capabilities updates are required */ |
| 991 | HPI_ERROR_TOO_MANY_CAPABILITY_CHANGE_ATTEMPTS = 313, |
| 992 | /** Streams on different adapters cannot be grouped. */ |
| 993 | HPI_ERROR_NO_INTERADAPTER_GROUPS = 314, |
| 994 | /** Streams on different DSPs cannot be grouped. */ |
| 995 | HPI_ERROR_NO_INTERDSP_GROUPS = 315, |
| 996 | |
| 997 | /** Invalid mixer node for this adapter. */ |
| 998 | HPI_ERROR_INVALID_NODE = 400, |
| 999 | /** Invalid control. */ |
| 1000 | HPI_ERROR_INVALID_CONTROL = 401, |
| 1001 | /** Invalid control value was passed. */ |
| 1002 | HPI_ERROR_INVALID_CONTROL_VALUE = 402, |
| 1003 | /** Control attribute not supported by this control. */ |
| 1004 | HPI_ERROR_INVALID_CONTROL_ATTRIBUTE = 403, |
| 1005 | /** Control is disabled. */ |
| 1006 | HPI_ERROR_CONTROL_DISABLED = 404, |
| 1007 | /** I2C transaction failed due to a missing ACK. */ |
| 1008 | HPI_ERROR_CONTROL_I2C_MISSING_ACK = 405, |
Eliot Blennerhassett | 0a00044 | 2011-02-10 17:26:05 +1300 | [diff] [blame] | 1009 | HPI_ERROR_I2C_MISSING_ACK = 405, |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1010 | /** Control is busy, or coming out of |
| 1011 | reset and cannot be accessed at this time. */ |
| 1012 | HPI_ERROR_CONTROL_NOT_READY = 407, |
| 1013 | |
| 1014 | /** Non volatile memory */ |
| 1015 | HPI_ERROR_NVMEM_BUSY = 450, |
| 1016 | HPI_ERROR_NVMEM_FULL = 451, |
| 1017 | HPI_ERROR_NVMEM_FAIL = 452, |
| 1018 | |
| 1019 | /** I2C */ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1020 | HPI_ERROR_I2C_BAD_ADR = 460, |
| 1021 | |
| 1022 | /** Entity errors */ |
| 1023 | HPI_ERROR_ENTITY_TYPE_MISMATCH = 470, |
| 1024 | HPI_ERROR_ENTITY_ITEM_COUNT = 471, |
| 1025 | HPI_ERROR_ENTITY_TYPE_INVALID = 472, |
| 1026 | HPI_ERROR_ENTITY_ROLE_INVALID = 473, |
Eliot Blennerhassett | ad210ad | 2011-02-10 17:25:57 +1300 | [diff] [blame] | 1027 | HPI_ERROR_ENTITY_SIZE_MISMATCH = 474, |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1028 | |
| 1029 | /* AES18 specific errors were 500..507 */ |
| 1030 | |
| 1031 | /** custom error to use for debugging */ |
| 1032 | HPI_ERROR_CUSTOM = 600, |
| 1033 | |
| 1034 | /** hpioct32.c can't obtain mutex */ |
| 1035 | HPI_ERROR_MUTEX_TIMEOUT = 700, |
| 1036 | |
| 1037 | /** errors from HPI backends have values >= this */ |
Eliot Blennerhassett | ad210ad | 2011-02-10 17:25:57 +1300 | [diff] [blame] | 1038 | HPI_ERROR_BACKEND_BASE = 900 |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1039 | }; |
| 1040 | |
| 1041 | /** \defgroup maximums HPI maximum values |
| 1042 | \{ |
| 1043 | */ |
| 1044 | /** Maximum number of adapters per HPI sub-system |
| 1045 | WARNING: modifying this value changes the response structure size.*/ |
| 1046 | #define HPI_MAX_ADAPTERS 20 |
| 1047 | /** Maximum number of in or out streams per adapter */ |
| 1048 | #define HPI_MAX_STREAMS 16 |
| 1049 | #define HPI_MAX_CHANNELS 2 /* per stream */ |
| 1050 | #define HPI_MAX_NODES 8 /* per mixer ? */ |
| 1051 | #define HPI_MAX_CONTROLS 4 /* per node ? */ |
| 1052 | /** maximum number of ancillary bytes per MPEG frame */ |
| 1053 | #define HPI_MAX_ANC_BYTES_PER_FRAME (64) |
| 1054 | #define HPI_STRING_LEN 16 |
| 1055 | |
| 1056 | /** Velocity units */ |
| 1057 | #define HPI_OSTREAM_VELOCITY_UNITS 4096 |
| 1058 | /** OutStream timescale units */ |
| 1059 | #define HPI_OSTREAM_TIMESCALE_UNITS 10000 |
| 1060 | /** OutStream timescale passthrough - turns timescaling on in passthough mode */ |
| 1061 | #define HPI_OSTREAM_TIMESCALE_PASSTHROUGH 99999 |
| 1062 | |
| 1063 | /**\}*/ |
| 1064 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1065 | /**************/ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1066 | /* STRUCTURES */ |
| 1067 | #ifndef DISABLE_PRAGMA_PACK1 |
| 1068 | #pragma pack(push, 1) |
| 1069 | #endif |
| 1070 | |
| 1071 | /** Structure containing sample format information. |
| 1072 | See also HPI_FormatCreate(). |
| 1073 | */ |
| 1074 | struct hpi_format { |
| 1075 | u32 sample_rate; |
| 1076 | /**< 11025, 32000, 44100 ... */ |
| 1077 | u32 bit_rate; /**< for MPEG */ |
| 1078 | u32 attributes; |
| 1079 | /**< Stereo/JointStereo/Mono */ |
| 1080 | u16 mode_legacy; |
| 1081 | /**< Legacy ancillary mode or idle bit */ |
Eliot Blennerhassett | ad210ad | 2011-02-10 17:25:57 +1300 | [diff] [blame] | 1082 | u16 unused; /**< Unused */ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1083 | u16 channels; /**< 1,2..., (or ancillary mode or idle bit */ |
| 1084 | u16 format; /**< HPI_FORMAT_PCM16, _MPEG etc. see #HPI_FORMATS. */ |
| 1085 | }; |
| 1086 | |
| 1087 | struct hpi_anc_frame { |
| 1088 | u32 valid_bits_in_this_frame; |
| 1089 | u8 b_data[HPI_MAX_ANC_BYTES_PER_FRAME]; |
| 1090 | }; |
| 1091 | |
| 1092 | /** An object for containing a single async event. |
| 1093 | */ |
| 1094 | struct hpi_async_event { |
| 1095 | u16 event_type; /**< type of event. \sa async_event */ |
Eliot Blennerhassett | 1d595d2 | 2011-02-10 17:26:08 +1300 | [diff] [blame^] | 1096 | u16 sequence; /**< Sequence number, allows lost event detection */ |
| 1097 | u32 state; /**< New state */ |
| 1098 | u32 h_object; /**< handle to the object returning the event. */ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1099 | union { |
| 1100 | struct { |
| 1101 | u16 index; /**< GPIO bit index. */ |
| 1102 | } gpio; |
| 1103 | struct { |
| 1104 | u16 node_index; /**< what node is the control on ? */ |
Eliot Blennerhassett | 1d595d2 | 2011-02-10 17:26:08 +1300 | [diff] [blame^] | 1105 | u16 node_type; /**< what type of node is the control on ? */ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1106 | } control; |
| 1107 | } u; |
| 1108 | }; |
| 1109 | |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1110 | /* skip host side function declarations for |
| 1111 | DSP compile and documentation extraction */ |
| 1112 | |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1113 | #ifndef DISABLE_PRAGMA_PACK1 |
| 1114 | #pragma pack(pop) |
| 1115 | #endif |
| 1116 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1117 | /*****************/ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1118 | /* HPI FUNCTIONS */ |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1119 | /*****************/ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1120 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1121 | /* Stream */ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1122 | u16 hpi_stream_estimate_buffer_size(struct hpi_format *pF, |
| 1123 | u32 host_polling_rate_in_milli_seconds, u32 *recommended_buffer_size); |
| 1124 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1125 | /*************/ |
| 1126 | /* SubSystem */ |
| 1127 | /*************/ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1128 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1129 | u16 hpi_subsys_get_version_ex(u32 *pversion_ex); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1130 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1131 | u16 hpi_subsys_get_num_adapters(int *pn_num_adapters); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1132 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1133 | u16 hpi_subsys_get_adapter(int iterator, u32 *padapter_index, |
| 1134 | u16 *pw_adapter_type); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1135 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1136 | /***********/ |
| 1137 | /* Adapter */ |
| 1138 | /***********/ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1139 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1140 | u16 hpi_adapter_open(u16 adapter_index); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1141 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1142 | u16 hpi_adapter_close(u16 adapter_index); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1143 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1144 | u16 hpi_adapter_get_info(u16 adapter_index, u16 *pw_num_outstreams, |
| 1145 | u16 *pw_num_instreams, u16 *pw_version, u32 *pserial_number, |
| 1146 | u16 *pw_adapter_type); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1147 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1148 | u16 hpi_adapter_get_module_by_index(u16 adapter_index, u16 module_index, |
| 1149 | u16 *pw_num_outputs, u16 *pw_num_inputs, u16 *pw_version, |
| 1150 | u32 *pserial_number, u16 *pw_module_type, u32 *ph_module); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1151 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1152 | u16 hpi_adapter_set_mode(u16 adapter_index, u32 adapter_mode); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1153 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1154 | u16 hpi_adapter_set_mode_ex(u16 adapter_index, u32 adapter_mode, |
| 1155 | u16 query_or_set); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1156 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1157 | u16 hpi_adapter_get_mode(u16 adapter_index, u32 *padapter_mode); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1158 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1159 | u16 hpi_adapter_get_assert2(u16 adapter_index, u16 *p_assert_count, |
| 1160 | char *psz_assert, u32 *p_param1, u32 *p_param2, |
| 1161 | u32 *p_dsp_string_addr, u16 *p_processor_id); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1162 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1163 | u16 hpi_adapter_test_assert(u16 adapter_index, u16 assert_id); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1164 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1165 | u16 hpi_adapter_enable_capability(u16 adapter_index, u16 capability, u32 key); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1166 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1167 | u16 hpi_adapter_self_test(u16 adapter_index); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1168 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1169 | u16 hpi_adapter_debug_read(u16 adapter_index, u32 dsp_address, char *p_bytes, |
| 1170 | int *count_bytes); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1171 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1172 | u16 hpi_adapter_set_property(u16 adapter_index, u16 property, u16 paramter1, |
| 1173 | u16 paramter2); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1174 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1175 | u16 hpi_adapter_get_property(u16 adapter_index, u16 property, |
| 1176 | u16 *pw_paramter1, u16 *pw_paramter2); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1177 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1178 | u16 hpi_adapter_enumerate_property(u16 adapter_index, u16 index, |
| 1179 | u16 what_to_enumerate, u16 property_index, u32 *psetting); |
| 1180 | /*************/ |
| 1181 | /* OutStream */ |
| 1182 | /*************/ |
| 1183 | u16 hpi_outstream_open(u16 adapter_index, u16 outstream_index, |
| 1184 | u32 *ph_outstream); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1185 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1186 | u16 hpi_outstream_close(u32 h_outstream); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1187 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1188 | u16 hpi_outstream_get_info_ex(u32 h_outstream, u16 *pw_state, |
| 1189 | u32 *pbuffer_size, u32 *pdata_to_play, u32 *psamples_played, |
| 1190 | u32 *pauxiliary_data_to_play); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1191 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1192 | u16 hpi_outstream_write_buf(u32 h_outstream, const u8 *pb_write_buf, |
| 1193 | u32 bytes_to_write, const struct hpi_format *p_format); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1194 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1195 | u16 hpi_outstream_start(u32 h_outstream); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1196 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1197 | u16 hpi_outstream_wait_start(u32 h_outstream); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1198 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1199 | u16 hpi_outstream_stop(u32 h_outstream); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1200 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1201 | u16 hpi_outstream_sinegen(u32 h_outstream); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1202 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1203 | u16 hpi_outstream_reset(u32 h_outstream); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1204 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1205 | u16 hpi_outstream_query_format(u32 h_outstream, struct hpi_format *p_format); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1206 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1207 | u16 hpi_outstream_set_format(u32 h_outstream, struct hpi_format *p_format); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1208 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1209 | u16 hpi_outstream_set_punch_in_out(u32 h_outstream, u32 punch_in_sample, |
| 1210 | u32 punch_out_sample); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1211 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1212 | u16 hpi_outstream_set_velocity(u32 h_outstream, short velocity); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1213 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1214 | u16 hpi_outstream_ancillary_reset(u32 h_outstream, u16 mode); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1215 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1216 | u16 hpi_outstream_ancillary_get_info(u32 h_outstream, u32 *pframes_available); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1217 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1218 | u16 hpi_outstream_ancillary_read(u32 h_outstream, |
| 1219 | struct hpi_anc_frame *p_anc_frame_buffer, |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1220 | u32 anc_frame_buffer_size_in_bytes, |
| 1221 | u32 number_of_ancillary_frames_to_read); |
| 1222 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1223 | u16 hpi_outstream_set_time_scale(u32 h_outstream, u32 time_scaleX10000); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1224 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1225 | u16 hpi_outstream_host_buffer_allocate(u32 h_outstream, u32 size_in_bytes); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1226 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1227 | u16 hpi_outstream_host_buffer_free(u32 h_outstream); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1228 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1229 | u16 hpi_outstream_group_add(u32 h_outstream, u32 h_stream); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1230 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1231 | u16 hpi_outstream_group_get_map(u32 h_outstream, u32 *poutstream_map, |
| 1232 | u32 *pinstream_map); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1233 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1234 | u16 hpi_outstream_group_reset(u32 h_outstream); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1235 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1236 | /************/ |
| 1237 | /* InStream */ |
| 1238 | /************/ |
| 1239 | u16 hpi_instream_open(u16 adapter_index, u16 instream_index, |
| 1240 | u32 *ph_instream); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1241 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1242 | u16 hpi_instream_close(u32 h_instream); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1243 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1244 | u16 hpi_instream_query_format(u32 h_instream, |
| 1245 | const struct hpi_format *p_format); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1246 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1247 | u16 hpi_instream_set_format(u32 h_instream, |
| 1248 | const struct hpi_format *p_format); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1249 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1250 | u16 hpi_instream_read_buf(u32 h_instream, u8 *pb_read_buf, u32 bytes_to_read); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1251 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1252 | u16 hpi_instream_start(u32 h_instream); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1253 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1254 | u16 hpi_instream_wait_start(u32 h_instream); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1255 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1256 | u16 hpi_instream_stop(u32 h_instream); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1257 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1258 | u16 hpi_instream_reset(u32 h_instream); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1259 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1260 | u16 hpi_instream_get_info_ex(u32 h_instream, u16 *pw_state, u32 *pbuffer_size, |
| 1261 | u32 *pdata_recorded, u32 *psamples_recorded, |
| 1262 | u32 *pauxiliary_data_recorded); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1263 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1264 | u16 hpi_instream_ancillary_reset(u32 h_instream, u16 bytes_per_frame, |
| 1265 | u16 mode, u16 alignment, u16 idle_bit); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1266 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1267 | u16 hpi_instream_ancillary_get_info(u32 h_instream, u32 *pframe_space); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1268 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1269 | u16 hpi_instream_ancillary_write(u32 h_instream, |
| 1270 | const struct hpi_anc_frame *p_anc_frame_buffer, |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1271 | u32 anc_frame_buffer_size_in_bytes, |
| 1272 | u32 number_of_ancillary_frames_to_write); |
| 1273 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1274 | u16 hpi_instream_host_buffer_allocate(u32 h_instream, u32 size_in_bytes); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1275 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1276 | u16 hpi_instream_host_buffer_free(u32 h_instream); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1277 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1278 | u16 hpi_instream_group_add(u32 h_instream, u32 h_stream); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1279 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1280 | u16 hpi_instream_group_get_map(u32 h_instream, u32 *poutstream_map, |
| 1281 | u32 *pinstream_map); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1282 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1283 | u16 hpi_instream_group_reset(u32 h_instream); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1284 | |
| 1285 | /*********/ |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1286 | /* Mixer */ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1287 | /*********/ |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1288 | u16 hpi_mixer_open(u16 adapter_index, u32 *ph_mixer); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1289 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1290 | u16 hpi_mixer_close(u32 h_mixer); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1291 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1292 | u16 hpi_mixer_get_control(u32 h_mixer, u16 src_node_type, |
| 1293 | u16 src_node_type_index, u16 dst_node_type, u16 dst_node_type_index, |
| 1294 | u16 control_type, u32 *ph_control); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1295 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1296 | u16 hpi_mixer_get_control_by_index(u32 h_mixer, u16 control_index, |
| 1297 | u16 *pw_src_node_type, u16 *pw_src_node_index, u16 *pw_dst_node_type, |
| 1298 | u16 *pw_dst_node_index, u16 *pw_control_type, u32 *ph_control); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1299 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1300 | u16 hpi_mixer_store(u32 h_mixer, enum HPI_MIXER_STORE_COMMAND command, |
| 1301 | u16 index); |
| 1302 | /************/ |
| 1303 | /* Controls */ |
| 1304 | /************/ |
| 1305 | /******************/ |
| 1306 | /* Volume control */ |
| 1307 | /******************/ |
| 1308 | u16 hpi_volume_set_gain(u32 h_control, short an_gain0_01dB[HPI_MAX_CHANNELS] |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1309 | ); |
| 1310 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1311 | u16 hpi_volume_get_gain(u32 h_control, |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1312 | short an_gain0_01dB_out[HPI_MAX_CHANNELS] |
| 1313 | ); |
| 1314 | |
| 1315 | #define hpi_volume_get_range hpi_volume_query_range |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1316 | u16 hpi_volume_query_range(u32 h_control, short *min_gain_01dB, |
| 1317 | short *max_gain_01dB, short *step_gain_01dB); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1318 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1319 | u16 hpi_volume_query_channels(const u32 h_volume, u32 *p_channels); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1320 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1321 | u16 hpi_volume_auto_fade(u32 h_control, |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1322 | short an_stop_gain0_01dB[HPI_MAX_CHANNELS], u32 duration_ms); |
| 1323 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1324 | u16 hpi_volume_auto_fade_profile(u32 h_control, |
| 1325 | short an_stop_gain0_01dB[HPI_MAX_CHANNELS], u32 duration_ms, |
| 1326 | u16 profile); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1327 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1328 | /*****************/ |
| 1329 | /* Level control */ |
| 1330 | /*****************/ |
| 1331 | u16 hpi_level_query_range(u32 h_control, short *min_gain_01dB, |
| 1332 | short *max_gain_01dB, short *step_gain_01dB); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1333 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1334 | u16 hpi_level_set_gain(u32 h_control, short an_gain0_01dB[HPI_MAX_CHANNELS] |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1335 | ); |
| 1336 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1337 | u16 hpi_level_get_gain(u32 h_control, |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1338 | short an_gain0_01dB_out[HPI_MAX_CHANNELS] |
| 1339 | ); |
| 1340 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1341 | /*****************/ |
| 1342 | /* Meter control */ |
| 1343 | /*****************/ |
| 1344 | u16 hpi_meter_query_channels(const u32 h_meter, u32 *p_channels); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1345 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1346 | u16 hpi_meter_get_peak(u32 h_control, |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1347 | short an_peak0_01dB_out[HPI_MAX_CHANNELS] |
| 1348 | ); |
| 1349 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1350 | u16 hpi_meter_get_rms(u32 h_control, short an_peak0_01dB_out[HPI_MAX_CHANNELS] |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1351 | ); |
| 1352 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1353 | u16 hpi_meter_set_peak_ballistics(u32 h_control, u16 attack, u16 decay); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1354 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1355 | u16 hpi_meter_set_rms_ballistics(u32 h_control, u16 attack, u16 decay); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1356 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1357 | u16 hpi_meter_get_peak_ballistics(u32 h_control, u16 *attack, u16 *decay); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1358 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1359 | u16 hpi_meter_get_rms_ballistics(u32 h_control, u16 *attack, u16 *decay); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1360 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1361 | /************************/ |
| 1362 | /* ChannelMode control */ |
| 1363 | /************************/ |
| 1364 | u16 hpi_channel_mode_query_mode(const u32 h_mode, const u32 index, |
| 1365 | u16 *pw_mode); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1366 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1367 | u16 hpi_channel_mode_set(u32 h_control, u16 mode); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1368 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1369 | u16 hpi_channel_mode_get(u32 h_control, u16 *mode); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1370 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1371 | /*****************/ |
| 1372 | /* Tuner control */ |
| 1373 | /*****************/ |
| 1374 | u16 hpi_tuner_query_band(const u32 h_tuner, const u32 index, u16 *pw_band); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1375 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1376 | u16 hpi_tuner_set_band(u32 h_control, u16 band); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1377 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1378 | u16 hpi_tuner_get_band(u32 h_control, u16 *pw_band); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1379 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1380 | u16 hpi_tuner_query_frequency(const u32 h_tuner, const u32 index, |
| 1381 | const u16 band, u32 *pfreq); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1382 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1383 | u16 hpi_tuner_set_frequency(u32 h_control, u32 freq_ink_hz); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1384 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1385 | u16 hpi_tuner_get_frequency(u32 h_control, u32 *pw_freq_ink_hz); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1386 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1387 | u16 hpi_tuner_get_rf_level(u32 h_control, short *pw_level); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1388 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1389 | u16 hpi_tuner_get_raw_rf_level(u32 h_control, short *pw_level); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1390 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1391 | u16 hpi_tuner_query_gain(const u32 h_tuner, const u32 index, u16 *pw_gain); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1392 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1393 | u16 hpi_tuner_set_gain(u32 h_control, short gain); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1394 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1395 | u16 hpi_tuner_get_gain(u32 h_control, short *pn_gain); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1396 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1397 | u16 hpi_tuner_get_status(u32 h_control, u16 *pw_status_mask, u16 *pw_status); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1398 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1399 | u16 hpi_tuner_set_mode(u32 h_control, u32 mode, u32 value); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1400 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1401 | u16 hpi_tuner_get_mode(u32 h_control, u32 mode, u32 *pn_value); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1402 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1403 | u16 hpi_tuner_get_rds(u32 h_control, char *p_rds_data); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1404 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1405 | u16 hpi_tuner_query_deemphasis(const u32 h_tuner, const u32 index, |
| 1406 | const u16 band, u32 *pdeemphasis); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1407 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1408 | u16 hpi_tuner_set_deemphasis(u32 h_control, u32 deemphasis); |
| 1409 | u16 hpi_tuner_get_deemphasis(u32 h_control, u32 *pdeemphasis); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1410 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1411 | u16 hpi_tuner_query_program(const u32 h_tuner, u32 *pbitmap_program); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1412 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1413 | u16 hpi_tuner_set_program(u32 h_control, u32 program); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1414 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1415 | u16 hpi_tuner_get_program(u32 h_control, u32 *pprogram); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1416 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1417 | u16 hpi_tuner_get_hd_radio_dsp_version(u32 h_control, char *psz_dsp_version, |
| 1418 | const u32 string_size); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1419 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1420 | u16 hpi_tuner_get_hd_radio_sdk_version(u32 h_control, char *psz_sdk_version, |
| 1421 | const u32 string_size); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1422 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1423 | u16 hpi_tuner_get_hd_radio_signal_quality(u32 h_control, u32 *pquality); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1424 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1425 | u16 hpi_tuner_get_hd_radio_signal_blend(u32 h_control, u32 *pblend); |
Eliot Blennerhassett | 5a498ef | 2010-05-27 17:53:52 +1200 | [diff] [blame] | 1426 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1427 | u16 hpi_tuner_set_hd_radio_signal_blend(u32 h_control, const u32 blend); |
Eliot Blennerhassett | 5a498ef | 2010-05-27 17:53:52 +1200 | [diff] [blame] | 1428 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1429 | /***************/ |
| 1430 | /* PAD control */ |
| 1431 | /***************/ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1432 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1433 | u16 hpi_pad_get_channel_name(u32 h_control, char *psz_string, |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1434 | const u32 string_length); |
| 1435 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1436 | u16 hpi_pad_get_artist(u32 h_control, char *psz_string, |
| 1437 | const u32 string_length); |
| 1438 | |
| 1439 | u16 hpi_pad_get_title(u32 h_control, char *psz_string, |
| 1440 | const u32 string_length); |
| 1441 | |
| 1442 | u16 hpi_pad_get_comment(u32 h_control, char *psz_string, |
| 1443 | const u32 string_length); |
| 1444 | |
| 1445 | u16 hpi_pad_get_program_type(u32 h_control, u32 *ppTY); |
| 1446 | |
| 1447 | u16 hpi_pad_get_rdsPI(u32 h_control, u32 *ppI); |
| 1448 | |
| 1449 | u16 hpi_pad_get_program_type_string(u32 h_control, const u32 data_type, |
| 1450 | const u32 pTY, char *psz_string, const u32 string_length); |
| 1451 | |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1452 | /****************************/ |
| 1453 | /* AES/EBU Receiver control */ |
| 1454 | /****************************/ |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1455 | u16 hpi_aesebu_receiver_query_format(const u32 h_aes_rx, const u32 index, |
| 1456 | u16 *pw_format); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1457 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1458 | u16 hpi_aesebu_receiver_set_format(u32 h_control, u16 source); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1459 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1460 | u16 hpi_aesebu_receiver_get_format(u32 h_control, u16 *pw_source); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1461 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1462 | u16 hpi_aesebu_receiver_get_sample_rate(u32 h_control, u32 *psample_rate); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1463 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1464 | u16 hpi_aesebu_receiver_get_user_data(u32 h_control, u16 index, u16 *pw_data); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1465 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1466 | u16 hpi_aesebu_receiver_get_channel_status(u32 h_control, u16 index, |
| 1467 | u16 *pw_data); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1468 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1469 | u16 hpi_aesebu_receiver_get_error_status(u32 h_control, u16 *pw_error_data); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1470 | |
| 1471 | /*******************************/ |
| 1472 | /* AES/EBU Transmitter control */ |
| 1473 | /*******************************/ |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1474 | u16 hpi_aesebu_transmitter_set_sample_rate(u32 h_control, u32 sample_rate); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1475 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1476 | u16 hpi_aesebu_transmitter_set_user_data(u32 h_control, u16 index, u16 data); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1477 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1478 | u16 hpi_aesebu_transmitter_set_channel_status(u32 h_control, u16 index, |
| 1479 | u16 data); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1480 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1481 | u16 hpi_aesebu_transmitter_get_channel_status(u32 h_control, u16 index, |
| 1482 | u16 *pw_data); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1483 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1484 | u16 hpi_aesebu_transmitter_query_format(const u32 h_aes_tx, const u32 index, |
| 1485 | u16 *pw_format); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1486 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1487 | u16 hpi_aesebu_transmitter_set_format(u32 h_control, u16 output_format); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1488 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1489 | u16 hpi_aesebu_transmitter_get_format(u32 h_control, u16 *pw_output_format); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1490 | |
| 1491 | /***********************/ |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1492 | /* Multiplexer control */ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1493 | /***********************/ |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1494 | u16 hpi_multiplexer_set_source(u32 h_control, u16 source_node_type, |
| 1495 | u16 source_node_index); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1496 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1497 | u16 hpi_multiplexer_get_source(u32 h_control, u16 *source_node_type, |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1498 | u16 *source_node_index); |
| 1499 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1500 | u16 hpi_multiplexer_query_source(u32 h_control, u16 index, |
| 1501 | u16 *source_node_type, u16 *source_node_index); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1502 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1503 | /***************/ |
| 1504 | /* Vox control */ |
| 1505 | /***************/ |
| 1506 | u16 hpi_vox_set_threshold(u32 h_control, short an_gain0_01dB); |
| 1507 | |
| 1508 | u16 hpi_vox_get_threshold(u32 h_control, short *an_gain0_01dB); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1509 | |
| 1510 | /*********************/ |
| 1511 | /* Bitstream control */ |
| 1512 | /*********************/ |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1513 | u16 hpi_bitstream_set_clock_edge(u32 h_control, u16 edge_type); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1514 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1515 | u16 hpi_bitstream_set_data_polarity(u32 h_control, u16 polarity); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1516 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1517 | u16 hpi_bitstream_get_activity(u32 h_control, u16 *pw_clk_activity, |
| 1518 | u16 *pw_data_activity); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1519 | |
| 1520 | /***********************/ |
| 1521 | /* SampleClock control */ |
| 1522 | /***********************/ |
| 1523 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1524 | u16 hpi_sample_clock_query_source(const u32 h_clock, const u32 index, |
| 1525 | u16 *pw_source); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1526 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1527 | u16 hpi_sample_clock_set_source(u32 h_control, u16 source); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1528 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1529 | u16 hpi_sample_clock_get_source(u32 h_control, u16 *pw_source); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1530 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1531 | u16 hpi_sample_clock_query_source_index(const u32 h_clock, const u32 index, |
| 1532 | const u32 source, u16 *pw_source_index); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1533 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1534 | u16 hpi_sample_clock_set_source_index(u32 h_control, u16 source_index); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1535 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1536 | u16 hpi_sample_clock_get_source_index(u32 h_control, u16 *pw_source_index); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1537 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1538 | u16 hpi_sample_clock_get_sample_rate(u32 h_control, u32 *psample_rate); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1539 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1540 | u16 hpi_sample_clock_query_local_rate(const u32 h_clock, const u32 index, |
| 1541 | u32 *psource); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1542 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1543 | u16 hpi_sample_clock_set_local_rate(u32 h_control, u32 sample_rate); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1544 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1545 | u16 hpi_sample_clock_get_local_rate(u32 h_control, u32 *psample_rate); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1546 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1547 | u16 hpi_sample_clock_set_auto(u32 h_control, u32 enable); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1548 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1549 | u16 hpi_sample_clock_get_auto(u32 h_control, u32 *penable); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1550 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1551 | u16 hpi_sample_clock_set_local_rate_lock(u32 h_control, u32 lock); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1552 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1553 | u16 hpi_sample_clock_get_local_rate_lock(u32 h_control, u32 *plock); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1554 | |
| 1555 | /***********************/ |
| 1556 | /* Microphone control */ |
| 1557 | /***********************/ |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1558 | u16 hpi_microphone_set_phantom_power(u32 h_control, u16 on_off); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1559 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1560 | u16 hpi_microphone_get_phantom_power(u32 h_control, u16 *pw_on_off); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1561 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1562 | /********************************/ |
| 1563 | /* Parametric Equalizer control */ |
| 1564 | /********************************/ |
| 1565 | u16 hpi_parametric_eq_get_info(u32 h_control, u16 *pw_number_of_bands, |
| 1566 | u16 *pw_enabled); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1567 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1568 | u16 hpi_parametric_eq_set_state(u32 h_control, u16 on_off); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1569 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1570 | u16 hpi_parametric_eq_set_band(u32 h_control, u16 index, u16 type, |
| 1571 | u32 frequency_hz, short q100, short gain0_01dB); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1572 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1573 | u16 hpi_parametric_eq_get_band(u32 h_control, u16 index, u16 *pn_type, |
| 1574 | u32 *pfrequency_hz, short *pnQ100, short *pn_gain0_01dB); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1575 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1576 | u16 hpi_parametric_eq_get_coeffs(u32 h_control, u16 index, short coeffs[5] |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1577 | ); |
| 1578 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1579 | /*******************************/ |
| 1580 | /* Compressor Expander control */ |
| 1581 | /*******************************/ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1582 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1583 | u16 hpi_compander_set_enable(u32 h_control, u32 on); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1584 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1585 | u16 hpi_compander_get_enable(u32 h_control, u32 *pon); |
Eliot Blennerhassett | 168f1b0 | 2010-07-06 08:37:06 +1200 | [diff] [blame] | 1586 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1587 | u16 hpi_compander_set_makeup_gain(u32 h_control, short makeup_gain0_01dB); |
Eliot Blennerhassett | 168f1b0 | 2010-07-06 08:37:06 +1200 | [diff] [blame] | 1588 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1589 | u16 hpi_compander_get_makeup_gain(u32 h_control, short *pn_makeup_gain0_01dB); |
Eliot Blennerhassett | 168f1b0 | 2010-07-06 08:37:06 +1200 | [diff] [blame] | 1590 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1591 | u16 hpi_compander_set_attack_time_constant(u32 h_control, u32 index, |
| 1592 | u32 attack); |
Eliot Blennerhassett | 168f1b0 | 2010-07-06 08:37:06 +1200 | [diff] [blame] | 1593 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1594 | u16 hpi_compander_get_attack_time_constant(u32 h_control, u32 index, |
| 1595 | u32 *pw_attack); |
Eliot Blennerhassett | 168f1b0 | 2010-07-06 08:37:06 +1200 | [diff] [blame] | 1596 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1597 | u16 hpi_compander_set_decay_time_constant(u32 h_control, u32 index, |
| 1598 | u32 decay); |
Eliot Blennerhassett | 168f1b0 | 2010-07-06 08:37:06 +1200 | [diff] [blame] | 1599 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1600 | u16 hpi_compander_get_decay_time_constant(u32 h_control, u32 index, |
| 1601 | u32 *pw_decay); |
Eliot Blennerhassett | 168f1b0 | 2010-07-06 08:37:06 +1200 | [diff] [blame] | 1602 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1603 | u16 hpi_compander_set_threshold(u32 h_control, u32 index, |
| 1604 | short threshold0_01dB); |
Eliot Blennerhassett | 168f1b0 | 2010-07-06 08:37:06 +1200 | [diff] [blame] | 1605 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1606 | u16 hpi_compander_get_threshold(u32 h_control, u32 index, |
| 1607 | short *pn_threshold0_01dB); |
Eliot Blennerhassett | 168f1b0 | 2010-07-06 08:37:06 +1200 | [diff] [blame] | 1608 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1609 | u16 hpi_compander_set_ratio(u32 h_control, u32 index, u32 ratio100); |
Eliot Blennerhassett | 168f1b0 | 2010-07-06 08:37:06 +1200 | [diff] [blame] | 1610 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1611 | u16 hpi_compander_get_ratio(u32 h_control, u32 index, u32 *pw_ratio100); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1612 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1613 | /********************/ |
| 1614 | /* Cobranet control */ |
| 1615 | /********************/ |
| 1616 | u16 hpi_cobranet_hmi_write(u32 h_control, u32 hmi_address, u32 byte_count, |
| 1617 | u8 *pb_data); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1618 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1619 | u16 hpi_cobranet_hmi_read(u32 h_control, u32 hmi_address, u32 max_byte_count, |
| 1620 | u32 *pbyte_count, u8 *pb_data); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1621 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1622 | u16 hpi_cobranet_hmi_get_status(u32 h_control, u32 *pstatus, |
| 1623 | u32 *preadable_size, u32 *pwriteable_size); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1624 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1625 | u16 hpi_cobranet_get_ip_address(u32 h_control, u32 *pdw_ip_address); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1626 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1627 | u16 hpi_cobranet_set_ip_address(u32 h_control, u32 dw_ip_address); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1628 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1629 | u16 hpi_cobranet_get_static_ip_address(u32 h_control, u32 *pdw_ip_address); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1630 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1631 | u16 hpi_cobranet_set_static_ip_address(u32 h_control, u32 dw_ip_address); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1632 | |
Eliot Blennerhassett | 1d595d2 | 2011-02-10 17:26:08 +1300 | [diff] [blame^] | 1633 | u16 hpi_cobranet_get_macaddress(u32 h_control, u32 *p_mac_msbs, |
| 1634 | u32 *p_mac_lsbs); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1635 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1636 | /*************************/ |
| 1637 | /* Tone Detector control */ |
| 1638 | /*************************/ |
| 1639 | u16 hpi_tone_detector_get_state(u32 hC, u32 *state); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1640 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1641 | u16 hpi_tone_detector_set_enable(u32 hC, u32 enable); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1642 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1643 | u16 hpi_tone_detector_get_enable(u32 hC, u32 *enable); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1644 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1645 | u16 hpi_tone_detector_set_event_enable(u32 hC, u32 event_enable); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1646 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1647 | u16 hpi_tone_detector_get_event_enable(u32 hC, u32 *event_enable); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1648 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1649 | u16 hpi_tone_detector_set_threshold(u32 hC, int threshold); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1650 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1651 | u16 hpi_tone_detector_get_threshold(u32 hC, int *threshold); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1652 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1653 | u16 hpi_tone_detector_get_frequency(u32 hC, u32 index, u32 *frequency); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1654 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1655 | /****************************/ |
| 1656 | /* Silence Detector control */ |
| 1657 | /****************************/ |
| 1658 | u16 hpi_silence_detector_get_state(u32 hC, u32 *state); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1659 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1660 | u16 hpi_silence_detector_set_enable(u32 hC, u32 enable); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1661 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1662 | u16 hpi_silence_detector_get_enable(u32 hC, u32 *enable); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1663 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1664 | u16 hpi_silence_detector_set_event_enable(u32 hC, u32 event_enable); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1665 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1666 | u16 hpi_silence_detector_get_event_enable(u32 hC, u32 *event_enable); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1667 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1668 | u16 hpi_silence_detector_set_delay(u32 hC, u32 delay); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1669 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1670 | u16 hpi_silence_detector_get_delay(u32 hC, u32 *delay); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1671 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1672 | u16 hpi_silence_detector_set_threshold(u32 hC, int threshold); |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1673 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1674 | u16 hpi_silence_detector_get_threshold(u32 hC, int *threshold); |
| 1675 | /*********************/ |
| 1676 | /* Utility functions */ |
| 1677 | /*********************/ |
Eliot Blennerhassett | 719f82d3 | 2010-04-21 18:17:39 +0200 | [diff] [blame] | 1678 | |
| 1679 | u16 hpi_format_create(struct hpi_format *p_format, u16 channels, u16 format, |
| 1680 | u32 sample_rate, u32 bit_rate, u32 attributes); |
| 1681 | |
Eliot Blennerhassett | ba94455 | 2011-02-10 17:26:04 +1300 | [diff] [blame] | 1682 | #endif /*_HPI_H_ */ |